Simpact Cyan
Population based event driven simulation using mNRM
hazardutility.h
1 #ifndef HAZARDUTILITY_H
2 
3 #define HAZARDUTILITY_H
4 
5 /*
6  hazard = exp[ a0 + a1*Pi + a2*Pj + a3*|Pi - Pj| + a4*(A_i+A_j)/2 + a5*|Ai-Aj-Dp| + b*tdiff]
7 
8  Ai(t) = t-tBi
9  Pi,Pj = number of partners
10  tBi,tBj = birth date
11  tdiff = t-tr
12  tr = time at which relationship between persons became possible
13  a0,...,a5,Dp,b: constants
14  a0: baseline_factor
15  a1: male_current_relations_factor
16  a2: female_current_relations_factor
17  a3: current_relations_difference_factor
18  a4: mean_age_factor
19  a5: age_difference_factor
20  Dp: preferred_age_difference
21  b: last_change_factor
22 */
23 
24 class Person;
25 
26 double ExponentialHazardToInternalTime(const Person *pPerson1, const Person *pPerson2, double t0, double dt, double tr,
27  double a0, double a1, double a2, double a3, double a4,
28  double a5, double Dp, double b);
29 double ExponentialHazardToRealTime(const Person *pPerson1, const Person *pPerson2, double t0, double Tdiff, double tr,
30  double a0, double a1, double a2, double a3, double a4,
31  double a5, double Dp, double b);
32 
33 #endif // HAZARDUTILITY_H