sequence#

class sequence(days, interventions, **kwargs)[source]#

Bases: Intervention

This is an example of a meta-intervention which switches between a sequence of interventions.

Parameters:
  • days (list) – the days on which to start applying each intervention

  • interventions (list) – the interventions to apply on those days

  • kwargs (dict) – passed to Intervention()

Example:

interv = cv.sequence(days=[10, 51], interventions=[
            cv.test_num(n_tests=[100]*npts),
            cv.test_prob(symptomatic_prob=0.2, asymptomatic_prob=0.002),
        ])

Methods

initialize(sim)[source]#

Fix the dates

apply(sim)[source]#

Find the matching day, and see which intervention to activate