metawards.utils.run_models¶
-
metawards.utils.
run_models
(network: metawards._network.Network, variables: metawards._variableset.VariableSets, population: metawards._population.Population, nprocs: int, nthreads: int, seed: int, nsteps: int, output_dir: metawards._outputfiles.OutputFiles, iterator: str, extractor: str, profile: bool, parallel_scheme: str)[source]¶ Run all of the models on the passed Network that are described by the passed VariableSets
Parameters: - network (Network) – The network to model
- variables (VariableSets) – The sets of VariableSet that represent all of the model runs to perform
- population (Population) – The initial population for all of the model runs. This also contains the starting date and day for the model outbreak
- nprocs (int) – The number of model runs to perform in parallel
- nthreads (int) – The number of threads to parallelise each model run over
- seed (int) – Random number seed which is used to generate random seeds for all model runs
- nsteps (int) – The maximum number of steps to perform for each model - this will run until the outbreak is over if this is None
- output_dir (OutputFiles) – The OutputFiles that represents the directory in which all output should be placed
- iterator (str) – Iterator to load that will be used to iterate the outbreak
- extractor (str) – Extractor to load that will be used to extract information
- profile (bool) – Whether or not to profile the model run and print out live timing (useful for performance debugging)
- parallel_scheme (str) – Which parallel scheme (multiprocessing, mpi4py or scoop) to use to run multiple model runs in parallel