NREL-erad 0.1.0__py3-none-any.whl → 1.0.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- erad/__init__.py +1 -1
- erad/constants.py +20 -68
- erad/cypher_queries/load_data_v1.cypher +212 -0
- erad/data/World_Earthquakes_1960_2016.csv +23410 -0
- erad/db/__init__.py +0 -0
- erad/db/assets/__init__.py +0 -0
- erad/db/assets/critical_infras.py +171 -0
- erad/db/assets/distribution_lines.py +101 -0
- erad/db/credential_model.py +20 -0
- erad/db/disaster_input_model.py +23 -0
- erad/db/inject_earthquake.py +52 -0
- erad/db/inject_flooding.py +53 -0
- erad/db/neo4j_.py +162 -0
- erad/db/utils.py +14 -0
- erad/exceptions.py +68 -0
- erad/metrics/__init__.py +0 -0
- erad/metrics/check_microgrid.py +208 -0
- erad/metrics/metric.py +178 -0
- erad/programs/__init__.py +0 -0
- erad/programs/backup.py +62 -0
- erad/programs/microgrid.py +45 -0
- erad/scenarios/__init__.py +0 -0
- erad/scenarios/abstract_scenario.py +103 -0
- erad/scenarios/common.py +93 -0
- erad/scenarios/earthquake_scenario.py +161 -0
- erad/scenarios/fire_scenario.py +160 -0
- erad/scenarios/flood_scenario.py +494 -0
- erad/scenarios/flows.csv +671 -0
- erad/scenarios/utilities.py +76 -0
- erad/scenarios/wind_scenario.py +89 -0
- erad/utils/__init__.py +0 -0
- erad/utils/ditto_utils.py +252 -0
- erad/utils/hifld_utils.py +147 -0
- erad/utils/opendss_utils.py +357 -0
- erad/utils/overpass.py +76 -0
- erad/utils/util.py +178 -0
- erad/visualization/__init__.py +0 -0
- erad/visualization/plot_graph.py +218 -0
- {nrel_erad-0.1.0.dist-info → nrel_erad-1.0.0.dist-info}/METADATA +39 -29
- nrel_erad-1.0.0.dist-info/RECORD +42 -0
- {nrel_erad-0.1.0.dist-info → nrel_erad-1.0.0.dist-info}/WHEEL +1 -2
- {nrel_erad-0.1.0.dist-info → nrel_erad-1.0.0.dist-info}/licenses/LICENSE.txt +28 -28
- erad/default_fragility_curves/__init__.py +0 -15
- erad/default_fragility_curves/default_fire_boundary_dist.py +0 -94
- erad/default_fragility_curves/default_flood_depth.py +0 -108
- erad/default_fragility_curves/default_flood_velocity.py +0 -101
- erad/default_fragility_curves/default_fragility_curves.py +0 -23
- erad/default_fragility_curves/default_peak_ground_acceleration.py +0 -163
- erad/default_fragility_curves/default_peak_ground_velocity.py +0 -94
- erad/default_fragility_curves/default_wind_speed.py +0 -94
- erad/enums.py +0 -40
- erad/gdm_mapping.py +0 -83
- erad/models/__init__.py +0 -1
- erad/models/asset.py +0 -287
- erad/models/asset_mapping.py +0 -20
- erad/models/fragility_curve.py +0 -116
- erad/models/hazard/__init__.py +0 -5
- erad/models/hazard/base_models.py +0 -12
- erad/models/hazard/common.py +0 -26
- erad/models/hazard/earthquake.py +0 -93
- erad/models/hazard/flood.py +0 -83
- erad/models/hazard/wild_fire.py +0 -121
- erad/models/hazard/wind.py +0 -143
- erad/models/probability.py +0 -73
- erad/probability_builder.py +0 -35
- erad/quantities.py +0 -25
- erad/runner.py +0 -122
- erad/systems/__init__.py +0 -2
- erad/systems/asset_system.py +0 -414
- erad/systems/hazard_system.py +0 -122
- nrel_erad-0.1.0.dist-info/RECORD +0 -35
- nrel_erad-0.1.0.dist-info/top_level.txt +0 -1
@@ -0,0 +1,218 @@
|
|
1
|
+
""" Module for handling graph plots. """
|
2
|
+
|
3
|
+
# standard imports
|
4
|
+
import os
|
5
|
+
import abc
|
6
|
+
from typing import List, Dict
|
7
|
+
|
8
|
+
# third-party libraries
|
9
|
+
import networkx as nx
|
10
|
+
import plotly.graph_objects as go
|
11
|
+
from dotenv import load_dotenv
|
12
|
+
|
13
|
+
# internal libraries
|
14
|
+
from erad.utils.util import path_validation
|
15
|
+
|
16
|
+
load_dotenv()
|
17
|
+
|
18
|
+
|
19
|
+
class AbstractGraphPlot(abc.ABC):
|
20
|
+
"""Abstract interface for developing subclass to plot network graph."""
|
21
|
+
|
22
|
+
@abc.abstractmethod
|
23
|
+
def add_network_data(self, *args, **kwargs):
|
24
|
+
"""Abstract method for adding network data."""
|
25
|
+
|
26
|
+
@abc.abstractmethod
|
27
|
+
def prepare_plot(self, *args, **kwargs):
|
28
|
+
"""Abstract method for preparing and showing teh plot"""
|
29
|
+
|
30
|
+
|
31
|
+
class PloltyGraph(AbstractGraphPlot):
|
32
|
+
"""Class for managing graph plot using Plotly.
|
33
|
+
|
34
|
+
Attributes:
|
35
|
+
access_token (str): MapBox API token
|
36
|
+
style (str): MapBox style
|
37
|
+
zoom_level (int): Zoom level for the plot
|
38
|
+
data (List): Stores the data to be fed to plotly for plotting
|
39
|
+
scatter_data (Dict): Stores longitudes and latitudes of nodes
|
40
|
+
from network
|
41
|
+
fig (go.Figure): Plotly graph objects figure instance
|
42
|
+
"""
|
43
|
+
|
44
|
+
def __init__(
|
45
|
+
self,
|
46
|
+
access_token: str = None,
|
47
|
+
style: str = "carto-darkmatter",
|
48
|
+
zoom_level: int = 13,
|
49
|
+
) -> None:
|
50
|
+
"""Constructor for `PlotlyGraph` Subclass.
|
51
|
+
|
52
|
+
Args:
|
53
|
+
access_token (str): MapBox API token
|
54
|
+
style (str): MapBox style
|
55
|
+
zoom_level (int): Zoom level for the plot
|
56
|
+
"""
|
57
|
+
|
58
|
+
if access_token:
|
59
|
+
self.access_token = access_token
|
60
|
+
else:
|
61
|
+
self.access_token = os.getenv("MAPBOX_API_KEY")
|
62
|
+
self.style = style
|
63
|
+
self.zoom_level = zoom_level
|
64
|
+
|
65
|
+
self.data = []
|
66
|
+
|
67
|
+
def _get_map_centre(self, longitudes: List[float], latitudes: List[float]):
|
68
|
+
"""Returns map center."""
|
69
|
+
return {
|
70
|
+
"lon": sum(longitudes) / len(longitudes),
|
71
|
+
"lat": sum(latitudes) / len(latitudes),
|
72
|
+
}
|
73
|
+
|
74
|
+
def add_network_data(
|
75
|
+
self,
|
76
|
+
network: nx.Graph,
|
77
|
+
latitude_property: str = "lat",
|
78
|
+
longitude_property: str = "long",
|
79
|
+
node_color: str = "blue",
|
80
|
+
line_color: str = "red",
|
81
|
+
) -> None:
|
82
|
+
"""Method to add network data to plot data.
|
83
|
+
|
84
|
+
Args:
|
85
|
+
network (nx.Graph): Networkx graph instance
|
86
|
+
latitude_property (str): Property name to be
|
87
|
+
used as latitude
|
88
|
+
longitude_property (str): Property name to be
|
89
|
+
used as longitude
|
90
|
+
node_color (str): Color name to be used to plot
|
91
|
+
nodes
|
92
|
+
line_color (str): Color name to be used to plot
|
93
|
+
line segments
|
94
|
+
"""
|
95
|
+
|
96
|
+
# Add nodes
|
97
|
+
self.scatter_data = {"latitudes": [], "longitudes": []}
|
98
|
+
|
99
|
+
for node in network.nodes.data():
|
100
|
+
|
101
|
+
# Storing the lat lons in scatter data
|
102
|
+
# container
|
103
|
+
self.scatter_data["latitudes"].append(node[1][latitude_property])
|
104
|
+
self.scatter_data["longitudes"].append(node[1][longitude_property])
|
105
|
+
|
106
|
+
# Stroing the edge data in container
|
107
|
+
line_data = {"latitudes": [], "longitudes": []}
|
108
|
+
node_data = {node[0]: node[1] for node in network.nodes.data()}
|
109
|
+
|
110
|
+
for edge in network.edges():
|
111
|
+
line_data["latitudes"].extend(
|
112
|
+
[
|
113
|
+
node_data[edge[0]][latitude_property],
|
114
|
+
node_data[edge[1]][latitude_property],
|
115
|
+
None,
|
116
|
+
]
|
117
|
+
)
|
118
|
+
|
119
|
+
line_data["longitudes"].extend(
|
120
|
+
[
|
121
|
+
node_data[edge[0]][longitude_property],
|
122
|
+
node_data[edge[1]][longitude_property],
|
123
|
+
None,
|
124
|
+
]
|
125
|
+
)
|
126
|
+
|
127
|
+
# Adding plots to plotly graph object
|
128
|
+
self.data.append(
|
129
|
+
go.Scattermapbox(
|
130
|
+
mode="markers",
|
131
|
+
lon=self.scatter_data["longitudes"],
|
132
|
+
lat=self.scatter_data["latitudes"],
|
133
|
+
marker={"size": 5, "color": node_color},
|
134
|
+
)
|
135
|
+
)
|
136
|
+
|
137
|
+
self.data.append(
|
138
|
+
go.Scattermapbox(
|
139
|
+
mode="markers+lines",
|
140
|
+
lon=line_data["longitudes"],
|
141
|
+
lat=line_data["latitudes"],
|
142
|
+
marker={"size": 0},
|
143
|
+
line={"color": line_color},
|
144
|
+
)
|
145
|
+
)
|
146
|
+
|
147
|
+
def add_scatter_points(
|
148
|
+
self,
|
149
|
+
latitudes: List[float],
|
150
|
+
longitudes: List[float],
|
151
|
+
color: str = "yellow",
|
152
|
+
size: int = 5,
|
153
|
+
) -> None:
|
154
|
+
"""Method for scatter points to plot data.
|
155
|
+
|
156
|
+
Args:
|
157
|
+
latitudes (List[float]): List of latitude points
|
158
|
+
longitudes (List[float]): List of longitude points
|
159
|
+
color (str): Color to be used for scatter points
|
160
|
+
size (int): Size of scatter points
|
161
|
+
"""
|
162
|
+
|
163
|
+
self.data.append(
|
164
|
+
go.Scattermapbox(
|
165
|
+
mode="markers",
|
166
|
+
lon=longitudes,
|
167
|
+
lat=latitudes,
|
168
|
+
marker={"size": size, "color": color},
|
169
|
+
)
|
170
|
+
)
|
171
|
+
|
172
|
+
def add_polygon(
|
173
|
+
self,
|
174
|
+
latitudes: List[float],
|
175
|
+
longitudes: List[float],
|
176
|
+
fill: str = "toself",
|
177
|
+
) -> None:
|
178
|
+
"""Method for adding polygon to the plot.
|
179
|
+
|
180
|
+
Args:
|
181
|
+
latitudes (List[float]): List of latitude points
|
182
|
+
longitudes (List[float]): List of longitude points
|
183
|
+
fill (str): Accepted fill value by plotly
|
184
|
+
"""
|
185
|
+
self.data.append(
|
186
|
+
go.Scattermapbox(
|
187
|
+
lon=longitudes, lat=latitudes, fill=fill, mode="lines"
|
188
|
+
)
|
189
|
+
)
|
190
|
+
|
191
|
+
def prepare_plot(self, show: bool = True):
|
192
|
+
"""Method to prepare and show the plot.
|
193
|
+
|
194
|
+
Args:
|
195
|
+
show (bool): True if want to see the plot.
|
196
|
+
"""
|
197
|
+
self.fig = go.Figure(data=self.data)
|
198
|
+
self.fig.update_layout(margin={"r": 0, "t": 0, "l": 0, "b": 0})
|
199
|
+
self.fig.update_mapboxes(
|
200
|
+
{
|
201
|
+
"accesstoken": self.access_token,
|
202
|
+
"style": self.style,
|
203
|
+
"center": self._get_map_centre(
|
204
|
+
self.scatter_data["longitudes"],
|
205
|
+
self.scatter_data["latitudes"],
|
206
|
+
),
|
207
|
+
"zoom": self.zoom_level,
|
208
|
+
}
|
209
|
+
)
|
210
|
+
|
211
|
+
if show:
|
212
|
+
self.fig.show()
|
213
|
+
|
214
|
+
def html_export(self, html_file_path: str):
|
215
|
+
"""Method for exporting plot as HTML file."""
|
216
|
+
path_validation(html_file_path)
|
217
|
+
self.fig.write_html(html_file_path)
|
218
|
+
|
@@ -1,42 +1,52 @@
|
|
1
|
-
Metadata-Version: 2.
|
1
|
+
Metadata-Version: 2.3
|
2
2
|
Name: NREL-erad
|
3
|
-
Version:
|
4
|
-
Summary: Graph based scalable tool for computing
|
5
|
-
Author-email: Kapil Duwadi <kapil.duwadi@nrel.gov>, Aadil Latif <aadil.altif@nrel.gov>, Kwami Sedzro <sherinann.abraham@nrel.gov>, Sherin Ann Abraham <kwami.sedzro@nrel.gov>, Bryan Palmintier <bryan.palmintier@nrel.gov>
|
6
|
-
Maintainer-email: Aadil Latif <Aadil.Latif@nrel.gov>
|
3
|
+
Version: 1.0.0
|
4
|
+
Summary: Graph based scalable tool for computing equitable resilience metrics for distribution systems.
|
7
5
|
Project-URL: Homepage, https://github.com/nrel/erad
|
8
|
-
|
6
|
+
Author-email: Kapil Duwadi <kapil.duwadi@nrel.gov>, Aadil Latif <aadil.altif@nrel.gov>, Kwami Sedzro <sherinann.abraham@nrel.gov>, Sherin Ann Abraham <kwami.sedzro@nrel.gov>, Bryan Palmintier <bryan.palmintier@nrel.gov>
|
7
|
+
License-File: LICENSE.txt
|
8
|
+
Keywords: Distribution,Earthquake,Equity,Fire,Flooding,Power,Python,Resilience,Systems
|
9
9
|
Classifier: License :: OSI Approved :: BSD License
|
10
10
|
Classifier: Operating System :: OS Independent
|
11
11
|
Classifier: Programming Language :: Python :: 3.8
|
12
|
-
Requires-Python: >=3.
|
13
|
-
|
14
|
-
|
15
|
-
Requires-Dist:
|
16
|
-
Requires-Dist:
|
12
|
+
Requires-Python: >=3.8
|
13
|
+
Requires-Dist: boto3
|
14
|
+
Requires-Dist: botocore
|
15
|
+
Requires-Dist: ditto-py
|
16
|
+
Requires-Dist: geojson
|
17
17
|
Requires-Dist: geopandas
|
18
|
-
Requires-Dist: requests
|
19
|
-
Requires-Dist: shapely
|
20
|
-
Requires-Dist: pandas
|
21
|
-
Requires-Dist: pyhigh
|
22
18
|
Requires-Dist: geopy
|
19
|
+
Requires-Dist: graphdatascience
|
20
|
+
Requires-Dist: jupyter
|
21
|
+
Requires-Dist: matplotlib
|
22
|
+
Requires-Dist: neo4j-driver
|
23
|
+
Requires-Dist: networkx
|
24
|
+
Requires-Dist: opendssdirect-py
|
25
|
+
Requires-Dist: pandas
|
26
|
+
Requires-Dist: plotly
|
27
|
+
Requires-Dist: pydantic~=1.10.14
|
28
|
+
Requires-Dist: pytest
|
29
|
+
Requires-Dist: python-dotenv
|
30
|
+
Requires-Dist: pyyaml
|
31
|
+
Requires-Dist: rasterio
|
32
|
+
Requires-Dist: requests
|
23
33
|
Requires-Dist: scipy
|
34
|
+
Requires-Dist: shapely
|
35
|
+
Requires-Dist: stateplane
|
36
|
+
Requires-Dist: xmltodict
|
24
37
|
Provides-Extra: dev
|
25
|
-
Requires-Dist: black; extra ==
|
26
|
-
Requires-Dist: mkdocs; extra ==
|
27
|
-
Requires-Dist: mkdocs-jupyter; extra ==
|
28
|
-
Requires-Dist: mkdocs-material; extra ==
|
29
|
-
Requires-Dist: mkdocstrings[python]; extra ==
|
30
|
-
Requires-Dist: pylint; extra ==
|
31
|
-
|
32
|
-
Requires-Dist: pytest-cov; extra == "dev"
|
33
|
-
Requires-Dist: ruff; extra == "dev"
|
34
|
-
Dynamic: license-file
|
38
|
+
Requires-Dist: black; extra == 'dev'
|
39
|
+
Requires-Dist: mkdocs; extra == 'dev'
|
40
|
+
Requires-Dist: mkdocs-jupyter; extra == 'dev'
|
41
|
+
Requires-Dist: mkdocs-material; extra == 'dev'
|
42
|
+
Requires-Dist: mkdocstrings[python]; extra == 'dev'
|
43
|
+
Requires-Dist: pylint; extra == 'dev'
|
44
|
+
Description-Content-Type: text/markdown
|
35
45
|
|
36
|
-
# ERAD (<u>E</u>
|
46
|
+
# ERAD (<u>E</u>quity and <u>R</u>esilience <u>A</u>nalysis for electric <u>D</u>istribution systems)
|
37
47
|
<p align="center">
|
38
48
|
<img src="docs/images/logo.svg" width="250" style="display:flex;justify-content:center;">
|
39
|
-
<p align="center">Graph based python tool for computing
|
49
|
+
<p align="center">Graph based python tool for computing equitable resilience. </p>
|
40
50
|
</p>
|
41
51
|
|
42
52
|

