pandemia.components.movement_model.default_movement_model
Default random location selection.
Module Contents
Classes
Default model of agent movement. |
Attributes
- pandemia.components.movement_model.default_movement_model.log
- class pandemia.components.movement_model.default_movement_model.DefaultMovementModel(config)
Bases:
pandemia.components.movement_model.MovementModelDefault model of agent movement.
Uses random sampling to select locations in response to activity changes. When an agent n selects a new activity a, a new location is chosen for them at random from the array activity_locations[n][a]. If weighted sampling is used, then the random choice is made using the weights contained in the array activity_location_weights[n][a]. Location closures are also implemented here, which can be used to represent, for example, lockdowns. The wearing of facemasks is also determined here, since the wearing of facemasks is assumed to depend on the location type and activity of agents.
Parameters:
- configConfig
A Pandemia Config object. A sub-config of the full config, containing the data used to configure this component.
- vectorize_component(vector_region)
Initializes numpy arrays associated to this component.
- initial_conditions(vector_region, offset)
Establish initial location of each agent.
- update(vector_region, t)
Updates related to movement.
- dynamics(vector_region, t, offset, ticks_in_week)
Changes related to movement.