-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixing bugs encountered while working on scenario modeling #389
Conversation
* Reworked sir_vaccine to modify rel_sus instead of moving agents from susceptible to recovered. * n_years no longer necessarily an integer * yearvec had an extra year * Convert network keys to lowercase * In Interventions, CampaignDelivery now is just discrete timepoints. Interpolation and annual_prob options removed. Fixed timepoints as `ss.true` functionality differs in Starsim than previous models, now using sc.findnearest. * Also in Interventions, adding `coverage_dist` to BasicVaccination, which was missing.
self.ti_dead[dead_uids] = sim.ti + dur_inf[will_die] / sim.dt # Consider rand round, but not CRN safe | ||
self.ti_recovered[rec_uids] = sim.ti + dur_inf[~will_die] / sim.dt |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be //
?
starsim/sim.py
Outdated
@@ -188,7 +188,7 @@ def init_time_vecs(self): | |||
""" | |||
Construct vectors things that keep track of time | |||
""" | |||
self.yearvec = sc.inclusiverange(start=self.pars.start, stop=self.pars.end + 1 - self.pars.dt, | |||
self.yearvec = sc.inclusiverange(start=self.pars.start, stop=self.pars.end - self.pars.dt, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Much as I love Sciris, this has evolved into a very convoluted way to replicate the behavior of np.arange(self.pars.start, self.pars.end, self.pars.dt)!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the previous version was correct, based on the comment "# Includes all the timepoints in the last year".
ss.true
functionality differs in Starsim than previous models, now using sc.findnearest.coverage_dist
to BasicVaccination, which was missing.