Skip to content

Commit

Permalink
some prints
Browse files Browse the repository at this point in the history
  • Loading branch information
cefect committed Mar 23, 2020
1 parent a36a6c6 commit 44b10da
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
8 changes: 4 additions & 4 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,17 +193,17 @@ def run(pars, #parameter files
for indxr, sname in enumerate([
#'NoNPI',
#'SouthKorea',
#'Reduced',
'BI1918'
'Reduced',
#'BI1918'
]):
print('\n \nrun %i: %s \n \n'%(indxr, sname))

try:
run({
0:'placeholder',
1: 10000, #number of s imulations
1: 2, #number of s imulations
2: sname,
3: 5, #number of threadas
3: 2, #number of threadas
})
except Exception as e:
print('FAILED on %s w/ \n%s'%(sname, e))
Expand Down
11 changes: 8 additions & 3 deletions setup_fix01.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ def __init__(self, s):

# time from symptom onset to recovery per compartiment
self.gamma = np.random.uniform(1/6, 1/2.6, s.nbetas) * n_Icomp # range of serial from 8.2 to 6.5
if 'Red' in s.setup_name: self.gamma = np.random.uniform(1/4.1, 1/2.6, s.nbetas) * n_Icomp
if 'Red' in s.setup_name:
self.gamma = np.random.uniform(1/4.1, 1/2.6, s.nbetas) * n_Icomp

if 'low' in s.setup_name: self.R0s = np.random.uniform(.6, 1.3, s.nbetas) # np.random.uniform(1.5, 2, nbetas)
if 'mid' in s.setup_name: self.R0s = np.random.uniform(2, 3, s.nbetas)
Expand Down Expand Up @@ -125,12 +126,16 @@ def parameters_quick_draw(s, npi):
sigma = 1/5.2
n_Icomp = 3
gamma = np.random.uniform(1/6, 1/2.6) * n_Icomp # range of serial from 8.2 to 6.5
if 'Red' in s.setup_name: gamma = np.random.uniform(1/4.1, 1/2.6) * n_Icomp
if 'Red' in s.setup_name:
gamma = np.random.uniform(1/4.1, 1/2.6) * n_Icomp

if 'low' in s.setup_name: R0s = np.random.uniform(1.5, 2) # np.random.uniform(1.5, 2, nbetas)
if 'mid' in s.setup_name: R0s = np.random.uniform(2, 3)
if 'mid' in s.setup_name:
R0s = np.random.uniform(2, 3)

if 'South' in s.setup_name: R0s = np.random.uniform(.6, 1.3)

print('gamma=%.2f, R0=%.2f'%(gamma, R0s))
beta = np.multiply(R0s, gamma) / n_Icomp
#print(beta, gamma, sigma)

Expand Down

0 comments on commit 44b10da

Please sign in to comment.