-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
29 lines (25 loc) · 804 Bytes
/
main.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
import model
import time
"""
Comment
"""
# --- EVOLUTION FACTORS
immunityRate = .1 # percentage of people immune
fatalityRate = .6 # chance of dying vs recovering (becoming immune)
maxDistance = 2050 # kilometers per day an average person in Africa can travel:
transmissionRate = .5 # chance you'll infect a given person you come in contact with
# --- CREATE MODEL
print("Creating model...")
name = "ebola2015"
dataFile = "data/nodes.dat"
m = model.Model(name, dataFile, immunityRate, fatalityRate, maxDistance, transmissionRate)
# --- START MODEL
m.startEpidemic()
print("Starting turns...")
runName = "RUN"
for i in range(0, 2):
start = time.time()
m.turn()
if i % 1 == 0:
m.dump(runName, i)
print("Finished turn {0} in {1:.2f} seconds.".format(i, time.time() - start))