subsystem_creator

class pyrecodes.subsystem_creator.subsystem_creator.SubsystemCreator(component_library: dict, locality: dict, parameters: dict, constants={}, damage_input={})

Bases: object

Create a Subsystem within the System class.

create_components_between_localities() None

Implement this method in subclasses if needed.

create_components_in_localities() None

Implement this method in subclasses if needed.

get_component_object(component_type: str) Component
sample_random_variables_for_component(component: Component) Component

Resample all random variables in the component template to ensure they differ between components.

At the moment, only random variables that are considered are the duration of recovery activities.

TODO: Extend this method to sample other random variables. Find a generic way of finding random variables of a component.

set_component_configurator() None