ICEACE Model: Closed Economy  1.0.0
Design Documentation of ICEACE Model
 All Data Structures Files Functions Variables Typedefs Macros Pages
centralbank_functions_consumption.c
Go to the documentation of this file.
1 #include "../header.h"
2 #include "../centralbank_agent_header.h"
3 
4 
5 /*
6  * \fn: int centralbank_trace_goods_prices()
7  * \brief:
8  */
10 {
15 
16  for (int i = 0; i < 3; i++) {
18  }
19  WEEKLY_PRICE_AVERAGES[3] = GOODS.avg_price;
20 
21  return 0; /* Returning zero means the agent is not removed */
22 }
23 
24 /*
25  * \fn: int centralbank_update_price_indices()()
26  * \brief: The function updates monthly consumption goods prices.
27  */
29  double price_avg, prices, quarterly_price_change;
30  int i;
31 
32  prices = 0;
33  for(i = 0; i < 4; i++){
34  prices += WEEKLY_PRICE_AVERAGES[i];
35  }
36  price_avg = prices / 4;
37 
38  for(i = 0; i < 11; i++){
40  }
41  CONSUMPTION_GOODS_PRICES[11] = price_avg;
42 
43  if(CONSUMPTION_GOODS_PRICES[8] == 0){
44  quarterly_price_change = 0;
45  }
46  else {
47  quarterly_price_change = (CONSUMPTION_GOODS_PRICES[11] - CONSUMPTION_GOODS_PRICES[8]) / CONSUMPTION_GOODS_PRICES[8];
48  }
49 
50  // MONTHLY_PRICE_INDEX = MONTHLY_PRICE_INDEX + MONTHLY_PRICE_INDEX * monthly_price_change;
51 
53 
54  return 0; /* Returning zero means the agent is not removed */
55 }