The Disease Model
This module contains a state machine driver for disease models. Its primary function is to provide coordination across a set of disease states and transitions at simulation initialization and during transitions.
- class vivarium_public_health.disease.model.DiseaseModel(cause, initial_state=None, get_data_functions=None, cause_type='cause', **kwargs)[source]
- Parameters:
- property columns_created: List[str]
Provides names of columns created by the component.
- Returns:
Names of the columns created by this component, or an empty list if none.
- Return type:
List[str]
- property columns_required: List[str] | None
Provides names of columns required by the component.
- Returns:
Names of required columns not created by this component. An empty list means all available columns are needed. None means no additional columns are necessary.
- Return type:
Optional[List[str]]
- property initialization_requirements: Dict[str, List[str]]
Provides the names of all values required by this component during simulant initialization.
- property transition_names: List[TransitionString]
- setup(builder)[source]
Perform this component’s setup.
- Parameters:
builder (Builder) –
- Return type:
None
- on_initialize_simulants(pop_data)[source]
Method that vivarium will run during simulant initialization.
This method is intended to be overridden by subclasses if there are operations they need to perform specifically during the simulant initialization phase.
- Parameters:
pop_data (SimulantData) – The data associated with the simulants being initialized.
- Return type:
None
- on_time_step(event)[source]
Method that vivarium will run during the time_step event.
This method is intended to be overridden by subclasses if there are operations they need to perform specifically during the time_step event.
- Parameters:
event (Event) – The event object associated with the time_step event.
- Return type:
None
- on_time_step_cleanup(event)[source]
Method that vivarium will run during the time_step__cleanup event.
This method is intended to be overridden by subclasses if there are operations they need to perform specifically during the time_step__cleanup event.
- Parameters:
event (Event) – The event object associated with the time_step__cleanup event.
- Return type:
None