component_configurator

class pyrecodes.component_configurator.component_configurator.ComponentConfigurator(system_level_data: dict, recovery_time_stepping: list)

Bases: object

Class that reads, modifies and sets component parameters unique to each component, different than the default parameters defined in component library, and defined during system creation.

SYSTEM_LEVEL_DATA = ['START_TIME_STEP', 'MAX_TIME_STEP']
configure_recovery_model(component: Component, component_data: dict, component_damage_state: int) None

Configure recovery model for the component by configuring the parameters of the recovery activities. TODO: Create a more general class “RecoveryActivityConfigurator” that configures all recovery activities once it is needed. For now only repair is configured.

set_component_operation_demand(component: Component, resource_name: str, resource_demand_amount: float) None
static set_component_recovery_demand(component: Component, recovery_activity_name: str, resource_name: str, resource_amount: float)
set_component_supply(component: Component, resource_name: str, resource_supply_amount: float, resource_supply_type='Supply') None
set_locality(component: Component, locality_strings: list) None
set_parameters(component: Component, locality_strings: list, component_data={}, component_damage_state=0) Component

Set component parameters not defined in the component library.

set_recovery_time_stepping_rules(recovery_time_stepping: list)

Set recovery time stepping rules for the component. If None, the component will be recovered at each time step.

set_recovery_time_steps(component: Component) None

Set recovery time stepping rules for the component. These define at which time steps component’s recovery will be simulated and thus reduce the computational cost.

set_repair_configurator(component: Component) None
set_repair_parameters(component_data: dict, component_damage_state: int) None

Set repair parameters (duration and resource demand) for the component.