|
@@ -50,6 +60,6 @@ Dynamic: license-file
|
|
50
60
|
|
51
61
|
Understanding the impact of disaster events on people's ability to access critical service is key to designing appropriate programs to minimize the overall impact. Flooded roads, downed power lines, flooded power substation etc. could impact access to critical services like electricity, food, health and more. The field of disaster modeling is still evolving and so is our understanding of how these events would impact our critical infrastructures such power grid, hospitals, groceries, banks etc.
|
52
62
|
|
53
|
-
ERAD is a free, open-source Python toolkit for computing
|
63
|
+
ERAD is a free, open-source Python toolkit for computing equity and resilience measures in the face of hazards like earthquakes and flooding. It uses graph database to store data and perform computation at the household level for a variety of critical services that are connected by power distribution network. It uses asset fragility curves, which are functions that relate hazard severity to survival probability for power system assets including cables, transformers, substations, roof-mounted solar panels, etc. recommended in top literature. Programs like undergrounding, microgrid, and electricity backup units for critical infrastructures may all be evaluated using metrics and compared across different neighborhoods to assess their effects on equity and resilience.
|
54
64
|
|
55
|
-
ERAD is designed to be used by researchers, students, community stakeholders, distribution utilities to understand and possibly evaluate effectiveness of different post disaster programs to improve
|
65
|
+
ERAD is designed to be used by researchers, students, community stakeholders, distribution utilities to understand and possibly evaluate effectiveness of different post disaster programs to improve resilience and equity. It was funded by National Renewable Energy Laboratory (NREL) and made publicly available with open license.
|
@@ -0,0 +1,42 @@
|
|
1
|
+
erad/__init__.py,sha256=Aj77VL1d5Mdku7sgCgKQmPuYavPpAHuZuJcy6bygQZE,21
|
2
|
+
erad/constants.py,sha256=HZKN6wM_zXqZje8SsUIj_msokFhPcWsoRNeHY8yI_WA,699
|
3
|
+
erad/exceptions.py,sha256=DNpMurLC-KJwAWQCbH6LmZURUV9W0zmdEsFFLk05Y7Q,2141
|
4
|
+
erad/cypher_queries/load_data_v1.cypher,sha256=t52glQxFjvdGzpGhMvCgXYyEiEf9C26gfCKvs3fCoZE,7920
|
5
|
+
erad/data/World_Earthquakes_1960_2016.csv,sha256=Z5nNXwqqe0VNatZFRSkXtbS73zJWI_MbreIyEfJCoGE,2362711
|
6
|
+
erad/db/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
7
|
+
erad/db/credential_model.py,sha256=9baQ3fHpsJgd205S-hf4dULR9J38TVszBZWcNb9pP6Q,571
|
8
|
+
erad/db/disaster_input_model.py,sha256=4CVkgce-oTJbfg3p6VcFDa_L9ftNfakx5IrFeQra9Ws,614
|
9
|
+
erad/db/inject_earthquake.py,sha256=duZmNzT5R4pEtgSSKTQJvzMK_XiGvF9mro4uq7DDdBc,1648
|
10
|
+
erad/db/inject_flooding.py,sha256=OARZE4YVx-AYrG7mzRBRy1IJv4LZ4fhrJzP8u2iO2DU,1716
|
11
|
+
erad/db/neo4j_.py,sha256=cHNMYMIq0KwBeam2yWzMKTDw7R_G6hzQc0ZArk3k8ko,5061
|
12
|
+
erad/db/utils.py,sha256=-YcbExU7gG8M50ak_fLagzafnLAd92rZxAzHbTu3Yik,442
|
13
|
+
erad/db/assets/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
14
|
+
erad/db/assets/critical_infras.py,sha256=2DiEKoyeplXeUrjFczrxzs-bfcSRW3Cf41YnVEMtEYo,5902
|
15
|
+
erad/db/assets/distribution_lines.py,sha256=v-jkmzwmzN9DXka-9BIhx5du0kKi525qfHGNqfYNmQQ,3446
|
16
|
+
erad/metrics/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
17
|
+
erad/metrics/check_microgrid.py,sha256=ct0AQsIAQmZ_-Z6_yJky4gE9P4U2uFNMUui8B7jgEEs,7480
|
18
|
+
erad/metrics/metric.py,sha256=haZwrtd9UYkpHXh3Cd80y0mb6H2fvk6uHBP_lHtuTFA,5969
|
19
|
+
erad/programs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
20
|
+
erad/programs/backup.py,sha256=I5KAxa4SZcouUfe_DQQoL89exKpTI5Rgd-BlvQKifQQ,1910
|
21
|
+
erad/programs/microgrid.py,sha256=W9WiQeQ64ncfrerUqC0Eu7tk9MmgIZffN7qL5qZs8EU,1626
|
22
|
+
erad/scenarios/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
23
|
+
erad/scenarios/abstract_scenario.py,sha256=ua035wPNWTYKKirOcdNEGGHrRnilUfn9daCijkDcgG4,4165
|
24
|
+
erad/scenarios/common.py,sha256=MwAJtZF8xya4qw_vMsnaD3WOTZV-1HsCKZqfTh8LAIw,2930
|
25
|
+
erad/scenarios/earthquake_scenario.py,sha256=sz_8O0py4prDjlqtiHssvAgDI6o6bl25qcnhVa_82RY,8556
|
26
|
+
erad/scenarios/fire_scenario.py,sha256=nfZGbr-pfOvfOgZCIzTr62wBXM7VAA4gjfcupmmH81M,7084
|
27
|
+
erad/scenarios/flood_scenario.py,sha256=RVMlVUruvtgG0pktO_M0FnqA4EkN8LlCV5e3y3Xcl4o,19843
|
28
|
+
erad/scenarios/flows.csv,sha256=BqF7KCjAsuO9qnIK8ioslDdm7FmmvwVDnxQyhLwVn24,42941
|
29
|
+
erad/scenarios/utilities.py,sha256=G0cqpFUfkfU15IyIw7dnJnPaWK__AleRvfyQFiN_ssc,2678
|
30
|
+
erad/scenarios/wind_scenario.py,sha256=2GXmLRmcNO6-Vm0knL1hd-MfV4QRJ9nRL87rid2B6O4,3855
|
31
|
+
erad/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
32
|
+
erad/utils/ditto_utils.py,sha256=akWWBunbWGdogYde1xaMTFPe753T3NyOG4GNtm0x8K4,7886
|
33
|
+
erad/utils/hifld_utils.py,sha256=hkIItgSzpqBjQAPHNHwjirGEDYX5dUXiPbiLMZWB3DI,4836
|
34
|
+
erad/utils/opendss_utils.py,sha256=i2yZjxHA4p8dkU0Rz8NPtzBPaIjbHUer74K-x0ohoJM,10555
|
35
|
+
erad/utils/overpass.py,sha256=sakprZEdzCmeFO-RiVdSG3YMaPsADGzSeZNxDa2wem8,2030
|
36
|
+
erad/utils/util.py,sha256=x0SzVu68W7JrSXzoCG3bq9_XJ1EIrWoOVB3UjLnAFTk,4975
|
37
|
+
erad/visualization/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
38
|
+
erad/visualization/plot_graph.py,sha256=1wJm5LHxQgyxhax-jnOdaL4ssVtXV7q0m-Ga-_fphjI,6559
|
39
|
+
nrel_erad-1.0.0.dist-info/METADATA,sha256=AniNz2dTFaCTOHeMY6xDpHFQley6-3SKQz__oo0N5ug,4307
|
40
|
+
nrel_erad-1.0.0.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
|
41
|
+
nrel_erad-1.0.0.dist-info/licenses/LICENSE.txt,sha256=tE45GOKNRzfHwPByr46JpZw9R9dlukkKli5qFr0DbeM,1543
|
42
|
+
nrel_erad-1.0.0.dist-info/RECORD,,
|
@@ -1,29 +1,29 @@
|
|
1
|
-
BSD 3-Clause License
|
2
|
-
|
3
|
-
Copyright (c) 2023, Alliance for Sustainable Energy, LLC
|
4
|
-
All rights reserved.
|
5
|
-
|
6
|
-
Redistribution and use in source and binary forms, with or without
|
7
|
-
modification, are permitted provided that the following conditions are met:
|
8
|
-
|
9
|
-
1. Redistributions of source code must retain the above copyright notice, this
|
10
|
-
list of conditions and the following disclaimer.
|
11
|
-
|
12
|
-
2. Redistributions in binary form must reproduce the above copyright notice,
|
13
|
-
this list of conditions and the following disclaimer in the documentation
|
14
|
-
and/or other materials provided with the distribution.
|
15
|
-
|
16
|
-
3. Neither the name of the copyright holder nor the names of its
|
17
|
-
contributors may be used to endorse or promote products derived from
|
18
|
-
this software without specific prior written permission.
|
19
|
-
|
20
|
-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
21
|
-
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
22
|
-
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
23
|
-
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
24
|
-
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
25
|
-
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
26
|
-
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
27
|
-
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
28
|
-
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
1
|
+
BSD 3-Clause License
|
2
|
+
|
3
|
+
Copyright (c) 2023, Alliance for Sustainable Energy, LLC
|
4
|
+
All rights reserved.
|
5
|
+
|
6
|
+
Redistribution and use in source and binary forms, with or without
|
7
|
+
modification, are permitted provided that the following conditions are met:
|
8
|
+
|
9
|
+
1. Redistributions of source code must retain the above copyright notice, this
|
10
|
+
list of conditions and the following disclaimer.
|
11
|
+
|
12
|
+
2. Redistributions in binary form must reproduce the above copyright notice,
|
13
|
+
this list of conditions and the following disclaimer in the documentation
|
14
|
+
and/or other materials provided with the distribution.
|
15
|
+
|
16
|
+
3. Neither the name of the copyright holder nor the names of its
|
17
|
+
contributors may be used to endorse or promote products derived from
|
18
|
+
this software without specific prior written permission.
|
19
|
+
|
20
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
21
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
22
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
23
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
24
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
25
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
26
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
27
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
28
|
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
29
29
|
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
@@ -1,15 +0,0 @@
|
|
1
|
-
from erad.default_fragility_curves.default_peak_ground_acceleration import (
|
2
|
-
DEFAULT_PEAK_GROUND_ACCELERATION_FRAGILITY_CURVES,
|
3
|
-
)
|
4
|
-
from erad.default_fragility_curves.default_peak_ground_velocity import (
|
5
|
-
DEFAULT_PEAK_GROUND_VELOCITY_FRAGILITY_CURVES,
|
6
|
-
)
|
7
|
-
from erad.default_fragility_curves.default_fire_boundary_dist import (
|
8
|
-
DEFAULT_FIRE_BOUNDARY_FRAGILITY_CURVES,
|
9
|
-
)
|
10
|
-
from erad.default_fragility_curves.default_flood_velocity import (
|
11
|
-
DEFAULT_FLOOD_VELOCITY_FRAGILITY_CURVES,
|
12
|
-
)
|
13
|
-
from erad.default_fragility_curves.default_flood_depth import DEFAULT_FLOOD_DEPTH_FRAGILITY_CURVES
|
14
|
-
from erad.default_fragility_curves.default_wind_speed import DEFAULT_WIND_SPEED_FRAGILITY_CURVES
|
15
|
-
from erad.default_fragility_curves.default_fragility_curves import DEFAULT_FRAGILTY_CURVES
|
@@ -1,94 +0,0 @@
|
|
1
|
-
from gdm.quantities import Distance
|
2
|
-
|
3
|
-
import erad.models.fragility_curve as frag
|
4
|
-
from erad.enums import AssetTypes
|
5
|
-
|
6
|
-
DEFAULT_FIRE_BOUNDARY_FRAGILITY_CURVES = frag.HazardFragilityCurves(
|
7
|
-
asset_state_param="fire_boundary_dist",
|
8
|
-
curves=[
|
9
|
-
frag.FragilityCurve(
|
10
|
-
asset_type=AssetTypes.switch,
|
11
|
-
prob_function=frag.ProbabilityFunction(
|
12
|
-
distribution="expon", parameters=[Distance(0.65, "km"), 0.95]
|
13
|
-
),
|
14
|
-
),
|
15
|
-
frag.FragilityCurve(
|
16
|
-
asset_type=AssetTypes.battery_storage,
|
17
|
-
prob_function=frag.ProbabilityFunction(
|
18
|
-
distribution="expon", parameters=[Distance(0.65, "km"), 0.95]
|
19
|
-
),
|
20
|
-
),
|
21
|
-
frag.FragilityCurve(
|
22
|
-
asset_type=AssetTypes.distribution_junction_box,
|
23
|
-
prob_function=frag.ProbabilityFunction(
|
24
|
-
distribution="expon", parameters=[Distance(0.5, "km"), 0.95]
|
25
|
-
),
|
26
|
-
),
|
27
|
-
frag.FragilityCurve(
|
28
|
-
asset_type=AssetTypes.distribution_overhead_lines,
|
29
|
-
prob_function=frag.ProbabilityFunction(
|
30
|
-
distribution="expon", parameters=[Distance(0.5, "km"), 0.95]
|
31
|
-
),
|
32
|
-
),
|
33
|
-
frag.FragilityCurve(
|
34
|
-
asset_type=AssetTypes.distribution_poles,
|
35
|
-
prob_function=frag.ProbabilityFunction(
|
36
|
-
distribution="expon", parameters=[Distance(1.0, "km"), 0.95]
|
37
|
-
),
|
38
|
-
),
|
39
|
-
frag.FragilityCurve(
|
40
|
-
asset_type=AssetTypes.distribution_underground_cables,
|
41
|
-
prob_function=frag.ProbabilityFunction(
|
42
|
-
distribution="expon", parameters=[Distance(0.1, "km"), 0.95]
|
43
|
-
),
|
44
|
-
),
|
45
|
-
frag.FragilityCurve(
|
46
|
-
asset_type=AssetTypes.solar_panels,
|
47
|
-
prob_function=frag.ProbabilityFunction(
|
48
|
-
distribution="expon", parameters=[Distance(0.55, "km"), 0.95]
|
49
|
-
),
|
50
|
-
),
|
51
|
-
frag.FragilityCurve(
|
52
|
-
asset_type=AssetTypes.substation,
|
53
|
-
prob_function=frag.ProbabilityFunction(
|
54
|
-
distribution="expon", parameters=[Distance(0.7, "km"), 0.95]
|
55
|
-
),
|
56
|
-
),
|
57
|
-
frag.FragilityCurve(
|
58
|
-
asset_type=AssetTypes.transformer_mad_mount,
|
59
|
-
prob_function=frag.ProbabilityFunction(
|
60
|
-
distribution="expon", parameters=[Distance(0.9, "km"), 0.95]
|
61
|
-
),
|
62
|
-
),
|
63
|
-
frag.FragilityCurve(
|
64
|
-
asset_type=AssetTypes.transformer_pole_mount,
|
65
|
-
prob_function=frag.ProbabilityFunction(
|
66
|
-
distribution="expon", parameters=[Distance(1.0, "km"), 0.95]
|
67
|
-
),
|
68
|
-
),
|
69
|
-
frag.FragilityCurve(
|
70
|
-
asset_type=AssetTypes.transmission_junction_box,
|
71
|
-
prob_function=frag.ProbabilityFunction(
|
72
|
-
distribution="expon", parameters=[Distance(0.55, "km"), 0.95]
|
73
|
-
),
|
74
|
-
),
|
75
|
-
frag.FragilityCurve(
|
76
|
-
asset_type=AssetTypes.transmission_overhead_lines,
|
77
|
-
prob_function=frag.ProbabilityFunction(
|
78
|
-
distribution="expon", parameters=[Distance(1.1, "km"), 0.95]
|
79
|
-
),
|
80
|
-
),
|
81
|
-
frag.FragilityCurve(
|
82
|
-
asset_type=AssetTypes.transmission_tower,
|
83
|
-
prob_function=frag.ProbabilityFunction(
|
84
|
-
distribution="expon", parameters=[Distance(0.7, "km"), 0.95]
|
85
|
-
),
|
86
|
-
),
|
87
|
-
frag.FragilityCurve(
|
88
|
-
asset_type=AssetTypes.transmission_underground_cables,
|
89
|
-
prob_function=frag.ProbabilityFunction(
|
90
|
-
distribution="expon", parameters=[Distance(0.15, "km"), 0.95]
|
91
|
-
),
|
92
|
-
),
|
93
|
-
],
|
94
|
-
)
|
@@ -1,108 +0,0 @@
|
|
1
|
-
from gdm.quantities import Distance
|
2
|
-
|
3
|
-
import erad.models.fragility_curve as frag
|
4
|
-
from erad.enums import AssetTypes
|
5
|
-
|
6
|
-
DEFAULT_FLOOD_DEPTH_FRAGILITY_CURVES = frag.HazardFragilityCurves(
|
7
|
-
asset_state_param="flood_depth",
|
8
|
-
curves=[
|
9
|
-
frag.FragilityCurve(
|
10
|
-
asset_type=AssetTypes.switch,
|
11
|
-
prob_function=frag.ProbabilityFunction(
|
12
|
-
distribution="lognorm",
|
13
|
-
parameters=[Distance(0.35, "m"), Distance(0.50, "m"), 1 / 0.35],
|
14
|
-
),
|
15
|
-
),
|
16
|
-
frag.FragilityCurve(
|
17
|
-
asset_type=AssetTypes.battery_storage,
|
18
|
-
prob_function=frag.ProbabilityFunction(
|
19
|
-
distribution="lognorm",
|
20
|
-
parameters=[Distance(0.35, "m"), Distance(0.50, "m"), 1 / 0.35],
|
21
|
-
),
|
22
|
-
),
|
23
|
-
frag.FragilityCurve(
|
24
|
-
asset_type=AssetTypes.distribution_junction_box,
|
25
|
-
prob_function=frag.ProbabilityFunction(
|
26
|
-
distribution="lognorm",
|
27
|
-
parameters=[Distance(0.40, "m"), Distance(1.0, "m"), 1 / 0.40],
|
28
|
-
),
|
29
|
-
),
|
30
|
-
frag.FragilityCurve(
|
31
|
-
asset_type=AssetTypes.distribution_overhead_lines,
|
32
|
-
prob_function=frag.ProbabilityFunction(
|
33
|
-
distribution="lognorm",
|
34
|
-
parameters=[Distance(0.35, "m"), Distance(1.0, "m"), 1 / 0.35],
|
35
|
-
),
|
36
|
-
),
|
37
|
-
frag.FragilityCurve(
|
38
|
-
asset_type=AssetTypes.distribution_poles,
|
39
|
-
prob_function=frag.ProbabilityFunction(
|
40
|
-
distribution="lognorm",
|
41
|
-
parameters=[Distance(0.35, "m"), Distance(1.0, "m"), 1 / 0.35],
|
42
|
-
),
|
43
|
-
),
|
44
|
-
frag.FragilityCurve(
|
45
|
-
asset_type=AssetTypes.distribution_underground_cables,
|
46
|
-
prob_function=frag.ProbabilityFunction(
|
47
|
-
distribution="lognorm",
|
48
|
-
parameters=[Distance(0.8, "m"), Distance(1.0, "m"), 1 / 0.8],
|
49
|
-
),
|
50
|
-
),
|
51
|
-
frag.FragilityCurve(
|
52
|
-
asset_type=AssetTypes.solar_panels,
|
53
|
-
prob_function=frag.ProbabilityFunction(
|
54
|
-
distribution="lognorm",
|
55
|
-
parameters=[Distance(0.35, "m"), Distance(0.6, "m"), 1 / 0.35],
|
56
|
-
),
|
57
|
-
),
|
58
|
-
frag.FragilityCurve(
|
59
|
-
asset_type=AssetTypes.substation,
|
60
|
-
prob_function=frag.ProbabilityFunction(
|
61
|
-
distribution="lognorm",
|
62
|
-
parameters=[Distance(0.40, "m"), Distance(1.0, "m"), 1 / 0.4],
|
63
|
-
),
|
64
|
-
),
|
65
|
-
frag.FragilityCurve(
|
66
|
-
asset_type=AssetTypes.transformer_mad_mount,
|
67
|
-
prob_function=frag.ProbabilityFunction(
|
68
|
-
distribution="lognorm",
|
69
|
-
parameters=[Distance(0.35, "m"), Distance(0.6, "m"), 1 / 0.35],
|
70
|
-
),
|
71
|
-
),
|
72
|
-
frag.FragilityCurve(
|
73
|
-
asset_type=AssetTypes.transformer_pole_mount,
|
74
|
-
prob_function=frag.ProbabilityFunction(
|
75
|
-
distribution="lognorm",
|
76
|
-
parameters=[Distance(0.30, "m"), Distance(0.8, "m"), 1 / 0.3],
|
77
|
-
),
|
78
|
-
),
|
79
|
-
frag.FragilityCurve(
|
80
|
-
asset_type=AssetTypes.transmission_junction_box,
|
81
|
-
prob_function=frag.ProbabilityFunction(
|
82
|
-
distribution="lognorm",
|
83
|
-
parameters=[Distance(0.40, "m"), Distance(1.0, "m"), 1 / 0.40],
|
84
|
-
),
|
85
|
-
),
|
86
|
-
frag.FragilityCurve(
|
87
|
-
asset_type=AssetTypes.transmission_overhead_lines,
|
88
|
-
prob_function=frag.ProbabilityFunction(
|
89
|
-
distribution="lognorm",
|
90
|
-
parameters=[Distance(0.30, "m"), Distance(1.8, "m"), 1 / 0.3],
|
91
|
-
),
|
92
|
-
),
|
93
|
-
frag.FragilityCurve(
|
94
|
-
asset_type=AssetTypes.transmission_tower,
|
95
|
-
prob_function=frag.ProbabilityFunction(
|
96
|
-
distribution="lognorm",
|
97
|
-
parameters=[Distance(0.40, "m"), Distance(2.2, "m"), 1 / 0.40],
|
98
|
-
),
|
99
|
-
),
|
100
|
-
frag.FragilityCurve(
|
101
|
-
asset_type=AssetTypes.transmission_underground_cables,
|
102
|
-
prob_function=frag.ProbabilityFunction(
|
103
|
-
distribution="lognorm",
|
104
|
-
parameters=[Distance(0.25, "m"), Distance(0.8, "m"), 1 / 0.25],
|
105
|
-
),
|
106
|
-
),
|
107
|
-
],
|
108
|
-
)
|