BaseTreatment#
- class BaseTreatment(product=None, prob=None, eligibility=None, **kwargs)[source]#
Bases:
Intervention
Base treatment class.
- Parameters:
product (str/Product) – the treatment product to use
prob (float/arr) – probability of treatment aong those eligible
eligibility (inds/callable) – indices OR callable that returns inds
kwargs (dict) – passed to Intervention()
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
- get_accept_inds()[source]#
Get indices of people who will acccept treatment; these people are then added to a queue or scheduled for receiving treatment