built_environment_with_households¶
- class pyrecodes.system.built_environment_with_households.BuiltEnvironmentWithHouseholds(system_configuration: dict, component_library: dict, system_creator)¶
Bases:
BuiltEnvironment- component_in_town(component)¶
Returns True if the component is in town.
- create_system()¶
Creates the system based on the provided SystemCreator object.
- households_decide() None¶
Run household decisions, sequentially or in parallel depending on ASYNC_MODE.
- households_move()¶
- load_as_pickle(loadname='./system_object.pickle')¶
Loads the system object from a pickle file and returns it.
- Args:
loadname (str, optional): The name of the pickle file to load the system object. Defaults to ‘./system_object.pickle’.
- Returns:
BuiltEnvironmentSystem: The loaded system object.
- load_components(component_dicts: list)¶
- map_buildings_to_households() None¶
Map building components(home, friends, out of town) to households.
- save_as_pickle(savename='./system_object.pickle')¶
Saves the system object as a pickle file.
- Args:
savename (str, optional): The name of the pickle file to save the system object. Defaults to ‘./system_object.pickle’.
- set_household_decision_making_time_steps() None¶
Set the time steps at which household make decisions.
- update()¶
Updates the system state during the resilience assessment by updating the state of components.
- update_households_to_move(households_to_move: dict)¶
- update_the_number_of_households_in_town()¶
Updates the system property indicating the number of households in that are in a neighborhood.