BaseTreatment#
- class BaseTreatment(product=None, prob=None, eligibility=None, **kwargs)[source]#
Bases:
InterventionBase 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
has_productCheck if the intervention has a product
nowShortcut to self.t.now()
statesReturn a flat list of all states
statesdictReturn a flat dictionary (objdict) of all states
tiGet the current module timestep
timevecShortcut to self.t.timevec
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