r2d_repair_configurator¶
- class pyrecodes.component_configurator.r2d_repair_configurator.R2DBridgeRepairConfigurator(component: Component, system_level_data: dict)¶
Bases:
R2DTransportationRepairConfigurator
Class that configures repair activities of R2D bridges.
- get_repair_demand(component_damage_state: int) int ¶
- Method that calculates the repair crew demand for the bridge component.The demand is calculated based on the length of the bridge and the repair crew demand per mile defined in the system configuration file.Bridge length is conservatively estimates as the product of the number of spans and maximum span length assumed in inches.If more accurate bridge length information is provided in the R2D output files, this method should be updated.
- class pyrecodes.component_configurator.r2d_repair_configurator.R2DBuildingRepairConfigurator(component: Component, system_level_data: dict)¶
Bases:
R2DRepairConfigurator
Class that configures repair activities of R2D buildings.
- get_repair_demand(component_damage_state: int) int ¶
- Method that calculates the repair crew demand for the building component.The demand is calculated based on the area of the building and the repair crew demand per square foot for different damage states defined in the system configuration file.
- class pyrecodes.component_configurator.r2d_repair_configurator.R2DPipeRepairConfigurator(component: Component, system_level_data: dict)¶
Bases:
R2DRepairConfigurator
Class that configures repair activities of R2D pipes.
- get_repair_demand(component_damage_state: int) int ¶
- Method that calculates the repair crew demand for the pipe component.The demand is calculated based on the length of the pipe and the repair crew demand per mile defined in the system configuration file.It is assumed that pipe length is defined in meters in the component object.
- class pyrecodes.component_configurator.r2d_repair_configurator.R2DRepairConfigurator(component: Component, system_level_data: dict)¶
Bases:
RepairConfigurator
Class that configures the parameters of the repair and financing activity of R2D components.These parameters are repair duration, repair cost and repair resource demand.- get_repair_cost(component_data: dict) float ¶
- Method to get the repair cost of the component from the R2D output files.It is assumed that R2D provides the repair cost ratio as a value from 0 to 1. If repair cost is higher than 1, it is assumed that repair cost is provided in (2020) dollar values.Repair cost is taken as the maximum over all repair costs provided by R2D.
- get_repair_demand(building_DS: int) int ¶
- To be implemented by the child classes.
- get_repair_time(component_data: dict, default_repair_time=30) int ¶
- Method that gets the repair duration of the component from the R2D output files.
- set_repair_demand(component_DS: int, recovery_demand_setter: callable) None ¶
- Method that sets the repair resource demand of the component.At the moment, it only works if there is a single resource needed for repair. Modify if multiple resources are needed.
- set_repair_time(component_data: dict) None ¶
- Method sets the repair duration of the component as deterministic by default.It is assumed that the uncertainty is captured in the R2D output files.
- class pyrecodes.component_configurator.r2d_repair_configurator.R2DRoadwayRepairConfigurator(component: Component, system_level_data: dict)¶
Bases:
R2DTransportationRepairConfigurator
Class that configures repair activities of R2D roadways.
- get_repair_demand(component_damage_state: int) int ¶
- Method that calculates the repair crew demand for the roadway component.The demand is calculated based on the length of the roadway and the repair crew demand per mile defined in the system configuration file.It is assumed that roadway length is defined in meters in the component object.
- class pyrecodes.component_configurator.r2d_repair_configurator.R2DTransportationRepairConfigurator(component: Component, system_level_data: dict)¶
Bases:
R2DRepairConfigurator
- get_repair_cost(component_data: dict) float ¶
- Method to get the repair cost of the component from the R2D output files.R2D provides the repair cost of transportation components (Bridge, Roadway, Tunnel) in (2020) dollar values, not ratios as for buildings.Repair cost is taken as the maximum over all repair cost ratios provided by R2D.
TODO This method might be redundant, since parent class takes care of the repair cost calculation.
- class pyrecodes.component_configurator.r2d_repair_configurator.R2DTunnelRepairConfigurator(component: Component, system_level_data: dict)¶
Bases:
R2DTransportationRepairConfigurator
Class that configures repair activities of R2D tunnels.
- get_repair_demand(component_damage_state: int) int ¶
- Method that calculates the repair crew demand for the tunnel component.The demand is calculated based on the length of the tunnel and the repair crew demand per mile defined in the system configuration file.It is assumed that tunnel length is defined in feet in the component object.