bucky.model.main#

The main module handling the simulation.

Module Contents#

Classes#

buckyModelCovid

Class that handles one full simulation (both time integration and managing MC states).

Functions#

main(cfg=None)

Main method for a complete simulation called with a set of CLI args.

class bucky.model.main.buckyModelCovid(cfg, npi_file=None, disable_npi=False, reject_runs=False, output_dir=None)[source]#

Class that handles one full simulation (both time integration and managing MC states).

static calc_lagged_rate(var1, var2, lag, mean_days, rollup_func=None)[source]#

WIP.

load_data(self, data_dir, fit_cfg, force_diag_Aij, force_start_date)[source]#

Load the historical data and calculate all the variables that are static across MC runs.

postprocess_run(self, sol, epi_params, seed, columns=None)[source]#

Process the output of a run (sol, returned by the integrator) into the requested output vars.

reset(self)[source]#

Reset the state of the model and generate new inital data from a new random seed.

run_multiple(self, n_mc, base_seed=42, out_columns=None, invalid_ret=None)[source]#

Perform multiple monte carlos and return their postprocessed results.

run_once(self, seed=None)[source]#

Perform one complete run of the simulation.

save_run(self, sol, epi_params, seed)[source]#

Postprocess and write to disk the output of run_once.

static set_seed(seed=None)[source]#

Seed all the relevent PRNGS.

bucky.model.main.main(cfg=None)[source]#

Main method for a complete simulation called with a set of CLI args.