-
Notifications
You must be signed in to change notification settings - Fork 1
/
particle_simulation_config.py
102 lines (78 loc) · 1.88 KB
/
particle_simulation_config.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
82
83
84
85
86
87
88
89
90
91
import sys
import os
import numpy as np
class STAT():
E = 0 # 易感
A0 = 1 # 不传染潜伏
A1 = 2 # 传染潜伏
S = 3 # 传染发病
Q = 4 # 确诊隔离/医疗介入
R = 5 # 恢复不易感
D = 6 # 死亡
population_init = {
STAT.E : 999900,
STAT.A0 : 100,
STAT.A1 : 0,
STAT.S : 0,
STAT.Q : 0,
STAT.R : 0,
STAT.D : 0
}
class PARA():
# A1 infection rate
beta_A1 = 0.3
# S infection rate
beta_S = 0.1
# A0 to A1, R, Q
A0_to_A1 = 0.9
A0_to_R = 0.1
A0_to_Q = 0.0
# A0 to A1 time distribution
mu_A0_to_A1 = 2
sg_A0_to_A1 = 0.5
# A0 to R time distribution
mu_A0_to_R = 14
sg_A0_to_R = 3
# A0 to Q time distribution
mu_A0_to_Q = 6
sg_A0_to_Q = 2
# A0 to D time distribution
mu_A0_to_D = 25
sg_A0_to_D = 10
# A1 to S, Q, R
A1_to_S = 0.8
A1_to_Q = 0.00
A1_to_R = 0.2
# A1 to S time distribution
mu_A1_to_S = 5
sg_A1_to_S = 3
# A1 to Q time distribution
mu_A1_to_Q = 6
sg_A1_to_Q = 2
# There is no A1 to R time distribution,
# because the time are accumulated from A0 status
# S to Q, R, D
S_to_Q = 0.8
S_to_R = (1 - S_to_Q) * 0.96
S_to_D = (1 - S_to_Q) * 0.04
# S to Q time distribution
mu_S_to_Q = 1
sg_S_to_Q = 0.5
# There is no S to R/D time distribution,
# because the time are accumulated from A0 status.
# Q to R, D
Q_to_R = 0.99
Q_to_D = 1 - Q_to_R
# There is no Q to R/D time distribution,
# because the time are accumulated from A0 status
# But, medical treatment will make life longer, and recovery time shorter
Q_longer_D = 1.5
Q_shorter_R = 0.9
# population density (0~1)
# It has a positive correlation with unhealthy population percent
# and death rate, in "tanh" formula. tanh(4)=0.999, tanh(2)=0.96
# Pln_den_high - (Pln_den_high-Pln_den_low) * tanh(2*unhealthy_percent/unhealthy_max + 2*death_rate/death_rate_max)
Pln_den_high = 1
Pln_den_low = 0.1
unhealthy_prt_max = 0.01
death_rate_max = 0.02