completely forgot about how r0 was defined in this model
@@ -327,14 +327,12 @@ class Sim(ParsObj):
if t == self['intervene']: # TODO: allow multiple interventions
if verbose>=1:
print(f'Implementing intervention on day {t}...')
- for person in self.people.values():
- person['contacts'] = float(person['contacts']*(1-self['intervention_eff']))
+ self['r0'] *= (1-self['intervention_eff'])
if t == self['unintervene']:
if verbose>=1:
print(f'Removing intervention on day {t}...')
- for person in self.people.values():
- person['contacts'] = float(person['contacts']/(1-self['intervention_eff']))
+ self['r0'] /= (1-self['intervention_eff'])
# Compute cumulative results
