Scenarios#
- class Scenarios(pars=None, repeats=None, scens=None, **kwargs)[source]#
Bases:
prettyobj
Run different intervention scenarios.
A “scenario” can be thought of as a list of sims, all with the same parameters except for the random seed. Usually, scenarios differ from each other only in terms of the interventions run (to compare other differences between sims, it’s preferable to use a MultiSim object).
- Parameters:
pars (dict) – parameters to pass to the sim
repeats (int) – how many repeats of each scenario to run (default: 1)
scens (list) – the list of scenarios to run; see also
fp.make_scen()
andScenarios.add_scen()
kwargs (dict) – optional additional parameters to pass to the sim
Example:
scen1 = fp.make_scen(label='Baseline') scen2 = fp.make_scen(year=2002, eff={'Injectables':0.99}) # Basic efficacy scenario scens = fp.Scenarios(location='test', repeats=2, scens=[scen1, scen2]) scens.run()
Methods
- make_sims(scenlabel, **kwargs)[source]#
Create a list of sims that are all identical except for the random seed
- plot(to_plot=None, plot_sims=True, **kwargs)[source]#
Plot the scenarios with bands – see
sim.plot()
for args