change_people_state#
- class change_people_state(state_name, new_val, years=None, eligibility=None, prop=1.0, annual=False, **kwargs)[source]#
Bases:
InterventionIntervention to modify values of a People’s boolean state at one specific point in time.
- Parameters:
state_name (string) – name of the People’s state that will be modified
new_val (bool, float) – the new state value eligible people will have
years (list, float) – The year we want to start the intervention. if years is None, uses start and end years of sim as defaults if years is a number or a list with a single element, eg, 2000.5, or [2000.5], this is interpreted as the start year of the intervention, and the end year of intervention will be the end of the simulation
eligibility (inds/callable) – indices OR callable that returns inds
prop (float) – a value between 0 and 1 indicating the x% of eligible people who will have the new state value
annual (bool) – whether the increase, prop, represents a “per year” increase, or per time step
Attributes
auto_state_listList of "automatic" states with boolean type (ss.BoolState) that were added via define_states()
dtGet the current module timestep
has_productCheck if the intervention has a product
nowShortcut to self.t.now()
state_dictReturn a flat dictionary (objdict) of all states
state_listReturn a flat list of all states (ss.Arr objects)
tiGet the current module timestep
timevecShortcut to self.t.timevec
Methods