initialize analyzers
@@ -981,15 +981,17 @@ class Scenarios(cvb.ParsObj):
scen_sim.scenkey = scenkey
scen_sim.label = scenname
- scen_sim.update_pars(scenpars) # Update the parameters, if provided
+ # Update the parameters, if provided, and re-initialize aspects of the simulation
+ scen_sim.update_pars(scenpars)
scen_sim.validate_pars()
if 'interventions' in scenpars:
scen_sim.init_interventions()
+ if 'analyzers' in scenpars:
+ scen_sim.init_analyzers()
if 'variants' in scenpars: # Process variants
scen_sim.init_variants()
+ if 'variants' in scenpars or 'imm_pars' in scenpars: # Process immunity
scen_sim.init_immunity(create=True)
- elif 'imm_pars' in scenpars: # Process immunity
- scen_sim.init_immunity(create=True) # TODO: refactor
run_args = dict(n_runs=self['n_runs'], noise=self['noise'], noisepar=self['noisepar'], keep_people=keep_people, verbose=verbose)
if debug:
