change_par#
- class change_par(par, years=None, vals=None, verbose=False)[source]#
Bases:
Intervention
Change a parameter at a specified point in time.
- Parameters:
par (str) – the parameter to change
years (float/arr) – the year(s) at which to apply the change
vals (any) – a value or list of values to change to (if a list, must have the same length as years); or a dict of year:value entries
If any value is
'reset'
, reset to the original value.Example:
ec0 = fp.change_par(par='exposure_factor', years=[2000, 2010], vals=[0.0, 2.0]) # Reduce exposure factor ec0 = fp.change_par(par='exposure_factor', vals={2000:0.0, 2010:2.0}) # Equivalent way of writing sim = fp.Sim(interventions=ec0).run()
Methods