bridge_service_distribution_model¶
- class pyrecodes.resource_distribution_model.bridge_service_distribution_model.BridgeServiceDistributionModel(resource_name: str, resource_parameters: dict, components: [<class 'pyrecodes.component.component.Component'>])¶
Bases:
AbstractResourceDistributionModel
Class that captures the effect of bridge functionality on the functionality of components located on a bridge. If the bridge is not functional, the components (e.g., roadways, power lines) on the bridge are not functional either.Bridge service cannot be consumable with the current implementation.- component_is_a_bridge(component)¶
- Method to identify components that are bridges.This method is a workaround until a Bridge class is created. Then check the class name instead of the component name.
- component_is_on_the_bridge(component, bridge_component)¶
- Method to identify components that are on a bridge.Assume bridges are in a single direction - that’s why use sort.
- distribute(time_step: int) None ¶
- find_bridges()¶
- get_total_consumption() float ¶
- get_total_demand() float ¶
- get_total_supply() float ¶
- map_links_to_bridges()¶
Find all links that are on a bridge.