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

frac_last_n_vals(arr, n, axis=0, offset=0)

Return the last n values along an axis of an array; if n is a float, include the fractional amount of the int(n)-1 element

get_runid()

Gets a UUID based of the current datatime and caches it

main(args=None)

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

class bucky.model.main.buckyModelCovid(debug=False, sparse_aij=False, t_max=None, graph_file=None, par_file=None, npi_file=None, disable_npi=False, reject_runs=False)[source]

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

estimate_reporting(self, g_data, params, cfr, days_back=14, case_lag=None, min_deaths=100.0)[source]

Estimate the case reporting rate based off observed vs. expected CFR

load_graph(self, graph_file)[source]

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

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

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

reset(self, seed=None, params=None)[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)[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, base_filename, seed, output_queue)[source]

Postprocess and write to disk the output of run_once

update_params(self, update_dict)[source]
bucky.model.main.frac_last_n_vals(arr, n, axis=0, offset=0)[source]

Return the last n values along an axis of an array; if n is a float, include the fractional amount of the int(n)-1 element

bucky.model.main.get_runid()[source]

Gets a UUID based of the current datatime and caches it

bucky.model.main.main(args=None)[source]

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