system¶
- class pyrecodes.system.system.System(system_configuration_file: dict, component_library: dict, system_creator: SystemCreator)¶
Bases:
ABC
Interface class representing a generic system for resilience assessment.
- Attributes:
- components (list[Component]): List of system components represented as Component objects.resources (dict): Dictionary containing resource parameters.system_creator (SystemCreator): The system creator object responsible for system initialization.
- abstract calculate_resilience()¶
Calculates and returns the resilience metric for the system.
- abstract create_system(system_creator: SystemCreator)¶
Creates the system based on the provided SystemCreator object.
- Args:
system_creator (SystemCreator): The system creator object responsible for system initialization.
- abstract distribute_resources()¶
Distributes resources among the system component’s.
- abstract recover()¶
Simulates the recovery process in the system.
- resources: dict¶
- abstract set_component_library(component_library: dict)¶
Sets the component library for the system.
- Args:
component_library (dict): The component library to set for the system.
- abstract set_configuration_file(system_configuration: dict)¶
Sets the configuration file for the system.
- Args:
system_configuration (dict): System configuration dictionary.
- abstract set_initial_damage()¶
Sets the initial damage state of the system components.
- abstract start_resilience_assessment()¶
Initiates the resilience assessment for the system. This is the entry point for running the assessment.
- system_creator: SystemCreator¶
- abstract update()¶
Updates the system state at a time step of the resilience assessment.