2121onlyplots = False # if True, only plots are generated, if False, first data is generated and then plots
2222derivative = "dP" # dP: derivative with respect to PrEP adoption, dH: derivative with respect to risk awareness
2323
24- which_c = 8
24+ which_c = 9
25+ which_xi = 0
2526
2627sets_of_c = jnp .array ([
2728 [31.0 , 40.0 , 60.0 , 203.0 ],
3233 [2.0 , 80.0 , 53.3 , 200.0 ],
3334 [2.0 , 63.5 , 100.0 , 200.0 ], #6
3435 [75 , 39 , 18.5 , 2 ], #7
35- [10.0 , 50.0 , 120.0 , 190.0 ] #8
36+ [10.0 , 50.0 , 120.0 , 190.0 ], #8
37+ [50.0 , 50.0 , 50.0 , 50.0 ] #9
38+ ])
39+ sets_of_xi = jnp .array ([
40+ [0.0 , 0.0 , 0.0 , 0.0 ],
41+ [0.8 , 0.6 , 0.4 , 0.2 ], #1
42+ [0.2 , 0.4 , 0.6 , 0.8 ] #2
3643])
3744
3845
@@ -71,6 +78,7 @@ def calc_Nreal(H, P, lambdaP, betaSTI):
7178 args_mod ["lambda_P" ] = lambdaP
7279 args_mod ["beta_STI" ] = betaSTI
7380 args_mod ["c" ] = sets_of_c [which_c ]
81+ args_mod ["xi" ] = sets_of_xi [which_xi ] # partial mitigation for people on PrEP
7482
7583 # run the model fro 80 years (long time to get to steady state)
7684 output = icomo .diffeqsolve (args = args_mod , ODE = bigmodel_STI .main_model , y0 = y0 , ts_out = np .linspace (0 , 365 * 80 , 365 * 80 + 1 ), max_steps = 365 * 80 + 1 )
@@ -137,7 +145,7 @@ def calc_Nobs(H, P, lambdaP, betaSTI):
137145 # save stuff as npy files
138146
139147 with open (
140- "../results/Nreal_Nobs_bigmodel_lambdap%g_betaSTI%g_dN%s_c%s.npy" % (lambdaP * 360 , betaSTI , derivative , which_c ),"wb" ,) as f :
148+ "../results/Nreal_Nobs_bigmodel_lambdap%g_betaSTI%g_dN%s_c%s_xi% s.npy" % (lambdaP * 360 , betaSTI , derivative , which_c , which_xi ),"wb" ,) as f :
141149 np .save (f , Ps )
142150 np .save (f , Hs )
143151 np .save (f , dNrealdP )
@@ -198,7 +206,7 @@ def discretize_cmaps(cmap, N):
198206 res = []
199207 for lambdaP in lambda_P_values :
200208 # load data
201- with open ("../results/Nreal_Nobs_bigmodel_lambdap%g_betaSTI%g_dN%s_c%s.npy" % (lambdaP * 360 , betaSTI , derivative , which_c ),"rb" ) as f :
209+ with open ("../results/Nreal_Nobs_bigmodel_lambdap%g_betaSTI%g_dN%s_c%s_xi% s.npy" % (lambdaP * 360 , betaSTI , derivative , which_c , which_xi ),"rb" ) as f :
202210 Ps_plot = np .load (f )
203211 Hs_plot = np .load (f )
204212 dNrealdP_plot = np .load (f )
@@ -268,4 +276,4 @@ def discretize_cmaps(cmap, N):
268276#plt.tight_layout()
269277#plt.show()
270278
271- fig .savefig ("../figures/final_figure_withinflux_bigmodel_DERIVATIVES_dN%s_c%s.pdf" % (derivative , which_c ), format = "pdf" , bbox_inches = "tight" )
279+ fig .savefig ("../figures/final_figure_withinflux_bigmodel_DERIVATIVES_dN%s_c%s_xi% s.pdf" % (derivative , which_c , which_xi ), format = "pdf" , bbox_inches = "tight" )
0 commit comments