EventSchedule#

class EventSchedule[source]#

Bases: Intervention

Run functions on different days

This intervention is a a kind of generalization of dynamic_pars to allow more flexibility in triggering multiple, arbitrary operations and to more easily assemble multiple changes at different times. This intervention can be used to implement scale-up or other changes to interventions without needing to implement time-dependency in the intervention itself.

To use the intervention, simply index the intervention by t or by date.

Example:

>>> iv = EventSchedule()
>>> iv[1] = lambda sim: print(sim.t)
>>> iv['2020-04-02'] = lambda sim: print('foo')

Methods