MetaWards.mixers API Detail

Functions

InteractionMatrix(n[, value])

This is an interaction matrix, which is used to control how the FOIs of different demographics are merged together.

merge_evenly(network, nthreads, profiler, ...)

This merge_function merges the FOIs across all demographic sub-networks evenly.

merge_using_matrix(network, nthreads, ...)

This merge_function merges the FOIs across all demographic sub-networks according to the interaction matrix stored in networks.demographics.interaction_matrix.

merge_matrix_single_population(network, ...)

This merge_function merges the FOIs across all demographic sub-networks according to the interaction matrix stored in networks.demographics.interaction_matrix, using the total number of people across all demographics summed, so as to better model populations that mix completely.

merge_matrix_multi_population(network, ...)

This merge_function merges the FOIs across all demographic sub-networks according to the interaction matrix stored in networks.demographics.interaction_matrix, using the number of people in each demographic separately, so as to better model demographics that have different contact parameters.

mix_custom(custom_function, stage, **kwargs)

This returns the default list of 'merge_XXX' functions that are called in sequence for each iteration of the model run.

mix_default(**kwargs)

This is the default mixer.

mix_evenly(stage, network, **kwargs)

This mixer will evenly mix all demographics.

mix_none(**kwargs)

This mixer will perform no mixing.

mix_evenly_single_population(stage, network, ...)

This mixer will evenly mix all demographics, assuming that they are all part of the same population.

mix_evenly_multi_population(stage, network, ...)

This mixer will evenly mix all demographics using a matrix of [1] using merge_matrix_multi_population.

mix_none_single_population(stage, network, ...)

This mixer will mix demographics assuming no infection between demographics, but assuming that they are all part of the same population, and so normalising by the total number of individuals across all demographics

mix_none_multi_population(stage, network, ...)

This mixer will is equivalent to mix_none, in that it will not allow infections to be mixed between demographics, and it will normalise by the number of individuals in each demographic.