pandemia.components.travel_model.default_travel_model

Default regional mixing model

Module Contents

Classes

DefaultTravelModel

Default model of mixing between regions.

Attributes

log

pandemia.components.travel_model.default_travel_model.log
class pandemia.components.travel_model.default_travel_model.DefaultTravelModel(config, scale_factor, number_of_strains, vector_world)

Bases: pandemia.components.travel_model.TravelModel

Default model of mixing between regions.

Each day, a number of agents are selected from each region to travel to each other region. The numbers travelling between regions are given by the matrix agents_travelling_matrix. The destination of the travellers is recorded using the array current_region. Agents outside their home region are typically ignored by other components while they are travelling. Only uninfected agents can travel, but such agents can become infected whlie travelling. The probability that they become infected is given in terms of the average infectiousness of their destination region. The border closure intervention is also implemented here.

Parameters:

configConfig

A Pandemia Config object. A sub-config of the full config, containing the data used to configure this component.

scale_factorfloat

The scale factor, coming from the full config.

number_of_strainsint

The number of strains appearing the model.

vector_worldVectorWorld

A Pandemia VectorWorld object, containing the relevant regions.

vectorize_component(vector_region)

Initializes numpy arrays associated to this component.

initial_conditions(sim)

Initial conditions for travel model.

dynamics(sim, day, ticks_in_day, facemask_transmission_multiplier, mutation_matrix, enable_parallel, num_jobs, vector_region_batches)

Travel dynamics resulting in infection and health updates.