metawards.utils.iterate

metawards.utils.iterate(network: metawards._network.Network, population: metawards._population.Population, infections: metawards._infections.Infections, rngs, nthreads: int, get_advance_functions, profiler: metawards.utils._profiler.Profiler = None)[source]

Advance the infection by one day for the passed Network, acting on the passed Population.

Parameters:
  • network (Network) – The network in which the disease outbreak will be modelled
  • population (Population) – The population experiencing the outbreak. This contains an overview of the current population, plus the day and date of the outbreak
  • infections (Infections) – Space in which the infections are recorded
  • rngs – List of the thread-safe random number generators (one per thread)
  • nthreads (int) – The number of threads over which to parallelise the calculation
  • get_advance_functions (function) – This is a function that should return the set of “advance_XXX” functions that will be applied as part of this iteration
  • profiler (Profiler) – The profiler to use to profile this calculation. Pass “None” if you want to disable profiling