main¶
Module used to run the pyrecodes resilience assessment as defined in the component library and system configuration files.
- pyrecodes.main.create_system(folder_name: str, input_dict: dict, max_time_step: int | None = None) System¶
Creates a system object using the input dictionary.
- Args:
folder_name (str): The name of the folder containing the system configuration files. input_dict (dict): The input dictionary containing System configuration. max_time_step (int, optional): Override the maximum time step from the system configuration.
- Returns:
System: The created system object.
- pyrecodes.main.form_component_library(folder_name: str, input_dict: dict) dict¶
Forms a component library based on the input dictionary.
- Args:
folder_name (str): The name of the folder containing the component library files. input_dict (dict): The input dictionary containing component library configuration.
- Returns:
dict: The component library dict.
- pyrecodes.main.load_system(loadname, system_class_name='BuiltEnvironment', system_file_name='built_environment') System¶
Loads a previously saved system. Does not yet work for systems which use SimCenter API infrastructure models.
- pyrecodes.main.run(folder_name: str, main_file_name: str, max_time_step: int | None = None) System¶
Runs the resilience assessment for the system.
- Args:
folder_name (str): The name of the folder containing the main JSON configuration file. main_file_name (str): The name of the main JSON configuration file. max_time_step (int, optional): Override the maximum time step from the system configuration.
- Returns:
System: The system object after running the resilience assessment.