Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

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.

from IPython.display import display, HTML
import plotly.io as pio

pio.renderers.default = "plotly_mimetype"

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()
/opt/homebrew/Caskroom/miniconda/base/envs/erad/lib/python3.12/site-packages/kaleido/__init__.py:14: UserWarning:



Warning: You have Plotly version 6.0.1, which is not compatible with this version of Kaleido (1.0.0).

This means that static image generation (e.g. `fig.write_image()`) will not work.

Please upgrade Plotly to version 6.1.1 or greater, or downgrade Kaleido to version 0.2.1.


Loading...
Loading...
fig = hazard_system.plot(show=False)
fig.show()
Loading...

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.

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()
Loading...
Loading...