-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathcamp_params.py
More file actions
58 lines (45 loc) · 2.09 KB
/
camp_params.py
File metadata and controls
58 lines (45 loc) · 2.09 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
from scipy.stats import poisson
from network_utils import create_grid
from stats_utils import sample_population
##### MORIA CAMP PARAMETERS #####
# Total number of people
n_pop = 18700
# Sample the population age, and parameter rates
sample_pop = sample_population(n_pop, "data/augmented_population.csv")
# Grid info for isoboxes
dims_isoboxes = (29, 28) # 812
# Grid info for tents
dims_block1 = (20, 67) # 1340
dims_block2 = (53, 15) # 795
dims_block3 = (19, 28) # 532
# Isoboxes
pop_isoboxes = 8100
pop_per_isobox = 10
n_isoboxes = dims_isoboxes[0]*dims_isoboxes[1]
# Tents
n_tents = 2650
pop_tents = 10600
pop_per_tent = 4
# Others
n_bathrooms = 144
n_ethnic_groups = 8
# We define neighboring structures within a range of 2 in the structure grid
proximity = 2
# Define the maximum population per structures (tents and isoboxes) drawn from a poisson distribution
max_pop_per_struct_isoboxes = list(poisson.rvs(mu=pop_per_isobox, size=n_isoboxes))
max_pop_per_struct_block1 = list(poisson.rvs(mu=pop_per_tent, size=dims_block1[0]*dims_block1[1]))
max_pop_per_struct_block2 = list(poisson.rvs(mu=pop_per_tent, size=dims_block2[0]*dims_block2[1]))
max_pop_per_struct_block3 = list(poisson.rvs(mu=pop_per_tent, size=dims_block3[0]*dims_block3[1]))
max_pop_per_struct = max_pop_per_struct_isoboxes\
+ max_pop_per_struct_block1\
+ max_pop_per_struct_block2\
+ max_pop_per_struct_block3
n_structs = len(max_pop_per_struct)
grid_isoboxes = create_grid(dims_isoboxes[0], dims_isoboxes[1], 0)
grid_block1 = create_grid(dims_block1[0], dims_block1[1], grid_isoboxes[-1][-1] + 1)
grid_block2 = create_grid(dims_block2[0], dims_block2[1], grid_block1[-1][-1] + 1)
grid_block3 = create_grid(dims_block3[0], dims_block3[1], grid_block2[-1][-1] + 1)
household_weight = 0.98 # Edge weight for connections within each structure
neighbor_weight = 0.017 # Edge weight for friendship connections
neighbor_proximity = 2 # The radius of nearby structures whose inhabitants a person has connections with
food_weight = 0.407 # Edge weight for connections in the food queue