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
rules.c
Go to the documentation of this file.
1
6
#include "
header.h
"
7
15
int
FLAME_integer_in_array
(
int
a,
int
* b,
int
size)
16
{
17
int
i;
18
19
for
(i = 0; i < size; i++)
20
{
21
if
(a == b[i])
return
1;
22
}
23
24
return
0;
25
}
26
35
void
*
cparams_create
(
int
agent_number,
int
* agent_count,
size_t
* agent_struct_size,
size_t
* cparam_size)
36
{
37
/* Pointer to the memory created that is going to be returned */
38
void
*data;
39
/* Variable used in for loops */
40
int
i;
41
/* Variable to hold total size of memory required for agent structures */
42
size_t
total_param_size = 0;
43
44
/* For each agent type add required memory for agent structures */
45
for
(i = 0; i < agent_number; i++)
46
{
47
total_param_size += agent_count[i] * agent_struct_size[i];
48
}
49
50
//assert(count > 0);
51
//assert(total_param_size > 0);
52
/* Does libmboard free this memory? */
53
54
/* Allocate required memory, where memory holds the number
55
* of each agent type, in order, and the total required
56
* memory for agent structures */
57
data = malloc(agent_number*
sizeof
(
int
) + total_param_size);
58
/* Make the memory size parameter equal to the actual memory size */
59
*cparam_size = agent_number*
sizeof
(int) + total_param_size;
60
/* Assert that the created memory was successfully created and not null */
61
assert(data != NULL);
62
63
/* Return the pointer to the created memory */
64
return
data;
65
}
66
67
73
int
FLAME_condition_firm_idle_start_FirmInitPostId
(
xmachine_memory_firm
*a)
74
{
75
if
((a->
it_no
== 0))
return
1;
76
else
return
0;
77
}
78
79
85
int
FLAME_condition_firm_idle_start_FirmLoop
(
xmachine_memory_firm
*a)
86
{
87
if
((a->
it_no
!= 0))
return
1;
88
else
return
0;
89
}
90
91
97
int
FLAME_condition_firm_idle_FirmUpdateDeposits_FirmCreditPolicyChecks
(
xmachine_memory_firm
*a)
98
{
99
if
(!(
iteration_loop
%20 == 0))
return
1;
100
else
return
0;
101
}
102
103
109
int
FLAME_condition_firm_firm_update_bank_account_FirmUpdateDeposits_FirmCreditPolicyChecks
(
xmachine_memory_firm
*a)
110
{
111
if
((
iteration_loop
%20 == 0))
return
1;
112
else
return
0;
113
}
114
115
121
int
FLAME_condition_firm_idle_FirmConsumptionStart_FirmHousingStart
(
xmachine_memory_firm
*a)
122
{
123
if
((a->
isconstructor
== 1))
return
1;
124
else
return
0;
125
}
126
127
133
int
FLAME_condition_firm_idle_FirmConsumptionStart_FirmConsumptionMarket
(
xmachine_memory_firm
*a)
134
{
135
if
((a->
isconstructor
!= 1))
return
1;
136
else
return
0;
137
}
138
139
145
int
FLAME_condition_firm_idle_FirmConsumptionMarket_FirmHousingStart
(
xmachine_memory_firm
*a)
146
{
147
if
(!(
iteration_loop
%5 == a->
day_of_week_to_act
))
return
1;
148
else
return
0;
149
}
150
151
157
int
FLAME_condition_firm_firm_consumption_supply_FirmConsumptionMarket_FirmReceiveSales
(
xmachine_memory_firm
*a)
158
{
159
if
((
iteration_loop
%5 == a->
day_of_week_to_act
))
return
1;
160
else
return
0;
161
}
162
163
169
int
FLAME_condition_firm_idle_FirmLabourStart_FirmConsumptionStart
(
xmachine_memory_firm
*a)
170
{
171
if
(!(
iteration_loop
%20 == a->
day_of_month_to_act
))
return
1;
172
else
return
0;
173
}
174
175
181
int
FLAME_condition_firm_firm_labour_workforce_needed_FirmLabourStart_FirmLabourStage1
(
xmachine_memory_firm
*a)
182
{
183
if
((
iteration_loop
%20 == a->
day_of_month_to_act
))
return
1;
184
else
return
0;
185
}
186
187
193
int
FLAME_condition_firm_idle_FirmLabourStage1_FirmLabourStage1End
(
xmachine_memory_firm
*a)
194
{
195
if
((a->
vacancies
== 0))
return
1;
196
else
return
0;
197
}
198
199
205
int
FLAME_condition_firm_firm_labour_fire_FirmLabourStage1_FirmLabourStage1End
(
xmachine_memory_firm
*a)
206
{
207
if
((a->
vacancies
< 0))
return
1;
208
else
return
0;
209
}
210
211
217
int
FLAME_condition_firm_firm_labour_job_announcement_stage1_FirmLabourStage1_FirmLabourStage1Application
(
xmachine_memory_firm
*a)
218
{
219
if
((a->
vacancies
> 0))
return
1;
220
else
return
0;
221
}
222
223
229
int
FLAME_condition_firm_firm_labour_job_announcement_stage2_FirmLabourStage2_FirmLabourStage2End
(
xmachine_memory_firm
*a)
230
{
231
if
((a->
vacancies
>= 1))
return
1;
232
else
return
0;
233
}
234
235
241
int
FLAME_condition_firm_idle_FirmLabourStage2_FirmConsumptionStart
(
xmachine_memory_firm
*a)
242
{
243
if
((a->
vacancies
< 1))
return
1;
244
else
return
0;
245
}
246
247
253
int
FLAME_condition_firm_idle_FirmLabourPayWages_FirmUpdateDeposits
(
xmachine_memory_firm
*a)
254
{
255
if
(!(
iteration_loop
%20 == a->
day_of_month_wages_paid
))
return
1;
256
else
return
0;
257
}
258
259
265
int
FLAME_condition_firm_firm_labour_pay_wages_FirmLabourPayWages_FirmLabourWageAdjustment
(
xmachine_memory_firm
*a)
266
{
267
if
((
iteration_loop
%20 == a->
day_of_month_wages_paid
))
return
1;
268
else
return
0;
269
}
270
271
277
int
FLAME_condition_firm_idle_FirmProductionStart_FirmLabourStart
(
xmachine_memory_firm
*a)
278
{
279
if
(!((
iteration_loop
%20 == a->
day_of_month_to_act
) || (
iteration_loop
%20 == a->
day_of_month_production_completed
)))
return
1;
280
else
return
0;
281
}
282
283
289
int
FLAME_condition_firm_idle_FirmProductionStart_FirmProductionSkip
(
xmachine_memory_firm
*a)
290
{
291
if
(((
iteration_loop
%20 == a->
day_of_month_to_act
) || (
iteration_loop
%20 == a->
day_of_month_production_completed
)))
return
1;
292
else
return
0;
293
}
294
295
301
int
FLAME_condition_firm_firm_production_skip_FirmProductionSkip_FirmLabourStart
(
xmachine_memory_firm
*a)
302
{
303
if
((a->
isinsolvent
== 1))
return
1;
304
else
return
0;
305
}
306
307
313
int
FLAME_condition_firm_idle_FirmProductionSkip_FirmProductionRoleCheck
(
xmachine_memory_firm
*a)
314
{
315
if
((a->
isinsolvent
!= 1))
return
1;
316
else
return
0;
317
}
318
319
325
int
FLAME_condition_firm_idle_FirmProductionRoleCheck_FirmProductionRegular
(
xmachine_memory_firm
*a)
326
{
327
if
((a->
isconstructor
== 0))
return
1;
328
else
return
0;
329
}
330
331
337
int
FLAME_condition_firm_idle_FirmProductionRoleCheck_FirmProductionConstructor
(
xmachine_memory_firm
*a)
338
{
339
if
((a->
isconstructor
!= 0))
return
1;
340
else
return
0;
341
}
342
343
349
int
FLAME_condition_firm_firm_production_produce_goods_FirmProductionRegular_FirmLabourStart
(
xmachine_memory_firm
*a)
350
{
351
if
((
iteration_loop
%20 == a->
day_of_month_production_completed
))
return
1;
352
else
return
0;
353
}
354
355
361
int
FLAME_condition_firm_firm_production_set_price_FirmProductionRegular_FirmProductionPlanning
(
xmachine_memory_firm
*a)
362
{
363
if
((
iteration_loop
%20 == a->
day_of_month_to_act
))
return
1;
364
else
return
0;
365
}
366
367
373
int
FLAME_condition_firm_firm_production_construct_houses_FirmProductionConstructor_FirmLabourStart
(
xmachine_memory_firm
*a)
374
{
375
if
((
iteration_loop
%20 == a->
day_of_month_production_completed
))
return
1;
376
else
return
0;
377
}
378
379
385
int
FLAME_condition_firm_firm_production_construction_plan_FirmProductionConstructor_FirmConstructionLabourDemand
(
xmachine_memory_firm
*a)
386
{
387
if
((
iteration_loop
%20 == a->
day_of_month_to_act
))
return
1;
388
else
return
0;
389
}
390
391
397
int
FLAME_condition_firm_idle_FirmCreditStart_FirmProductionStart
(
xmachine_memory_firm
*a)
398
{
399
if
(!(
iteration_loop
%60 == 1))
return
1;
400
else
return
0;
401
}
402
403
409
int
FLAME_condition_firm_firm_credit_compute_income_statement_FirmCreditStart_FirmCreditInvestment
(
xmachine_memory_firm
*a)
410
{
411
if
((
iteration_loop
%60 == 1))
return
1;
412
else
return
0;
413
}
414
415
421
int
FLAME_condition_firm_idle_FirmCreditStatus_FirmCreditPayments
(
xmachine_memory_firm
*a)
422
{
423
if
((a->
isliquidshort
== 0))
return
1;
424
else
return
0;
425
}
426
427
433
int
FLAME_condition_firm_firm_credit_demand_loans_1_FirmCreditStatus_FirmCreditLoanBorrow1
(
xmachine_memory_firm
*a)
434
{
435
if
((a->
isliquidshort
!= 0))
return
1;
436
else
return
0;
437
}
438
439
445
int
FLAME_condition_firm_idle_FirmCreditLoanBorrow2_FirmCreditPayments
(
xmachine_memory_firm
*a)
446
{
447
if
((a->
hasloan
== 1))
return
1;
448
else
return
0;
449
}
450
451
457
int
FLAME_condition_firm_firm_credit_borrow_loans_2_FirmCreditLoanBorrow2_FirmCreditIlliquidityStatus
(
xmachine_memory_firm
*a)
458
{
459
if
((a->
hasloan
!= 1))
return
1;
460
else
return
0;
461
}
462
463
469
int
FLAME_condition_firm_idle_FirmCreditIlliquidityStatus_FirmCreditPayments
(
xmachine_memory_firm
*a)
470
{
471
if
((a->
hasloan
== 1))
return
1;
472
else
return
0;
473
}
474
475
481
int
FLAME_condition_firm_firm_credit_request_equityfund_investment_FirmCreditIlliquidityStatus_FirmCreditLiquidityRecheck
(
xmachine_memory_firm
*a)
482
{
483
if
((a->
hasloan
!= 1))
return
1;
484
else
return
0;
485
}
486
487
493
int
FLAME_condition_firm_idle_FirmCreditLiquidityRecheck_FirmCreditPayments
(
xmachine_memory_firm
*a)
494
{
495
if
((a->
liquidity_need
== 0))
return
1;
496
else
return
0;
497
}
498
499
505
int
FLAME_condition_firm_firm_credit_check_equityfund_investment_FirmCreditLiquidityRecheck_FirmCreditBankruptcy
(
xmachine_memory_firm
*a)
506
{
507
if
((a->
liquidity_need
!= 0))
return
1;
508
else
return
0;
509
}
510
511
517
int
FLAME_condition_firm_idle_FirmCreditBankruptcy_FirmCreditPayments
(
xmachine_memory_firm
*a)
518
{
519
if
((a->
hasinvestment
== 1))
return
1;
520
else
return
0;
521
}
522
523
529
int
FLAME_condition_firm_firm_credit_illiquidity_bankrupt_FirmCreditBankruptcy_FirmCreditBalanceSheet
(
xmachine_memory_firm
*a)
530
{
531
if
((a->
hasinvestment
!= 1))
return
1;
532
else
return
0;
533
}
534
535
541
int
FLAME_condition_firm_idle_FirmCreditInsolvencyCheck_FirmProductionStart
(
xmachine_memory_firm
*a)
542
{
543
if
((a->
isinsolvent
!= 1))
return
1;
544
else
return
0;
545
}
546
547
553
int
FLAME_condition_firm_firm_credit_insolvency_bankruptcy_FirmCreditInsolvencyCheck_FirmProductionStart
(
xmachine_memory_firm
*a)
554
{
555
if
((a->
isinsolvent
== 1))
return
1;
556
else
return
0;
557
}
558
559
565
int
FLAME_condition_firm_idle_FirmCreditPolicyChecks_end
(
xmachine_memory_firm
*a)
566
{
567
if
(!(
iteration_loop
%60 == 0))
return
1;
568
else
return
0;
569
}
570
571
577
int
FLAME_condition_firm_firm_credit_check_interest_rate_FirmCreditPolicyChecks_FirmCreditCheckTaxRate
(
xmachine_memory_firm
*a)
578
{
579
if
((
iteration_loop
%60 == 0))
return
1;
580
else
return
0;
581
}
582
583
589
int
FLAME_condition_firm_idle_FirmHousingStart_FirmLabourPayWages
(
xmachine_memory_firm
*a)
590
{
591
if
((a->
isconstructor
== 0))
return
1;
592
else
return
0;
593
}
594
595
601
int
FLAME_condition_firm_idle_FirmHousingStart_FirmHousingMarket
(
xmachine_memory_firm
*a)
602
{
603
if
((a->
isconstructor
!= 0))
return
1;
604
else
return
0;
605
}
606
607
613
int
FLAME_condition_firm_idle_FirmHousingMarket_FirmLabourPayWages
(
xmachine_memory_firm
*a)
614
{
615
if
(!(
iteration_loop
%20 == a->
day_of_month_to_act
))
return
1;
616
else
return
0;
617
}
618
619
625
int
FLAME_condition_firm_firm_housing_enter_market_FirmHousingMarket_FirmHousingSell
(
xmachine_memory_firm
*a)
626
{
627
if
((
iteration_loop
%20 == a->
day_of_month_to_act
))
return
1;
628
else
return
0;
629
}
630
631
637
int
FLAME_condition_household_idle_start_HouseholdInitPostId
(
xmachine_memory_household
*a)
638
{
639
if
((a->
it_no
== 0))
return
1;
640
else
return
0;
641
}
642
643
649
int
FLAME_condition_household_idle_start_HouseholdLoop
(
xmachine_memory_household
*a)
650
{
651
if
((a->
it_no
!= 0))
return
1;
652
else
return
0;
653
}
654
655
661
int
FLAME_condition_household_idle_HouseholdUpdateDeposits_HHCreditPolicyChecks
(
xmachine_memory_household
*a)
662
{
663
if
(!(
iteration_loop
%20 == 0))
return
1;
664
else
return
0;
665
}
666
667
673
int
FLAME_condition_household_household_update_bank_account_HouseholdUpdateDeposits_HHCreditPolicyChecks
(
xmachine_memory_household
*a)
674
{
675
if
((
iteration_loop
%20 == 0))
return
1;
676
else
return
0;
677
}
678
679
685
int
FLAME_condition_household_idle_HHConsumptionStart_HHConsumptionWeekly
(
xmachine_memory_household
*a)
686
{
687
if
(!(
iteration_loop
%20 == a->
day_of_month_to_act
))
return
1;
688
else
return
0;
689
}
690
691
697
int
FLAME_condition_household_household_consumption_compute_budget_HHConsumptionStart_HHConsumptionWeekly
(
xmachine_memory_household
*a)
698
{
699
if
((
iteration_loop
%20 == a->
day_of_month_to_act
))
return
1;
700
else
return
0;
701
}
702
703
709
int
FLAME_condition_household_idle_HHConsumptionWeekly_HHConsumptionMonthly
(
xmachine_memory_household
*a)
710
{
711
if
(!(
iteration_loop
%5 == a->
day_of_week_to_act
))
return
1;
712
else
return
0;
713
}
714
715
721
int
FLAME_condition_household_household_consumption_demand_HHConsumptionWeekly_HHConsumptionRecieveGoods
(
xmachine_memory_household
*a)
722
{
723
if
((
iteration_loop
%5 == a->
day_of_week_to_act
))
return
1;
724
else
return
0;
725
}
726
727
733
int
FLAME_condition_household_idle_HHConsumptionMonthly_HHHousingStart
(
xmachine_memory_household
*a)
734
{
735
if
(!(
iteration_loop
%20 == 0))
return
1;
736
else
return
0;
737
}
738
739
745
int
FLAME_condition_household_household_consumption_trace_cpi_HHConsumptionMonthly_HHHousingStart
(
xmachine_memory_household
*a)
746
{
747
if
((
iteration_loop
%20 == 0))
return
1;
748
else
return
0;
749
}
750
751
757
int
FLAME_condition_household_idle_HHLabourStart_HHConsumptionStart
(
xmachine_memory_household
*a)
758
{
759
if
(!(
iteration_loop
%20 == a->
day_of_month_to_act
))
return
1;
760
else
return
0;
761
}
762
763
769
int
FLAME_condition_household_household_labour_check_fired_HHLabourStart_HHLabourStage1
(
xmachine_memory_household
*a)
770
{
771
if
((
iteration_loop
%20 == a->
day_of_month_to_act
))
return
1;
772
else
return
0;
773
}
774
775
781
int
FLAME_condition_household_household_labour_reemployment_application_HHLabourStage1_HHLabourStage2
(
xmachine_memory_household
*a)
782
{
783
if
((a->
my_employer_id
> 0))
return
1;
784
else
return
0;
785
}
786
787
793
int
FLAME_condition_household_idle_HHLabourStage1_HHLabourStage1Applications
(
xmachine_memory_household
*a)
794
{
795
if
(!(a->
my_employer_id
> 0))
return
1;
796
else
return
0;
797
}
798
799
805
int
FLAME_condition_household_idle_HHLabourPayroll_HouseholdUpdateDeposits
(
xmachine_memory_household
*a)
806
{
807
if
(!(
iteration_loop
%20 == a->
day_of_month_wage_recieved
))
return
1;
808
else
return
0;
809
}
810
811
817
int
FLAME_condition_household_household_labour_receive_wage_HHLabourPayroll_HHLabourEmploymentStatus
(
xmachine_memory_household
*a)
818
{
819
if
((
iteration_loop
%20 == a->
day_of_month_wage_recieved
))
return
1;
820
else
return
0;
821
}
822
823
829
int
FLAME_condition_household_idle_HHCreditStart_HHCreditMonthly
(
xmachine_memory_household
*a)
830
{
831
if
(!(
iteration_loop
%60 == 1))
return
1;
832
else
return
0;
833
}
834
835
841
int
FLAME_condition_household_idle_HHCreditStart_HHCreditIsCapitalist
(
xmachine_memory_household
*a)
842
{
843
if
((
iteration_loop
%60 == 1))
return
1;
844
else
return
0;
845
}
846
847
853
int
FLAME_condition_household_idle_HHCreditIsCapitalist_HHCreditBalanceSheet
(
xmachine_memory_household
*a)
854
{
855
if
((a->
n_shares
== 0))
return
1;
856
else
return
0;
857
}
858
859
865
int
FLAME_condition_household_household_credit_collect_shares_HHCreditIsCapitalist_HHCreditBalanceSheet
(
xmachine_memory_household
*a)
866
{
867
if
((a->
n_shares
> 0))
return
1;
868
else
return
0;
869
}
870
871
877
int
FLAME_condition_household_idle_HHCreditMonthly_HHLabourStart
(
xmachine_memory_household
*a)
878
{
879
if
(!(
iteration_loop
%20 == a->
day_of_month_wage_recieved
))
return
1;
880
else
return
0;
881
}
882
883
889
int
FLAME_condition_household_household_credit_collect_benefits_HHCreditMonthly_HHLabourStart
(
xmachine_memory_household
*a)
890
{
891
if
((
iteration_loop
%20 == a->
day_of_month_wage_recieved
))
return
1;
892
else
return
0;
893
}
894
895
901
int
FLAME_condition_household_idle_HHCreditPolicyChecks_end
(
xmachine_memory_household
*a)
902
{
903
if
(!(
iteration_loop
%60 == 0))
return
1;
904
else
return
0;
905
}
906
907
913
int
FLAME_condition_household_household_credit_check_interest_rate_HHCreditPolicyChecks_HHCreditUpdateAnnuity
(
xmachine_memory_household
*a)
914
{
915
if
((
iteration_loop
%60 == 0))
return
1;
916
else
return
0;
917
}
918
919
925
int
FLAME_condition_household_idle_HHHousingStart_HHLabourPayroll
(
xmachine_memory_household
*a)
926
{
927
if
(!(
iteration_loop
%20 == a->
day_of_month_to_act
))
return
1;
928
else
return
0;
929
}
930
931
937
int
FLAME_condition_household_household_housing_market_role_HHHousingStart_HHHousingRole
(
xmachine_memory_household
*a)
938
{
939
if
((
iteration_loop
%20 == a->
day_of_month_to_act
))
return
1;
940
else
return
0;
941
}
942
943
949
int
FLAME_condition_household_idle_HHHousingRole_HHHousingPrice
(
xmachine_memory_household
*a)
950
{
951
if
((a->
hmarket_role
== 0))
return
1;
952
else
return
0;
953
}
954
955
961
int
FLAME_condition_household_household_housing_check_wealth_HHHousingRole_HHHousingCheckWealth
(
xmachine_memory_household
*a)
962
{
963
if
((a->
hmarket_role
== 3))
return
1;
964
else
return
0;
965
}
966
967
973
int
FLAME_condition_household_household_housing_sell_HHHousingRole_HHHousingRevenue
(
xmachine_memory_household
*a)
974
{
975
if
((a->
hmarket_role
== 2))
return
1;
976
else
return
0;
977
}
978
979
985
int
FLAME_condition_household_household_housing_fire_sell_HHHousingRole_HHHousingRevenue
(
xmachine_memory_household
*a)
986
{
987
if
((a->
hmarket_role
== 1))
return
1;
988
else
return
0;
989
}
990
991
997
int
FLAME_condition_household_idle_HHHousingCheckWealth_HHHousingPrice
(
xmachine_memory_household
*a)
998
{
999
if
((a->
equity_ratio
< a->
minimum_equity_ratio
))
return
1;
1000
else
return
0;
1001
}
1002
1003
1009
int
FLAME_condition_household_household_housing_enter_market_HHHousingCheckWealth_HHHousingBargain
(
xmachine_memory_household
*a)
1010
{
1011
if
((a->
equity_ratio
>= a->
minimum_equity_ratio
))
return
1;
1012
else
return
0;
1013
}
1014
1015
1021
int
FLAME_condition_equityfund_equityfund_init_start_EquityFundLoop
(
xmachine_memory_equityfund
*a)
1022
{
1023
if
((a->
it_no
== 0))
return
1;
1024
else
return
0;
1025
}
1026
1027
1033
int
FLAME_condition_equityfund_idle_start_EquityFundLoop
(
xmachine_memory_equityfund
*a)
1034
{
1035
if
((a->
it_no
!= 0))
return
1;
1036
else
return
0;
1037
}
1038
1039
1045
int
FLAME_condition_equityfund_idle_EFLabourMarket_EFCreditIncomeStatement
(
xmachine_memory_equityfund
*a)
1046
{
1047
if
(!(
iteration_loop
%20 == a->
day_of_month_wages_paid
))
return
1;
1048
else
return
0;
1049
}
1050
1051
1057
int
FLAME_condition_equityfund_equityfund_audit_dividends_EFLabourMarket_EFCreditIncomeStatement
(
xmachine_memory_equityfund
*a)
1058
{
1059
if
((
iteration_loop
%20 == a->
day_of_month_wages_paid
))
return
1;
1060
else
return
0;
1061
}
1062
1063
1069
int
FLAME_condition_equityfund_idle_EquityFundCredit_EFLabourMarket
(
xmachine_memory_equityfund
*a)
1070
{
1071
if
(!(
iteration_loop
%60 == 1))
return
1;
1072
else
return
0;
1073
}
1074
1075
1081
int
FLAME_condition_equityfund_equityfund_credit_invest_illiquids_EquityFundCredit_EFCreditShareCollectionBanks
(
xmachine_memory_equityfund
*a)
1082
{
1083
if
((
iteration_loop
%60 == 1))
return
1;
1084
else
return
0;
1085
}
1086
1087
1093
int
FLAME_condition_equityfund_idle_EFCreditIncomeStatement_end
(
xmachine_memory_equityfund
*a)
1094
{
1095
if
(!(
iteration_loop
%60 == 0))
return
1;
1096
else
return
0;
1097
}
1098
1099
1105
int
FLAME_condition_equityfund_equityfund_credit_compute_income_statement_EFCreditIncomeStatement_EFCreditBalanceSheet
(
xmachine_memory_equityfund
*a)
1106
{
1107
if
((
iteration_loop
%60 == 0))
return
1;
1108
else
return
0;
1109
}
1110
1111
1117
int
FLAME_condition_bank_idle_start_BankInitLoans
(
xmachine_memory_bank
*a)
1118
{
1119
if
((a->
it_no
== 0))
return
1;
1120
else
return
0;
1121
}
1122
1123
1129
int
FLAME_condition_bank_idle_start_BankLoop
(
xmachine_memory_bank
*a)
1130
{
1131
if
((a->
it_no
!= 0))
return
1;
1132
else
return
0;
1133
}
1134
1135
1141
int
FLAME_condition_bank_idle_BankUpdateDeposits_BankCreditPolicyChecks
(
xmachine_memory_bank
*a)
1142
{
1143
if
(!(
iteration_loop
%20 == 0))
return
1;
1144
else
return
0;
1145
}
1146
1147
1153
int
FLAME_condition_bank_bank_update_deposits_BankUpdateDeposits_BankCreditPolicyChecks
(
xmachine_memory_bank
*a)
1154
{
1155
if
((
iteration_loop
%20 == 0))
return
1;
1156
else
return
0;
1157
}
1158
1159
1165
int
FLAME_condition_bank_idle_BankCreditStart_BankHousingMarket
(
xmachine_memory_bank
*a)
1166
{
1167
if
(!(
iteration_loop
%60 == 1))
return
1;
1168
else
return
0;
1169
}
1170
1171
1177
int
FLAME_condition_bank_bank_credit_compute_income_statement_BankCreditStart_BankCreditDividends
(
xmachine_memory_bank
*a)
1178
{
1179
if
((
iteration_loop
%60 == 1))
return
1;
1180
else
return
0;
1181
}
1182
1183
1189
int
FLAME_condition_bank_idle_BankCreditPolicyChecks_end
(
xmachine_memory_bank
*a)
1190
{
1191
if
(!(
iteration_loop
%60 == 0))
return
1;
1192
else
return
0;
1193
}
1194
1195
1201
int
FLAME_condition_bank_bank_credit_check_interest_rate_BankCreditPolicyChecks_end
(
xmachine_memory_bank
*a)
1202
{
1203
if
((
iteration_loop
%60 == 0))
return
1;
1204
else
return
0;
1205
}
1206
1207
1213
int
FLAME_condition_bank_idle_BankHousingMarket_BankUpdateDeposits
(
xmachine_memory_bank
*a)
1214
{
1215
if
(!(
iteration_loop
%20 == a->
day_of_month_to_act
))
return
1;
1216
else
return
0;
1217
}
1218
1219
1225
int
FLAME_condition_bank_bank_housing_compute_capital_status_BankHousingMarket_BankHousingCrediting
(
xmachine_memory_bank
*a)
1226
{
1227
if
((
iteration_loop
%20 == a->
day_of_month_to_act
))
return
1;
1228
else
return
0;
1229
}
1230
1231
1237
int
FLAME_condition_government_government_init_start_GovernmentLoop
(
xmachine_memory_government
*a)
1238
{
1239
if
((a->
it_no
== 0))
return
1;
1240
else
return
0;
1241
}
1242
1243
1249
int
FLAME_condition_government_idle_start_GovernmentLoop
(
xmachine_memory_government
*a)
1250
{
1251
if
((a->
it_no
!= 0))
return
1;
1252
else
return
0;
1253
}
1254
1255
1261
int
FLAME_condition_government_idle_GovernmentCredit_GovernmentMonthly
(
xmachine_memory_government
*a)
1262
{
1263
if
(!(
iteration_loop
%60 == 1))
return
1;
1264
else
return
0;
1265
}
1266
1267
1273
int
FLAME_condition_government_government_collect_capital_tax_GovernmentCredit_GovernmentMonthly
(
xmachine_memory_government
*a)
1274
{
1275
if
((
iteration_loop
%60 == 1))
return
1;
1276
else
return
0;
1277
}
1278
1279
1285
int
FLAME_condition_government_idle_GovernmentMonthly_GovernmentFiscalPolicy
(
xmachine_memory_government
*a)
1286
{
1287
if
(!(
iteration_loop
%20 == a->
day_of_month_wages_paid
))
return
1;
1288
else
return
0;
1289
}
1290
1291
1297
int
FLAME_condition_government_government_distribute_general_benefits_GovernmentMonthly_GovernmentUnemploymentBenefits
(
xmachine_memory_government
*a)
1298
{
1299
if
((
iteration_loop
%20 == a->
day_of_month_wages_paid
))
return
1;
1300
else
return
0;
1301
}
1302
1303
1309
int
FLAME_condition_government_idle_GovernmentFiscalPolicy_end
(
xmachine_memory_government
*a)
1310
{
1311
if
(!(
iteration_loop
%60 == 0))
return
1;
1312
else
return
0;
1313
}
1314
1315
1321
int
FLAME_condition_government_government_collect_centralbank_profit_GovernmentFiscalPolicy_GovernmentIncomeStatement
(
xmachine_memory_government
*a)
1322
{
1323
if
((
iteration_loop
%60 == 0))
return
1;
1324
else
return
0;
1325
}
1326
1327
1333
int
FLAME_condition_centralbank_idle_start_CentralBankInitBalanceSheet
(
xmachine_memory_centralbank
*a)
1334
{
1335
if
((a->
it_no
== 0))
return
1;
1336
else
return
0;
1337
}
1338
1339
1345
int
FLAME_condition_centralbank_idle_start_CentralBankLoop
(
xmachine_memory_centralbank
*a)
1346
{
1347
if
((a->
it_no
!= 0))
return
1;
1348
else
return
0;
1349
}
1350
1351
1357
int
FLAME_condition_centralbank_idle_CentralBankConsumption_CentralBankConsumptionPrices
(
xmachine_memory_centralbank
*a)
1358
{
1359
if
(!(
iteration_loop
%5 == a->
day_of_week_to_act
))
return
1;
1360
else
return
0;
1361
}
1362
1363
1369
int
FLAME_condition_centralbank_centralbank_trace_goods_prices_CentralBankConsumption_CentralBankConsumptionPrices
(
xmachine_memory_centralbank
*a)
1370
{
1371
if
((
iteration_loop
%5 == a->
day_of_week_to_act
))
return
1;
1372
else
return
0;
1373
}
1374
1375
1381
int
FLAME_condition_centralbank_idle_CentralBankConsumptionPrices_CentralBankHousing
(
xmachine_memory_centralbank
*a)
1382
{
1383
if
(!(
iteration_loop
%20 == 0))
return
1;
1384
else
return
0;
1385
}
1386
1387
1393
int
FLAME_condition_centralbank_centralbank_update_price_indices_CentralBankConsumptionPrices_CentralBankHousing
(
xmachine_memory_centralbank
*a)
1394
{
1395
if
((
iteration_loop
%20 == 0))
return
1;
1396
else
return
0;
1397
}
1398
1399
1405
int
FLAME_condition_centralbank_idle_CentralBankLabour_CentralBankPolicy
(
xmachine_memory_centralbank
*a)
1406
{
1407
if
(!(
iteration_loop
%20 == a->
day_of_month_wages_paid
))
return
1;
1408
else
return
0;
1409
}
1410
1411
1417
int
FLAME_condition_centralbank_centralbank_trace_unemployment_status_CentralBankLabour_CentralBankPolicy
(
xmachine_memory_centralbank
*a)
1418
{
1419
if
((
iteration_loop
%20 == a->
day_of_month_wages_paid
))
return
1;
1420
else
return
0;
1421
}
1422
1423
1429
int
FLAME_condition_centralbank_idle_CentralBankCredit_CentralBankConsumption
(
xmachine_memory_centralbank
*a)
1430
{
1431
if
(!(
iteration_loop
%60 == 1))
return
1;
1432
else
return
0;
1433
}
1434
1435
1441
int
FLAME_condition_centralbank_centralbank_collect_interest_payments_CentralBankCredit_CentralBankDebtRequests
(
xmachine_memory_centralbank
*a)
1442
{
1443
if
((
iteration_loop
%60 == 1))
return
1;
1444
else
return
0;
1445
}
1446
1447
1453
int
FLAME_condition_centralbank_idle_CentralBankPolicy_end
(
xmachine_memory_centralbank
*a)
1454
{
1455
if
(!(
iteration_loop
%60 == 0))
return
1;
1456
else
return
0;
1457
}
1458
1459
1465
int
FLAME_condition_centralbank_centralbank_compute_income_statement_CentralBankPolicy_CentralBankGovernmentRequests
(
xmachine_memory_centralbank
*a)
1466
{
1467
if
((
iteration_loop
%60 == 0))
return
1;
1468
else
return
0;
1469
}
1470
1471
1477
int
FLAME_condition_centralbank_idle_CentralBankHousing_CentralBankLabour
(
xmachine_memory_centralbank
*a)
1478
{
1479
if
(!(
iteration_loop
%20 == a->
day_of_month_to_act
))
return
1;
1480
else
return
0;
1481
}
1482
1483
1489
int
FLAME_condition_centralbank_centralbank_trace_housing_prices_CentralBankHousing_CentralBankLabour
(
xmachine_memory_centralbank
*a)
1490
{
1491
if
((
iteration_loop
%20 == a->
day_of_month_to_act
))
return
1;
1492
else
return
0;
1493
}
1494
1495
1501
int
FLAME_condition_jpoffice_idle_start_JPOfficeInitEmployment
(
xmachine_memory_jpoffice
*a)
1502
{
1503
if
((a->
it_no
== 0))
return
1;
1504
else
return
0;
1505
}
1506
1507
1513
int
FLAME_condition_jpoffice_idle_start_JPOfficeLoop
(
xmachine_memory_jpoffice
*a)
1514
{
1515
if
((a->
it_no
!= 0))
return
1;
1516
else
return
0;
1517
}
1518
1519
1525
int
FLAME_condition_jpoffice_idle_JPOLabourMarket_end
(
xmachine_memory_jpoffice
*a)
1526
{
1527
if
(!(
iteration_loop
%20 == a->
day_of_month_to_act
))
return
1;
1528
else
return
0;
1529
}
1530
1531
1537
int
FLAME_condition_jpoffice_jpoffice_labour_stage1_JPOLabourMarket_JPOLabourStage2
(
xmachine_memory_jpoffice
*a)
1538
{
1539
if
((
iteration_loop
%20 == a->
day_of_month_to_act
))
return
1;
1540
else
return
0;
1541
}
1542
1543
1549
int
FLAME_condition_mall_idle_MallConsumptionMarket_end
(
xmachine_memory_mall
*a)
1550
{
1551
if
(!(
iteration_loop
%5 == a->
day_of_week_to_act
))
return
1;
1552
else
return
0;
1553
}
1554
1555
1561
int
FLAME_condition_mall_mall_consumption_shopping_MallConsumptionMarket_MallConsumptionSummary
(
xmachine_memory_mall
*a)
1562
{
1563
if
((
iteration_loop
%5 == a->
day_of_week_to_act
))
return
1;
1564
else
return
0;
1565
}
1566
1567
1573
int
FLAME_condition_reagency_idle_REAgencyCreditPolicyChecks_end
(
xmachine_memory_reagency
*a)
1574
{
1575
if
(!(
iteration_loop
%60 == 0))
return
1;
1576
else
return
0;
1577
}
1578
1579
1585
int
FLAME_condition_reagency_reagency_check_interest_rate_REAgencyCreditPolicyChecks_end
(
xmachine_memory_reagency
*a)
1586
{
1587
if
((
iteration_loop
%60 == 0))
return
1;
1588
else
return
0;
1589
}
1590
1591
1597
int
FLAME_condition_reagency_idle_REAgencyHousingMarket_REAgencyCreditPolicyChecks
(
xmachine_memory_reagency
*a)
1598
{
1599
if
(!(
iteration_loop
%20 == a->
day_of_month_to_act
))
return
1;
1600
else
return
0;
1601
}
1602
1603
1609
int
FLAME_condition_reagency_reagency_housing_process_REAgencyHousingMarket_REAgencyHousingSummary
(
xmachine_memory_reagency
*a)
1610
{
1611
if
((
iteration_loop
%20 == a->
day_of_month_to_act
))
return
1;
1612
else
return
0;
1613
}
1614
1615
1616
1623
int
FLAME_filter_firm_firm_init_employment_FirmInitEmployment_FirmInitBalanceSheet_jpoffice_firm_employee
(
const
void
*msg,
const
void
*params)
1624
{
1625
//printf("**** FLAME_filter_firm_firm_init_employment_FirmInitEmployment_FirmInitBalanceSheet_jpoffice_firm_employee(const void *msg, const void *params)\n");
1626
1627
/* Cast the message pointer to the correct message type */
1628
m_jpoffice_firm_employee
*m = (
m_jpoffice_firm_employee
*)msg;
1629
/* Cast the params pointer to the correct agent type */
1630
xmachine_memory_firm
*a = (
xmachine_memory_firm
*)params;
1631
1632
/* The filter */
1633
if
((a->
id
== m->
firm_id
))
return
1;
1634
else
return
0;
1635
}
1636
1643
int
FLAME_filter_firm_firm_consumption_receive_sales_FirmReceiveSales_FirmConsumptionPrice_sold
(
const
void
*msg,
const
void
*params)
1644
{
1645
//printf("**** FLAME_filter_firm_firm_consumption_receive_sales_FirmReceiveSales_FirmConsumptionPrice_sold(const void *msg, const void *params)\n");
1646
1647
/* Cast the message pointer to the correct message type */
1648
m_sold
*m = (
m_sold
*)msg;
1649
/* Cast the params pointer to the correct agent type */
1650
xmachine_memory_firm
*a = (
xmachine_memory_firm
*)params;
1651
1652
/* The filter */
1653
if
((a->
id
== m->
id
))
return
1;
1654
else
return
0;
1655
}
1656
1663
int
FLAME_filter_firm_firm_labour_job_offer_stage1_FirmLabourStage1Application_FirmLabourStage1End_job_match_stage1
(
const
void
*msg,
const
void
*params)
1664
{
1665
//printf("**** FLAME_filter_firm_firm_labour_job_offer_stage1_FirmLabourStage1Application_FirmLabourStage1End_job_match_stage1(const void *msg, const void *params)\n");
1666
1667
/* Cast the message pointer to the correct message type */
1668
m_job_match_stage1
*m = (
m_job_match_stage1
*)msg;
1669
/* Cast the params pointer to the correct agent type */
1670
xmachine_memory_firm
*a = (
xmachine_memory_firm
*)params;
1671
1672
/* The filter */
1673
if
((a->
id
== m->
employer_id
))
return
1;
1674
else
return
0;
1675
}
1676
1683
int
FLAME_filter_firm_firm_labour_update_FirmLabourStage1End_FirmLabourStage2_job_change
(
const
void
*msg,
const
void
*params)
1684
{
1685
//printf("**** FLAME_filter_firm_firm_labour_update_FirmLabourStage1End_FirmLabourStage2_job_change(const void *msg, const void *params)\n");
1686
1687
/* Cast the message pointer to the correct message type */
1688
m_job_change
*m = (
m_job_change
*)msg;
1689
/* Cast the params pointer to the correct agent type */
1690
xmachine_memory_firm
*a = (
xmachine_memory_firm
*)params;
1691
1692
/* The filter */
1693
if
((a->
id
== m->
employer_id
))
return
1;
1694
else
return
0;
1695
}
1696
1703
int
FLAME_filter_firm_firm_labour_job_offer_stage2_FirmLabourStage2End_FirmConsumptionStart_job_match_stage2
(
const
void
*msg,
const
void
*params)
1704
{
1705
//printf("**** FLAME_filter_firm_firm_labour_job_offer_stage2_FirmLabourStage2End_FirmConsumptionStart_job_match_stage2(const void *msg, const void *params)\n");
1706
1707
/* Cast the message pointer to the correct message type */
1708
m_job_match_stage2
*m = (
m_job_match_stage2
*)msg;
1709
/* Cast the params pointer to the correct agent type */
1710
xmachine_memory_firm
*a = (
xmachine_memory_firm
*)params;
1711
1712
/* The filter */
1713
if
((a->
id
== m->
employer_id
))
return
1;
1714
else
return
0;
1715
}
1716
1723
int
FLAME_filter_firm_firm_credit_borrow_loans_1_FirmCreditLoanBorrow1_FirmCreditLoanBorrow2_bank_firm_loan_acknowledge_1
(
const
void
*msg,
const
void
*params)
1724
{
1725
//printf("**** FLAME_filter_firm_firm_credit_borrow_loans_1_FirmCreditLoanBorrow1_FirmCreditLoanBorrow2_bank_firm_loan_acknowledge_1(const void *msg, const void *params)\n");
1726
1727
/* Cast the message pointer to the correct message type */
1728
m_bank_firm_loan_acknowledge_1
*m = (
m_bank_firm_loan_acknowledge_1
*)msg;
1729
/* Cast the params pointer to the correct agent type */
1730
xmachine_memory_firm
*a = (
xmachine_memory_firm
*)params;
1731
1732
/* The filter */
1733
if
((a->
id
== m->
firm_id
))
return
1;
1734
else
return
0;
1735
}
1736
1743
int
FLAME_filter_firm_firm_credit_borrow_loans_2_FirmCreditLoanBorrow2_FirmCreditIlliquidityStatus_bank_firm_loan_acknowledge_2
(
const
void
*msg,
const
void
*params)
1744
{
1745
//printf("**** FLAME_filter_firm_firm_credit_borrow_loans_2_FirmCreditLoanBorrow2_FirmCreditIlliquidityStatus_bank_firm_loan_acknowledge_2(const void *msg, const void *params)\n");
1746
1747
/* Cast the message pointer to the correct message type */
1748
m_bank_firm_loan_acknowledge_2
*m = (
m_bank_firm_loan_acknowledge_2
*)msg;
1749
/* Cast the params pointer to the correct agent type */
1750
xmachine_memory_firm
*a = (
xmachine_memory_firm
*)params;
1751
1752
/* The filter */
1753
if
((a->
id
== m->
firm_id
))
return
1;
1754
else
return
0;
1755
}
1756
1763
int
FLAME_filter_firm_firm_credit_check_equityfund_investment_FirmCreditLiquidityRecheck_FirmCreditBankruptcy_fund_request_ack
(
const
void
*msg,
const
void
*params)
1764
{
1765
//printf("**** FLAME_filter_firm_firm_credit_check_equityfund_investment_FirmCreditLiquidityRecheck_FirmCreditBankruptcy_fund_request_ack(const void *msg, const void *params)\n");
1766
1767
/* Cast the message pointer to the correct message type */
1768
m_fund_request_ack
*m = (
m_fund_request_ack
*)msg;
1769
/* Cast the params pointer to the correct agent type */
1770
xmachine_memory_firm
*a = (
xmachine_memory_firm
*)params;
1771
1772
/* The filter */
1773
if
((a->
id
== m->
firm_id
))
return
1;
1774
else
return
0;
1775
}
1776
1783
int
FLAME_filter_firm_firm_housing_collect_sale_revenues_FirmHousingSell_FirmHousingPrice_sold_housing
(
const
void
*msg,
const
void
*params)
1784
{
1785
//printf("**** FLAME_filter_firm_firm_housing_collect_sale_revenues_FirmHousingSell_FirmHousingPrice_sold_housing(const void *msg, const void *params)\n");
1786
1787
/* Cast the message pointer to the correct message type */
1788
m_sold_housing
*m = (
m_sold_housing
*)msg;
1789
/* Cast the params pointer to the correct agent type */
1790
xmachine_memory_firm
*a = (
xmachine_memory_firm
*)params;
1791
1792
/* The filter */
1793
if
((a->
id
== m->
seller_id
))
return
1;
1794
else
return
0;
1795
}
1796
1803
int
FLAME_filter_household_household_init_employment_HouseholdInitEmployment_HouseholdInitBalanceSheet_jpoffice_household_employer
(
const
void
*msg,
const
void
*params)
1804
{
1805
//printf("**** FLAME_filter_household_household_init_employment_HouseholdInitEmployment_HouseholdInitBalanceSheet_jpoffice_household_employer(const void *msg, const void *params)\n");
1806
1807
/* Cast the message pointer to the correct message type */
1808
m_jpoffice_household_employer
*m = (
m_jpoffice_household_employer
*)msg;
1809
/* Cast the params pointer to the correct agent type */
1810
xmachine_memory_household
*a = (
xmachine_memory_household
*)params;
1811
1812
/* The filter */
1813
if
((a->
id
== m->
household_id
))
return
1;
1814
else
return
0;
1815
}
1816
1823
int
FLAME_filter_household_household_consumption_recieve_goods_HHConsumptionRecieveGoods_HHConsumptionMonthly_bought
(
const
void
*msg,
const
void
*params)
1824
{
1825
//printf("**** FLAME_filter_household_household_consumption_recieve_goods_HHConsumptionRecieveGoods_HHConsumptionMonthly_bought(const void *msg, const void *params)\n");
1826
1827
/* Cast the message pointer to the correct message type */
1828
m_bought
*m = (
m_bought
*)msg;
1829
/* Cast the params pointer to the correct agent type */
1830
xmachine_memory_household
*a = (
xmachine_memory_household
*)params;
1831
1832
/* The filter */
1833
if
((a->
id
== m->
id
))
return
1;
1834
else
return
0;
1835
}
1836
1843
int
FLAME_filter_household_household_labour_check_fired_HHLabourStart_HHLabourStage1_fired
(
const
void
*msg,
const
void
*params)
1844
{
1845
//printf("**** FLAME_filter_household_household_labour_check_fired_HHLabourStart_HHLabourStage1_fired(const void *msg, const void *params)\n");
1846
1847
/* Cast the message pointer to the correct message type */
1848
m_fired
*m = (
m_fired
*)msg;
1849
/* Cast the params pointer to the correct agent type */
1850
xmachine_memory_household
*a = (
xmachine_memory_household
*)params;
1851
1852
/* The filter */
1853
if
((a->
id
== m->
employee_id
))
return
1;
1854
else
return
0;
1855
}
1856
1863
int
FLAME_filter_household_household_labour_turnover_HHLabourStage2_HHConsumptionStart_job_match_stage1
(
const
void
*msg,
const
void
*params)
1864
{
1865
//printf("**** FLAME_filter_household_household_labour_turnover_HHLabourStage2_HHConsumptionStart_job_match_stage1(const void *msg, const void *params)\n");
1866
1867
/* Cast the message pointer to the correct message type */
1868
m_job_match_stage1
*m = (
m_job_match_stage1
*)msg;
1869
/* Cast the params pointer to the correct agent type */
1870
xmachine_memory_household
*a = (
xmachine_memory_household
*)params;
1871
1872
/* The filter */
1873
if
((a->
id
== m->
employee_id
))
return
1;
1874
else
return
0;
1875
}
1876
1883
int
FLAME_filter_household_household_labour_employment_HHLabourStage1Placement_HHConsumptionStart_job_match_stage2
(
const
void
*msg,
const
void
*params)
1884
{
1885
//printf("**** FLAME_filter_household_household_labour_employment_HHLabourStage1Placement_HHConsumptionStart_job_match_stage2(const void *msg, const void *params)\n");
1886
1887
/* Cast the message pointer to the correct message type */
1888
m_job_match_stage2
*m = (
m_job_match_stage2
*)msg;
1889
/* Cast the params pointer to the correct agent type */
1890
xmachine_memory_household
*a = (
xmachine_memory_household
*)params;
1891
1892
/* The filter */
1893
if
((a->
id
== m->
employee_id
))
return
1;
1894
else
return
0;
1895
}
1896
1903
int
FLAME_filter_household_household_labour_receive_wage_HHLabourPayroll_HHLabourEmploymentStatus_firm_household_wage_payment
(
const
void
*msg,
const
void
*params)
1904
{
1905
//printf("**** FLAME_filter_household_household_labour_receive_wage_HHLabourPayroll_HHLabourEmploymentStatus_firm_household_wage_payment(const void *msg, const void *params)\n");
1906
1907
/* Cast the message pointer to the correct message type */
1908
m_firm_household_wage_payment
*m = (
m_firm_household_wage_payment
*)msg;
1909
/* Cast the params pointer to the correct agent type */
1910
xmachine_memory_household
*a = (
xmachine_memory_household
*)params;
1911
1912
/* The filter */
1913
if
((a->
my_employer_id
== m->
firm_id
))
return
1;
1914
else
return
0;
1915
}
1916
1923
int
FLAME_filter_household_household_housing_collect_sale_revenue_HHHousingRevenue_HHHousingPrice_sold_housing
(
const
void
*msg,
const
void
*params)
1924
{
1925
//printf("**** FLAME_filter_household_household_housing_collect_sale_revenue_HHHousingRevenue_HHHousingPrice_sold_housing(const void *msg, const void *params)\n");
1926
1927
/* Cast the message pointer to the correct message type */
1928
m_sold_housing
*m = (
m_sold_housing
*)msg;
1929
/* Cast the params pointer to the correct agent type */
1930
xmachine_memory_household
*a = (
xmachine_memory_household
*)params;
1931
1932
/* The filter */
1933
if
((a->
id
== m->
seller_id
))
return
1;
1934
else
return
0;
1935
}
1936
1943
int
FLAME_filter_household_household_housing_buy_HHHousingBargain_HHHousingPrice_bought_housing
(
const
void
*msg,
const
void
*params)
1944
{
1945
//printf("**** FLAME_filter_household_household_housing_buy_HHHousingBargain_HHHousingPrice_bought_housing(const void *msg, const void *params)\n");
1946
1947
/* Cast the message pointer to the correct message type */
1948
m_bought_housing
*m = (
m_bought_housing
*)msg;
1949
/* Cast the params pointer to the correct agent type */
1950
xmachine_memory_household
*a = (
xmachine_memory_household
*)params;
1951
1952
/* The filter */
1953
if
((a->
id
== m->
buyer_id
))
return
1;
1954
else
return
0;
1955
}
1956
1963
int
FLAME_filter_bank_bank_init_loans_BankInitLoans_BankInitMortgages_firm_bank_init_loans
(
const
void
*msg,
const
void
*params)
1964
{
1965
//printf("**** FLAME_filter_bank_bank_init_loans_BankInitLoans_BankInitMortgages_firm_bank_init_loans(const void *msg, const void *params)\n");
1966
1967
/* Cast the message pointer to the correct message type */
1968
m_firm_bank_init_loans
*m = (
m_firm_bank_init_loans
*)msg;
1969
/* Cast the params pointer to the correct agent type */
1970
xmachine_memory_bank
*a = (
xmachine_memory_bank
*)params;
1971
1972
/* The filter */
1973
if
((a->
id
== m->
bank_id
))
return
1;
1974
else
return
0;
1975
}
1976
1983
int
FLAME_filter_bank_bank_init_mortgages_BankInitMortgages_BankInitDeposits_household_bank_init_mortgages
(
const
void
*msg,
const
void
*params)
1984
{
1985
//printf("**** FLAME_filter_bank_bank_init_mortgages_BankInitMortgages_BankInitDeposits_household_bank_init_mortgages(const void *msg, const void *params)\n");
1986
1987
/* Cast the message pointer to the correct message type */
1988
m_household_bank_init_mortgages
*m = (
m_household_bank_init_mortgages
*)msg;
1989
/* Cast the params pointer to the correct agent type */
1990
xmachine_memory_bank
*a = (
xmachine_memory_bank
*)params;
1991
1992
/* The filter */
1993
if
((a->
id
== m->
bank_id
))
return
1;
1994
else
return
0;
1995
}
1996
2003
int
FLAME_filter_bank_bank_init_deposits_BankInitDeposits_BankInitBalanceSheet_household_bank_init_deposit
(
const
void
*msg,
const
void
*params)
2004
{
2005
//printf("**** FLAME_filter_bank_bank_init_deposits_BankInitDeposits_BankInitBalanceSheet_household_bank_init_deposit(const void *msg, const void *params)\n");
2006
2007
/* Cast the message pointer to the correct message type */
2008
m_household_bank_init_deposit
*m = (
m_household_bank_init_deposit
*)msg;
2009
/* Cast the params pointer to the correct agent type */
2010
xmachine_memory_bank
*a = (
xmachine_memory_bank
*)params;
2011
2012
/* The filter */
2013
if
((a->
id
== m->
bank_id
))
return
1;
2014
else
return
0;
2015
}
2016
2023
int
FLAME_filter_bank_bank_init_deposits_BankInitDeposits_BankInitBalanceSheet_firm_bank_init_deposit
(
const
void
*msg,
const
void
*params)
2024
{
2025
//printf("**** FLAME_filter_bank_bank_init_deposits_BankInitDeposits_BankInitBalanceSheet_firm_bank_init_deposit(const void *msg, const void *params)\n");
2026
2027
/* Cast the message pointer to the correct message type */
2028
m_firm_bank_init_deposit
*m = (
m_firm_bank_init_deposit
*)msg;
2029
/* Cast the params pointer to the correct agent type */
2030
xmachine_memory_bank
*a = (
xmachine_memory_bank
*)params;
2031
2032
/* The filter */
2033
if
((a->
id
== m->
bank_id
))
return
1;
2034
else
return
0;
2035
}
2036
2043
int
FLAME_filter_bank_bank_update_deposits_BankUpdateDeposits_BankCreditPolicyChecks_household_bank_update_deposit
(
const
void
*msg,
const
void
*params)
2044
{
2045
//printf("**** FLAME_filter_bank_bank_update_deposits_BankUpdateDeposits_BankCreditPolicyChecks_household_bank_update_deposit(const void *msg, const void *params)\n");
2046
2047
/* Cast the message pointer to the correct message type */
2048
m_household_bank_update_deposit
*m = (
m_household_bank_update_deposit
*)msg;
2049
/* Cast the params pointer to the correct agent type */
2050
xmachine_memory_bank
*a = (
xmachine_memory_bank
*)params;
2051
2052
/* The filter */
2053
if
((a->
id
== m->
bank_id
))
return
1;
2054
else
return
0;
2055
}
2056
2063
int
FLAME_filter_bank_bank_update_deposits_BankUpdateDeposits_BankCreditPolicyChecks_firm_bank_update_deposit
(
const
void
*msg,
const
void
*params)
2064
{
2065
//printf("**** FLAME_filter_bank_bank_update_deposits_BankUpdateDeposits_BankCreditPolicyChecks_firm_bank_update_deposit(const void *msg, const void *params)\n");
2066
2067
/* Cast the message pointer to the correct message type */
2068
m_firm_bank_update_deposit
*m = (
m_firm_bank_update_deposit
*)msg;
2069
/* Cast the params pointer to the correct agent type */
2070
xmachine_memory_bank
*a = (
xmachine_memory_bank
*)params;
2071
2072
/* The filter */
2073
if
((a->
id
== m->
bank_id
))
return
1;
2074
else
return
0;
2075
}
2076
2083
int
FLAME_filter_bank_bank_credit_process_loan_requests_1_BankCreditRequest1_BankCreditRequest2_firm_bank_loan_request_1
(
const
void
*msg,
const
void
*params)
2084
{
2085
//printf("**** FLAME_filter_bank_bank_credit_process_loan_requests_1_BankCreditRequest1_BankCreditRequest2_firm_bank_loan_request_1(const void *msg, const void *params)\n");
2086
2087
/* Cast the message pointer to the correct message type */
2088
m_firm_bank_loan_request_1
*m = (
m_firm_bank_loan_request_1
*)msg;
2089
/* Cast the params pointer to the correct agent type */
2090
xmachine_memory_bank
*a = (
xmachine_memory_bank
*)params;
2091
2092
/* The filter */
2093
if
((a->
id
== m->
bank_id
))
return
1;
2094
else
return
0;
2095
}
2096
2103
int
FLAME_filter_bank_bank_credit_process_loan_requests_2_BankCreditRequest2_BankCreditLoanWriteOffs_firm_bank_loan_request_2
(
const
void
*msg,
const
void
*params)
2104
{
2105
//printf("**** FLAME_filter_bank_bank_credit_process_loan_requests_2_BankCreditRequest2_BankCreditLoanWriteOffs_firm_bank_loan_request_2(const void *msg, const void *params)\n");
2106
2107
/* Cast the message pointer to the correct message type */
2108
m_firm_bank_loan_request_2
*m = (
m_firm_bank_loan_request_2
*)msg;
2109
/* Cast the params pointer to the correct agent type */
2110
xmachine_memory_bank
*a = (
xmachine_memory_bank
*)params;
2111
2112
/* The filter */
2113
if
((a->
id
== m->
bank_id
))
return
1;
2114
else
return
0;
2115
}
2116
2123
int
FLAME_filter_bank_bank_credit_recieve_loan_writeoffs_BankCreditLoanWriteOffs_BankCreditNewEntrants_loan_writeoff
(
const
void
*msg,
const
void
*params)
2124
{
2125
//printf("**** FLAME_filter_bank_bank_credit_recieve_loan_writeoffs_BankCreditLoanWriteOffs_BankCreditNewEntrants_loan_writeoff(const void *msg, const void *params)\n");
2126
2127
/* Cast the message pointer to the correct message type */
2128
m_loan_writeoff
*m = (
m_loan_writeoff
*)msg;
2129
/* Cast the params pointer to the correct agent type */
2130
xmachine_memory_bank
*a = (
xmachine_memory_bank
*)params;
2131
2132
/* The filter */
2133
if
((a->
id
== m->
bank_id
))
return
1;
2134
else
return
0;
2135
}
2136
2143
int
FLAME_filter_bank_bank_credit_recieve_loan_writeoffs_BankCreditLoanWriteOffs_BankCreditNewEntrants_firm_bank_insolvent_account
(
const
void
*msg,
const
void
*params)
2144
{
2145
//printf("**** FLAME_filter_bank_bank_credit_recieve_loan_writeoffs_BankCreditLoanWriteOffs_BankCreditNewEntrants_firm_bank_insolvent_account(const void *msg, const void *params)\n");
2146
2147
/* Cast the message pointer to the correct message type */
2148
m_firm_bank_insolvent_account
*m = (
m_firm_bank_insolvent_account
*)msg;
2149
/* Cast the params pointer to the correct agent type */
2150
xmachine_memory_bank
*a = (
xmachine_memory_bank
*)params;
2151
2152
/* The filter */
2153
if
((a->
id
== m->
bank_id
))
return
1;
2154
else
return
0;
2155
}
2156
2163
int
FLAME_filter_bank_bank_credit_recieve_new_entrant_loan_requests_BankCreditNewEntrants_BankCreditLoanInterests_new_entrant_loan
(
const
void
*msg,
const
void
*params)
2164
{
2165
//printf("**** FLAME_filter_bank_bank_credit_recieve_new_entrant_loan_requests_BankCreditNewEntrants_BankCreditLoanInterests_new_entrant_loan(const void *msg, const void *params)\n");
2166
2167
/* Cast the message pointer to the correct message type */
2168
m_new_entrant_loan
*m = (
m_new_entrant_loan
*)msg;
2169
/* Cast the params pointer to the correct agent type */
2170
xmachine_memory_bank
*a = (
xmachine_memory_bank
*)params;
2171
2172
/* The filter */
2173
if
((a->
id
== m->
bank_id
))
return
1;
2174
else
return
0;
2175
}
2176
2183
int
FLAME_filter_bank_bank_credit_collect_loan_interests_BankCreditLoanInterests_BankHousingMarket_firm_bank_interest_on_loan
(
const
void
*msg,
const
void
*params)
2184
{
2185
//printf("**** FLAME_filter_bank_bank_credit_collect_loan_interests_BankCreditLoanInterests_BankHousingMarket_firm_bank_interest_on_loan(const void *msg, const void *params)\n");
2186
2187
/* Cast the message pointer to the correct message type */
2188
m_firm_bank_interest_on_loan
*m = (
m_firm_bank_interest_on_loan
*)msg;
2189
/* Cast the params pointer to the correct agent type */
2190
xmachine_memory_bank
*a = (
xmachine_memory_bank
*)params;
2191
2192
/* The filter */
2193
if
((a->
id
== m->
bank_id
))
return
1;
2194
else
return
0;
2195
}
2196
2203
int
FLAME_filter_bank_bank_housing_deliver_mortages_BankHousingCrediting_BankHousingSales_mortgage_requests
(
const
void
*msg,
const
void
*params)
2204
{
2205
//printf("**** FLAME_filter_bank_bank_housing_deliver_mortages_BankHousingCrediting_BankHousingSales_mortgage_requests(const void *msg, const void *params)\n");
2206
2207
/* Cast the message pointer to the correct message type */
2208
m_mortgage_requests
*m = (
m_mortgage_requests
*)msg;
2209
/* Cast the params pointer to the correct agent type */
2210
xmachine_memory_bank
*a = (
xmachine_memory_bank
*)params;
2211
2212
/* The filter */
2213
if
((a->
id
== m->
bank_id
))
return
1;
2214
else
return
0;
2215
}
2216
2223
int
FLAME_filter_bank_bank_housing_recieve_mortgage_principals_BankHousingSales_BankHousingMortgages_mortgage_payment_from_sale
(
const
void
*msg,
const
void
*params)
2224
{
2225
//printf("**** FLAME_filter_bank_bank_housing_recieve_mortgage_principals_BankHousingSales_BankHousingMortgages_mortgage_payment_from_sale(const void *msg, const void *params)\n");
2226
2227
/* Cast the message pointer to the correct message type */
2228
m_mortgage_payment_from_sale
*m = (
m_mortgage_payment_from_sale
*)msg;
2229
/* Cast the params pointer to the correct agent type */
2230
xmachine_memory_bank
*a = (
xmachine_memory_bank
*)params;
2231
2232
/* The filter */
2233
if
((a->
id
== m->
bank_id
))
return
1;
2234
else
return
0;
2235
}
2236
2243
int
FLAME_filter_bank_bank_housing_recieve_mortgages_BankHousingMortgages_BankHousingWriteOff_mortgage_payment
(
const
void
*msg,
const
void
*params)
2244
{
2245
//printf("**** FLAME_filter_bank_bank_housing_recieve_mortgages_BankHousingMortgages_BankHousingWriteOff_mortgage_payment(const void *msg, const void *params)\n");
2246
2247
/* Cast the message pointer to the correct message type */
2248
m_mortgage_payment
*m = (
m_mortgage_payment
*)msg;
2249
/* Cast the params pointer to the correct agent type */
2250
xmachine_memory_bank
*a = (
xmachine_memory_bank
*)params;
2251
2252
/* The filter */
2253
if
((a->
id
== m->
bank_id
))
return
1;
2254
else
return
0;
2255
}
2256
2263
int
FLAME_filter_bank_bank_housing_debt_writeoff_BankHousingWriteOff_BankUpdateDeposits_mortgage_writeoff
(
const
void
*msg,
const
void
*params)
2264
{
2265
//printf("**** FLAME_filter_bank_bank_housing_debt_writeoff_BankHousingWriteOff_BankUpdateDeposits_mortgage_writeoff(const void *msg, const void *params)\n");
2266
2267
/* Cast the message pointer to the correct message type */
2268
m_mortgage_writeoff
*m = (
m_mortgage_writeoff
*)msg;
2269
/* Cast the params pointer to the correct agent type */
2270
xmachine_memory_bank
*a = (
xmachine_memory_bank
*)params;
2271
2272
/* The filter */
2273
if
((a->
id
== m->
bank_id
))
return
1;
2274
else
return
0;
2275
}
2276
2277
2278
int
FLAME_sort_jpoffice_jpoffice_init_employment_JPOfficeInitEmployment_JPOfficeLoop_household_jpoffice_id
(
const
void
*x,
const
void
*y)
2279
{
2280
if
( ((
m_household_jpoffice_id
*)x)->household_id < ((
m_household_jpoffice_id
*)y)->household_id )
return
-1;
2281
else
if
( ((
m_household_jpoffice_id
*)x)->household_id > ((
m_household_jpoffice_id
*)y)->household_id )
return
1;
2282
else
return
0;
2283
}
2284
int
FLAME_sort_jpoffice_jpoffice_init_employment_JPOfficeInitEmployment_JPOfficeLoop_firm_jpoffice_id
(
const
void
*x,
const
void
*y)
2285
{
2286
if
( ((
m_firm_jpoffice_id
*)x)->firm_id < ((
m_firm_jpoffice_id
*)y)->firm_id )
return
-1;
2287
else
if
( ((
m_firm_jpoffice_id
*)x)->firm_id > ((
m_firm_jpoffice_id
*)y)->firm_id )
return
1;
2288
else
return
0;
2289
}
2290
int
FLAME_sort_jpoffice_jpoffice_labour_stage1_JPOLabourMarket_JPOLabourStage2_vacancy_stage1
(
const
void
*x,
const
void
*y)
2291
{
2292
if
( ((
m_vacancy_stage1
*)x)->wage > ((
m_vacancy_stage1
*)y)->wage )
return
-1;
2293
else
if
( ((
m_vacancy_stage1
*)x)->wage < ((
m_vacancy_stage1
*)y)->wage )
return
1;
2294
else
return
0;
2295
}
2296
int
FLAME_sort_jpoffice_jpoffice_labour_stage1_JPOLabourMarket_JPOLabourStage2_job_application_stage1
(
const
void
*x,
const
void
*y)
2297
{
2298
if
( ((
m_job_application_stage1
*)x)->employee_id < ((
m_job_application_stage1
*)y)->employee_id )
return
-1;
2299
else
if
( ((
m_job_application_stage1
*)x)->employee_id > ((
m_job_application_stage1
*)y)->employee_id )
return
1;
2300
else
return
0;
2301
}
2302
int
FLAME_sort_jpoffice_jpoffice_labour_stage2_JPOLabourStage2_end_vacancy_stage2
(
const
void
*x,
const
void
*y)
2303
{
2304
if
( ((
m_vacancy_stage2
*)x)->wage > ((
m_vacancy_stage2
*)y)->wage )
return
-1;
2305
else
if
( ((
m_vacancy_stage2
*)x)->wage < ((
m_vacancy_stage2
*)y)->wage )
return
1;
2306
else
return
0;
2307
}
2308
int
FLAME_sort_jpoffice_jpoffice_labour_stage2_JPOLabourStage2_end_job_application_stage2
(
const
void
*x,
const
void
*y)
2309
{
2310
if
( ((
m_job_application_stage2
*)x)->employee_id < ((
m_job_application_stage2
*)y)->employee_id )
return
-1;
2311
else
if
( ((
m_job_application_stage2
*)x)->employee_id > ((
m_job_application_stage2
*)y)->employee_id )
return
1;
2312
else
return
0;
2313
}
2314
int
FLAME_sort_mall_mall_consumption_shopping_MallConsumptionMarket_MallConsumptionSummary_sell
(
const
void
*x,
const
void
*y)
2315
{
2316
if
( ((
m_sell
*)x)->price < ((
m_sell
*)y)->price )
return
-1;
2317
else
if
( ((
m_sell
*)x)->price > ((
m_sell
*)y)->price )
return
1;
2318
else
return
0;
2319
}
2320
int
FLAME_sort_reagency_reagency_housing_process_REAgencyHousingMarket_REAgencyHousingSummary_sell_housing
(
const
void
*x,
const
void
*y)
2321
{
2322
if
( ((
m_sell_housing
*)x)->price < ((
m_sell_housing
*)y)->price )
return
-1;
2323
else
if
( ((
m_sell_housing
*)x)->price > ((
m_sell_housing
*)y)->price )
return
1;
2324
else
return
0;
2325
}
2326
Generated on Tue Apr 8 2014 13:25:20 for ICEACE Model: Closed Economy by
1.8.3.1