forked from ICEACE/FLAME
-
Notifications
You must be signed in to change notification settings - Fork 0
/
government_functions_top.c
51 lines (40 loc) · 1.31 KB
/
government_functions_top.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#include "header.h"
#include "government_agent_header.h"
/*
* \fn: int government_init()
* \brief:
*/
int government_init()
{
if (DATA_COLLECTION_MODE) {
char * filename;
FILE * file1;
/* @\fn: government_compute_income_statement() */
filename = malloc(40*sizeof(char));
filename[0]=0;
strcpy(filename, "./outputs/data/Government_snapshot.txt");
file1 = fopen(filename,"w");
fprintf(file1,"%s %s %s %s %s %s %s %s %s %s %s %s %s %s %s\n","IT_NO", "UNEMPLOYMENT_RATE", "AVERAGE_WAGE", "LABOUR_TAX_RATE", "CAPITAL_TAX_RATE", "GOV_GENERAL_BENEFIT_RATE", "LABOUR_TAX_INCOME", "CAPITAL_TAX_INCOME", "CENTRALBANK_INCOME", "UNEMPLOYMENT_BENEFITS", "GENERAL_BENEFITS", "LIQUIDITY", "DEBT", "EARNINGS", "EXPENDITURES");
fclose(file1);
}
add_gov_centralbank_init_deposit_message(LIQUIDITY);
return 0; /* Returning zero means the agent is not removed */
}
/*
* \fn: int government_iterate()
* \brief:
*/
int government_iterate()
{
IT_NO++;
return 0; /* Returning zero means the agent is not removed */
}
/*
* \fn: int government_update_deposit()
* \brief:
*/
int government_update_deposit()
{
add_gov_centralbank_update_deposit_message(LIQUIDITY);
return 0; /* Returning zero means the agent is not removed */
}