MetaWards.iterators API Detail

Functions

advance_additional(nthreads, **kwargs) Advance the infection by infecting additional wards based on a pre-determined pattern based on the additional seeds (parallel version)
advance_additional_omp(**kwargs) Advance the infection by infecting additional wards based on a pre-determined pattern based on the additional seeds (parallel version)
advance_fixed(nthreads, **kwargs) Advance the model by triggering infections related to fixed ‘work’ movements (parallel version of the function)
advance_fixed_omp(network, infections, rngs, …) Advance the model by triggering infections related to fixed ‘work’ movements (parallel version of the function)
advance_foi(nthreads, **kwargs) Advance the model calculating the new force of infection (foi) for all of the wards and links between wards, based on the current number of infections.
advance_foi_omp(network, population, …) Advance the model calculating the new force of infection (foi) for all of the wards and links between wards, based on the current number of infections.
advance_imports(nthreads, **kwargs) Advance the model by importing additional infections depending on the additional seeds specified by the user and the day of the outbreak (serial version of the function)
advance_imports_omp(network, population, …) Advance the model by importing additional infections depending on the additional seeds specified by the user and the day of the outbreak (serial version of the function)
advance_infprob(nthreads, **kwargs) Advance the calculation of the day and night infection probabilities for each ward.
advance_infprob_omp(network, nthreads, …) Advance the calculation of the day and night infection probabilities for each ward.
advance_play(nthreads, **kwargs) Advance the model by triggering infections related to random ‘play’ movements (parallel version of the function)
advance_play_omp(network, infections, rngs, …) Advance the model by triggering infections related to random ‘play’ movements (parallel version of the function)
advance_recovery(nthreads, **kwargs) Advance the model by processing recovery of individual through the different stages of the disease (parallel version of the function))
advance_recovery_omp(network, infections, …) Advance the model by processing recovery of individual through the different stages of the disease (parallel version of the function))
build_custom_iterator(custom_function[, …]) Build and return a custom iterator from the passed function.
iterate_custom(custom_function[, setup]) This returns the default list of ‘advance_XXX’ functions that are called in sequence for each iteration of the model run.
iterate_default([setup]) This returns the default list of ‘advance_XXX’ functions that are called in sequence for each iteration of the model run.
iterate_weekday(nthreads, **kwargs) This returns the default list of ‘advance_XXX’ functions that are called in sequence for each weekday iteration of the model run.
iterate_weekend(nthreads, **kwargs) This returns the default list of ‘advance_XXX’ functions that are called in sequence for each weekend iteration of the model run.
iterate_working_week(population, **kwargs) This returns the default list of ‘advance_XXX’ functions that are called in sequence for each iteration of the model run.
iterator_needs_setup(iterator) Return whether or not the passed iterator function has a “setup” argument, and thus needs to be setup before it can be used
setup_additional_seeds(network, profiler, …) Setup function that reads in the additional seeds held in params.additional_seeds and puts them ready to be used by advance_additional to import additional infections at specified times in specified wards during the outbreak
setup_seed_all_wards(network, population, …) Seed the wards with an initial set of infections, assuming an ‘expected’ number of infected people out of a population of ‘population’, based on the number of daily imports held in params.daily_imports
setup_seed_specified_ward(network, …) Setup function that sets up the Network by seeding the infection at the ward specified by looking up the ward index from network.to_seed using index params.ward_seed_index
setup_seed_wards(network, **kwargs) Seed the wards with an initial infection.