main

Module used to run the pyrecodes resilience assessment as defined in the component library and system configuration files.

pyrecodes.main.create_system(input_dict: dict) System

Creates a system object using the input dictionary.

Args:

input_dict (dict): The input dictionary containing System configuration.

Returns:

System: The created system object.

pyrecodes.main.form_component_library(input_dict: dict) dict

Forms a component library based on the input dictionary.

Args:

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(main_file: str) System

Runs the resilience assessment for the system.

Args:

main_file (str): The name of the main JSON configuration file.

Returns:

System: The system object after running the resilience assessment.