ERAD Systems#
ERAD provides interfacess for two types of system, HazardSystem and AssetSystem respectively.
HazardSystem#
HazardSystem is a container object for hazard models. Hazards (e.g. FireModel, WindModel) can be added to HazardSystem the add_component / add_components methods. Addition of multiple hazards is supported.
Note
ERAD is a multi-hazard simulation tool. It is capable of modeling multiple hazards that mey be experienced in a contingency event e.g storm surge and high winds in a hurricane event.
from IPython.display import display, HTML
import plotly.io as pio
pio.renderers.default = "notebook_connected"
from erad.systems import HazardSystem
from erad.models.hazard import WindModel
wind_model = WindModel.from_hurricane_sid("2017228N14314")
hazard_system = HazardSystem(auto_add_composed_components=True)
hazard_system.add_components(*wind_model)
hazard_system.info()
System ┏━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━┓ ┃ Property ┃ Value ┃ ┡━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━┩ │ System name │ │ │ Data format version │ │ │ Components attached │ 141 │ │ Time Series attached │ 0 │ │ Description │ │ └──────────────────────┴───────┘
Component Information ┏━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━┓ ┃ Type ┃ Count ┃ ┡━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━┩ │ WindModel │ 141 │ └──────────────────────┴───────┘
fig = hazard_system.plot(show=False)
display(HTML(pio.to_html(fig, include_plotlyjs="cdn", full_html=False)))
AssetSystem#
AssetSystem is a container object for all assets in an affected area. Silimar to the HazardSystem, sssets can be added to AssetSystem the add_component / add_components methods. Simulation results can be accessed post simulation using the export_results method on an instances of the AssetSystem.
Note
Hazard models can only be added to HazardSystem and can not be added to AssetSystem
from erad.systems import AssetSystem
from erad.models.asset import Asset
asset_system = AssetSystem(auto_add_composed_components=True)
asset = Asset.example()
asset_system.add_component(asset)
asset_system.info()
System ┏━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━┓ ┃ Property ┃ Value ┃ ┡━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━┩ │ System name │ │ │ Data format version │ │ │ Components attached │ 8 │ │ Time Series attached │ 0 │ │ Description │ │ └──────────────────────┴───────┘
Component Information ┏━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━┓ ┃ Type ┃ Count ┃ ┡━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━┩ │ AccelerationProbability │ 1 │ │ Asset │ 1 │ │ AssetState │ 1 │ │ DistanceProbability │ 2 │ │ SpeedProbability │ 3 │ └─────────────────────────┴───────┘
