ICEACE Model: Closed Economy
1.0.0
Design Documentation of ICEACE Model
Main Page
Related Pages
Data Structures
Files
File List
Globals
All
Data Structures
Files
Functions
Variables
Typedefs
Macros
Pages
IceaceModel1.0
Market_Labour
household_functions_labour.c
Go to the documentation of this file.
1
#include "../header.h"
2
#include "../household_agent_header.h"
3
#include "../library_header.h"
4
5
/*
6
* \fn: int household_labour_check_fired()
7
* \brief: At the start of each month each household checks if he/she has been fired.
8
* In case of lay off employment status is updated. The message filtering is done beforehand.
9
*/
10
int
household_labour_check_fired
()
11
{
12
START_FIRED_MESSAGE_LOOP
13
MY_EMPLOYER_ID
= 0;
14
WAGE
= 0;
15
FINISH_FIRED_MESSAGE_LOOP
16
17
return
0;
/* Returning zero means the agent is not removed */
18
}
19
20
21
/*
22
* \fn: int household_labour_turnover()
23
* \brief: An household applies a job when he/she is employed
24
* and has seen a new better paid job post. Employer applies to a new job
25
* with a turnover probability.
26
*/
27
int
household_labour_reemployment_application
()
28
{
29
if
(
ISMANAGER
) {
return
0;}
30
31
if
(
random_int
(0,99) <
TURNOVER_PROBABILITY
* 100){
32
add_job_application_stage1_message
(
ID
,
WAGE
);
33
}
34
35
return
0;
/* Returning zero means the agent is not removed */
36
}
37
38
39
/*
40
* \fn: int household_labour_turnover()
41
* \brief: An already employed household updates his/her employment status
42
* when a new better paid wage is offered.
43
*/
44
int
household_labour_turnover
()
45
{
46
if
(
ISMANAGER
) {
return
0;}
47
48
int
previous_employer, new_employer;
49
50
previous_employer =
MY_EMPLOYER_ID
;
51
52
53
START_JOB_MATCH_STAGE1_MESSAGE_LOOP
54
new_employer =
job_match_stage1_message
->
employer_id
;
55
WAGE
=
job_match_stage1_message
->
wage
;
56
MY_EMPLOYER_ID
= new_employer;
57
add_job_change_message
(previous_employer,
ID
);
58
FINISH_JOB_MATCH_STAGE1_MESSAGE_LOOP
59
60
return
0;
/* Returning zero means the agent is not removed */
61
}
62
63
/*
64
* \fn: int household_labour_employment_application()
65
* \brief: An household applies a job when he/she is unemployed.
66
* This behviour activated in the second stage of labour market.
67
*/
68
int
household_labour_employment_application
()
69
{
70
add_job_application_stage2_message
(
ID
);
71
72
return
0;
/* Returning zero means the agent is not removed */
73
}
74
75
76
/*
77
* \fn: int household_labour_employment()
78
* \brief: PReviously unemployed household updates his/her employment status
79
* when a position is offered.
80
*/
81
int
household_labour_employment
()
82
{
83
START_JOB_MATCH_STAGE2_MESSAGE_LOOP
84
MY_EMPLOYER_ID
=
job_match_stage2_message
->
employer_id
;
85
WAGE
=
job_match_stage2_message
->
wage
;
86
FINISH_JOB_MATCH_STAGE2_MESSAGE_LOOP
87
88
return
0;
/* Returning zero means the agent is not removed */
89
}
90
91
92
/*
93
* \fn: int household_labour_report_status()
94
* \brief: Sending out employment status.
95
*/
96
int
household_labour_report_status
()
97
{
98
add_employment_status_message
(
MY_EMPLOYER_ID
,
WAGE
,
N_SHARES
);
99
100
return
0;
/* Returning zero means the agent is not removed */
101
}
102
103
104
/*
105
* \fn: int household_labour_receive_wage()
106
* \brief: An household updates its wage history and liquidity at the end
107
* of the month.
108
*/
109
int
household_labour_receive_wage
()
110
{
111
112
WAGE
= 0;
113
START_FIRM_HOUSEHOLD_WAGE_PAYMENT_MESSAGE_LOOP
114
WAGE
=
firm_household_wage_payment_message
->
wage
;
115
FINISH_FIRM_HOUSEHOLD_WAGE_PAYMENT_MESSAGE_LOOP
116
117
double
net_wage = 0;
118
net_wage = WAGE * (1.0 -
LABOUR_TAX_RATE
);
119
LIQUIDITY
+= net_wage;
120
121
122
PREVIOUS_WAGES
[2] =
PREVIOUS_WAGES
[1];
123
PREVIOUS_WAGES
[1] =
PREVIOUS_WAGES
[0];
124
PREVIOUS_WAGES
[0] =
WAGE
;
125
126
LABOUR_INCOME
=
PREVIOUS_WAGES
[0] +
PREVIOUS_WAGES
[1] +
PREVIOUS_WAGES
[2];
127
/* Wages after labour tax is added to the income */
128
LABOUR_INCOME
= (1.0 -
LABOUR_TAX_RATE
) *
LABOUR_INCOME
;
129
130
/* Adding government benefits, general plus unemployment benefits to the quarterly labour income. */
131
double
benefits = 0;
132
benefits =
PREVIOUS_BENEFITS
[0] +
PREVIOUS_BENEFITS
[1] +
PREVIOUS_BENEFITS
[2];
133
LABOUR_INCOME
+= benefits;
134
135
return
0;
/* Returning zero means the agent is not removed */
136
}
137
138
Generated on Tue Apr 8 2014 13:25:19 for ICEACE Model: Closed Economy by
1.8.3.1