ryansmcgee / seirsplus

Models of SEIRS epidemic dynamics with extensions, including network-structured populations, testing, contact tracing, and social distancing.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Contact tracing makes it worse??

gizemt opened this issue · comments

commented

In the network model, just increasing phi_E and phi_I (test rate when a close contact has tested positive) seems to increase the number of cases. I feel like this should never happen. My first guess is self.numI[self.tidx] in models.py-ln 693 should be self.numI[self.tidx] - self.numD_I[self.tidx] but not sure.

Initial parameters
time=300 beta =2.4/12.39 sigma =1/4.58 gamma =1/12.39 mu_I =0.0004 mu_0 =0 nu =0 xi =0 p =0.5 Q =G_quarantine beta_D =beta sigma_D =sigma gamma_D =gamma mu_D =0.0004 theta_E =0 theta_I =0 phi_E =0 phi_I =0 psi_E =1.0, psi_I =1.0 q =0.05 initI =numNodes/100 initE =0 initD_E =0 initD_I =0 initR =0 initF =0

Checkpoints-1
{'t': [21, 42, 100], 'G': [G_distancing, G_distancing, G_normal], 'p': [0.1 , 0.1, 0.5 ], 'theta_E': [0.02, 0.1, 0.02], 'theta_I': [0.02, 0.1, 0.02], 'phi_E': [0.6 , 0.6, 0.6 ], 'phi_I': [0.6 , 0.6, 0.6]}

Checkpoints-2
{'t': [21, 42, 100], 'G': [G_distancing, G_distancing, G_normal], 'p': [0.1 , 0.1, 0.5 ], 'theta_E': [0.02, 0.1, 0.02], 'theta_I': [0.02, 0.1, 0.02], 'phi_E': [0.6 , 0.85, 0.85 ], 'phi_I': [0.6 , 0.85, 0.85 ]}

Result with Checkpoints-1
Simulation time is set to 300 but it ends around 150, indicating there are no cases left.
image

Results with Checkpoints-2
image

Thank you for raising this issue. After looking into your example I discovered that an internal flag tracing_scenario was not being updated when tracing parameters were updated from zero to non-zero values using checkpoints. The purpose of this flag is to skip a matrix operation related to contact tracing when tracing rates are zero, but not updating this flag means that tracing wasn't being correctly computed when tracing starts at a checkpoint. This had the effect of underestimating what the effect of tracing should be in these checkpoint cases. This issue has been fixed and pushed.

Here are the results I get for your scenarios after the fix. The figure shows results corresponding to results using checkpoints2 (colored) overlaid on results using checkpoints1. (gray)
Figure_2