Intervention#

class Intervention(*args, eligibility=None, **kwargs)[source]#

Bases: Module

Base class for interventions.

The key method of the intervention is step(), which is called with the sim on each timestep.

Attributes

now

Return the current time, i.e. the time vector at the current timestep.

states

Return a flat list of all states

statesdict

Return a flat dictionary (objdict) of all states

Methods

check_eligibility()[source]#

Return an array of indices of agents eligible for screening at time t