pandemia.sim_factory

Builds a Simulator object. The SimulationFactory object builds a Simulator object gradually, by adding the various model layers and components.

Module Contents

Classes

SimulationFactory

Class that allows for gradual composition of a number of components, eventually outputting

Attributes

log

pandemia.sim_factory.log
class pandemia.sim_factory.SimulationFactory(config: pandemia.config.Config, vector_world: pandemia.world.VectorWorld)

Class that allows for gradual composition of a number of components, eventually outputting a Simulator object that can be used to run simulations with the given config.

set_clock(clock: pandemia.clock.Clock) None

Sets clock

set_seasonal_effects_model(seasonal_effects_model: pandemia.components.seasonal_effects_model.SeasonalEffectsModel) None

Sets seasonal effects model

set_health_model(health_model: pandemia.components.health_model.HealthModel) None

Sets health model

set_movement_model(movement_model: pandemia.components.movement_model.MovementModel) None

Sets movement model

set_hospitalization_and_death_model(hospitalization_and_death_model: pandemia.components.hospitalization_and_death_model.HospitalizationAndDeathModel) None

Sets hospitalization and death model

set_testing_and_contact_tracing_model(testing_and_contact_tracing_model: pandemia.components.testing_and_contact_tracing_model.TestingAndContactTracingModel) None

Sets testing and contact tracing model

set_vaccination_model(vaccination_model: pandemia.components.vaccination_model.VaccinationModel) None

Sets vaccination model

set_travel_model(travel_model: pandemia.components.travel_model.TravelModel) None

Sets regional mixing model

set_policy_maker_model(policy_maker_model: pandemia.components.policy_maker_model.PolicyMakerModel) None

Sets seasonal effects model

build_clock()

Builds the simulation clock

build_components()

The model also features a number of components, representing agent mobility, health and number of other features. There is also a scale factor, which can be used to rescale the numbers of tests and vaccine doses given as input, the numbers of agents travelling between the regions, and the final output.

build_reporters(telemetry_bus)

Instantiates reporters, which record output data on the simulation for analysis

new_sim(telemetry_bus)

Return a new simulator based on the given config.

Telemetry data will be sent to the telemetry_bus provided (of type MessageBus)