-
Notifications
You must be signed in to change notification settings - Fork 2
/
const.py
81 lines (66 loc) · 1.79 KB
/
const.py
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
78
79
80
81
STATES = ('S', 'E', 'I', 'M', 'O', 'H')
NUM_STATES = len(STATES)
NUM_TRANS = 7
COLORS = ['green', 'orange', 'red', 'pink', 'gray', 'blue']
class STATE:
S = 0 # susceptible
E = 1 # exposed without symptom
I = 2 # infected and with symptom
M = 3 # with medical care
O = 4 # out of system, dead or cured
H = 5 # maximum number of beds in hospital
all_states = ('S', 'E', 'I', 'M', 'O', 'H')
num_states = len(all_states)
colors = ['green', 'orange', 'red', 'pink', 'gray', 'blue']
state2color = {
S: 'green',
E: 'orange',
I: 'red',
M: 'pink',
O: 'gray',
H: 'blue'
}
class TRANS:
S2E = 0
E2I = 1
I2M = 2
I2O = 3
M2O = 4
EbyE = 5
EbyI = 6
num_trans = 7
class STATE_VAC:
S = 0 # susceptible
E = 1 # exposed without symptom
I = 2 # infected and with symptom
M = 3 # with medical care
O = 4 # out of system, dead or cured
V = 5 # vaccinated (but not taking effect yet)
V1 = 6 # vaccinated but can transmit virus
V2 = 7 # vaccinated and cannot transmit virus
EV1 = 8 # V1 after becoming infected (without any symptom)
H = 9 # maximum number of beds in hospital
all_states = ('S', 'E', 'I', 'M', 'O') + ('V', 'V1', 'V2', 'EV1') + ('H', )
num_states = len(all_states)
colors = ['green', 'orange', 'red', 'pink', 'gray', 'blue']
state2color = {
S: 'green',
E: 'orange',
I: 'red',
M: 'pink',
O: 'gray',
H: 'blue',
V: 'violet',
V1: 'magenta',
V2: 'cyan',
EV1: 'purple'
}
class TRANS_VAC(TRANS):
S2V = 7
V2S = 8
V_to_V1 = 9
V_to_V2 = 10
V1_to_EV1 = 11
EV1_to_R = 12
V2_to_R = 13
num_trans = TRANS.num_trans + 7