r2d_subsystem_creator¶
- class pyrecodes.subsystem_creator.r2d_subsystem_creator.R2DSubsystemCreator(component_library: dict, locality: dict, parameters: dict, constants={}, damage_input={})¶
Bases:
SubsystemCreator
Create a System based on SimCenter R2D Tool’s JSON output file.
- create_component(component_info: dict, damage_info: dict, asset_type: str, asset_subtype: str) Component ¶
- Method to create a component.It is assumed that the names of the components in the component library are in the format ‘DS{damage_state}_{component_type}’Component type is the same string as the asset subtype of the component in the R2D JSON file, e.g., ‘Building’, ‘Bridge’, etc.
- get_component_damage_state(damage_info: dict, component_type: str) int ¶
- get_component_geometry(component_info: dict) list ¶
- Method creates a shapely point representing component’s geometry based on the information provided in the R2D location data.TODO: Needs improvement for components whose geometry are lines (roads, pipes) and polygons. Future work.
- set_component_configurator() None ¶