Housing API
- class minos.modules.housing.Housing[source]
- calculate_housing(pop)[source]
Calculate housing transition distribution based on provided people/indices.
- Parameters:
pop (pd.DataFrame) – The population dataframe.
- on_time_step(event)[source]
Produces new children and updates parent status on time steps.
- Parameters:
event (vivarium.population.PopulationEvent) – The event time_step that called this function.
- plot(pop, config)[source]
Default plot method for modules. Does nothing.
Modules can specify another plot object that saves distributions of state.
- Parameters:
pop_data (population data from vivarium. Whatever columns needs plotting.) –
config (vivarium.configTree) – Config yaml for any needed plot parameters.
- Return type:
None
- setup(builder)[source]
Initialise the module during simulation.setup().
Notes
Load in data from pre_setup
Register any value producers/modifiers for death rate
Add required columns to population data frame
Add listener event to check if people die on each time step.
Update other required items such as randomness stream.
Parameter
- buildervivarium.engine.Builder
Vivarium’s control object. Stores all simulation metadata and allows modules to use it.