-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtb_states.h
More file actions
77 lines (67 loc) · 1.76 KB
/
Copy pathtb_states.h
File metadata and controls
77 lines (67 loc) · 1.76 KB
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
/*
* tb_states.h
*
* Created on: 17 Oct 2011
* Author: nathan
*/
#ifndef TB_STATES_H_
#define TB_STATES_H_
#include "simutils.h"
#include "state.h"
namespace microsimulator {
class StateActiveTb : public State
{
public:
enum Parameter {
ACTIVE_TB_RISK,
ACTIVE_TB_CURE
};
StateActiveTb(
StateParameter active_tb_risk=
StateParameter(0.01, YEAR),
StateParameter active_tb_cure=
StateParameter(0.7, YEAR));
virtual void registerRequiredState(string stateName, int stateIndex);
virtual void prepare(double timePeriod) throw(SimulationException);
virtual double transition(double value, StateVector& states,
IndividualVector& individuals, Individual& individual);
protected:
StateParameter active_tb_risk_;
StateParameter active_tb_cure_;
int aliveStateIndex_;
int numberActiveTbIndex_;
};
class StateAlive : public State
{
public:
enum Parameter {
AGE_0_60,
AGE_61,
TB_RISK_AGE_0_60,
TB_RISK_AGE_61
};
StateAlive(
StateParameter age_0_60=
StateParameter(0.001, YEAR),
StateParameter age_61=
StateParameter(0.2, YEAR),
StateParameter tb_risk_age_0_60=
StateParameter(0.7, YEAR),
StateParameter tb_risk_age_61=
StateParameter(0.8, YEAR)
);
virtual void registerRequiredState(string stateName, int stateIndex);
virtual void prepare(double timePeriod) throw(SimulationException);
double transition(double value, StateVector& states,
IndividualVector& individuals, Individual& individual);
protected:
StateParameter age_0_60_;
StateParameter age_61_;
StateParameter tb_risk_age_0_60_;
StateParameter tb_risk_age_61_;
int ageStateIndex_;
int aliveStateIndex_;
int tbStateIndex_;
};
}
#endif /* TB_STATES_H_ */