metawards.utils.run_model

metawards.utils.run_model(network: metawards._network.Network, infections: metawards._infections.Infections, rngs, s: int, output_dir: metawards._outputfiles.OutputFiles, population: metawards._population.Population = Population(initial=57104043, susceptibles=0, latent=0, total=0, recovereds=0, n_inf_wards=0, scale_uv=1.0, day=0, date=None), nsteps: int = None, profile: bool = True, profiler: metawards.utils._profiler.Profiler = None, nthreads: int = None, iterator=None, extractor=None)[source]

Actually run the model… Real work happens here. The model will run until completion or until ‘nsteps’ have been completed (whichever happens first)

network: Network
The network on which to run the model
infections: Infections
The space used to record the infections
rngs: list
The list of random number generators to use, one per thread
population: Population
The initial population at the start of the model outbreak. This is also used to set the date and day of the start of the model outbreak
seed: int
The random number seed used for this model run. If this is None then a very random random number seed will be used
output_dir: OutputFiles
The directory to write all of the output into
nsteps: int
The maximum number of steps to run in the outbreak. If None then run until the outbreak has finished
profile: bool
Whether or not to profile the model run and print out the results
profiler: Profiler
The profiler to use to profile - a new one is created if one isn’t passed
s: int
Index of the seeding parameter to use
nthreads: int
Number of threads over which to parallelise this model run
iterator: function
Function that will be used to dynamically get the functions that will be used at each iteration to advance the model. Any additional files or parameters needed by these functions should be included in the network.params object.
extractor: function
Function that will be used to dynamically get the functions that will be used at each iteration to extract data from the model run
trajectory: Populations
The trajectory of the population for every day of the model run