-
Notifications
You must be signed in to change notification settings - Fork 5
/
conf.py
98 lines (71 loc) · 2.69 KB
/
conf.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
92
93
94
95
96
97
98
import numpy as np
# world size
world_width = 1600
world_height = 600
draw_scale = 1
do_plot = False
# the population graph is updated every plot_interval ticks
plot_interval = 60
do_record = False
# number of maximum ticks
max_t = 2000
# start coordinates of the infected agent
infection_start = [600, 400]
agent_size = 10 # visual size of agent
infection_dist = 10 # distance for infection
agent_num = 100 # initial number of agents
plot_ymax = 200
agent_speed = 6.0 # movement speed of agents
recovery_time = 500 # ticks after infection until agent recovers
infection_p = 0.25
# set death probabilities overall
death_p_health_system_overall = 0.05
death_p_no_health_system_overall = 0.25
# calculate death probabilities per tick
death_p_health_system = -1/recovery_time * np.log(1-death_p_health_system_overall)
death_p_no_health_system = -1/recovery_time * np.log(1-death_p_no_health_system_overall)
health_system_capacity = 20 # number of agents that can be treated in hospitals
agent_types = [
# "irresponsible type"
{
"leave_home_p": 0.02, # probability to leave a 'home' (place_type=0) place an collision
"leave_gathering_p": 0.1, # probability to leave a 'gathering' (place_type=1) place an collision
"color": None
},
# "responsible type"
{
"leave_home_p": 0.001, # probability to leave a 'home' (place_type=0) place an collision
"leave_gathering_p": 0.5, # probability to leave a 'gathering' (place_type=1) place an collision
"color": (250, 210, 0)
}
]
agent_type_ratio = 0.5 # proportion of agents of agent_type = 0
color_agent_types = True
# agent colors for uninfected, infected, recovered and dead
agent_colors = [(140, 140, 240), (240, 130, 130), (120, 200, 120), (60, 60, 60)]
obstacle_color = (200, 200, 200)
home_color = (240, 240, 240)
gathering_color = (210, 210, 210)
# definition of obstacle boundaries
obstacle_dims = []
#obstacle_dims.append([390, 410, 0, world_height/2-30])
#obstacle_dims.append([390, 410, world_height/2+30, world_height])
# definition of place types and boundaries
place_dims = []
place_type = []
place_dims.append([450, 750, 250, 550])
place_type.append(1)
place_dims.append([850, 1150, 250, 550])
place_type.append(1)
for i in range(8):
for j in range(1):
place_dims.append([50 + i * 200, 150 + i * 200, 50 + j * 600, 150 + j * 600])
place_type.append(0)
for i in range(2):
for j in range(2):
place_dims.append([50 + i * 200, 150 + i * 200, 250 + j * 200, 350 + j * 200])
place_type.append(0)
for i in range(2):
for j in range(2):
place_dims.append([1250 + i * 200, 1350 + i * 200, 250 + j * 200, 350 + j * 200])
place_type.append(0)