change_beta#

class change_beta(days, changes, layers=None, **kwargs)[source]#

Bases: Intervention

The most basic intervention – change beta (transmission) by a certain amount on a given day or days. This can be used to represent physical distancing (although clip_edges() is more appropriate for overall changes in mobility, e.g. school or workplace closures), as well as hand-washing, masks, and other behavioral changes that affect transmission rates.

Parameters:
  • days (int/arr) – the day or array of days to apply the interventions

  • changes (float/arr) – the changes in beta (1 = no change, 0 = no transmission)

  • layers (str/list) – the layers in which to change beta (default: all)

  • kwargs (dict) – passed to Intervention()

Examples:

interv = cv.change_beta(25, 0.3) # On day 25, reduce overall beta by 70% to 0.3
interv = cv.change_beta([14, 28], [0.7, 1], layers='s') # On day 14, reduce beta by 30%, and on day 28, return to 1 for schools

Methods

initialize(sim)[source]#

Fix days and store beta