NREL-erad 0.0.0a0__tar.gz → 0.1.1__tar.gz
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.
- nrel_erad-0.1.1/PKG-INFO +61 -0
- nrel_erad-0.1.1/README.md +20 -0
- nrel_erad-0.1.1/pyproject.toml +118 -0
- {NREL-erad-0.0.0a0 → nrel_erad-0.1.1}/setup.cfg +4 -4
- nrel_erad-0.1.1/src/NREL_erad.egg-info/PKG-INFO +61 -0
- nrel_erad-0.1.1/src/NREL_erad.egg-info/SOURCES.txt +48 -0
- nrel_erad-0.1.1/src/NREL_erad.egg-info/requires.txt +27 -0
- nrel_erad-0.1.1/src/erad/__init__.py +1 -0
- nrel_erad-0.1.1/src/erad/constants.py +89 -0
- nrel_erad-0.1.1/src/erad/default_fragility_curves/__init__.py +15 -0
- nrel_erad-0.1.1/src/erad/default_fragility_curves/default_fire_boundary_dist.py +94 -0
- nrel_erad-0.1.1/src/erad/default_fragility_curves/default_flood_depth.py +108 -0
- nrel_erad-0.1.1/src/erad/default_fragility_curves/default_flood_velocity.py +101 -0
- nrel_erad-0.1.1/src/erad/default_fragility_curves/default_fragility_curves.py +23 -0
- nrel_erad-0.1.1/src/erad/default_fragility_curves/default_peak_ground_acceleration.py +163 -0
- nrel_erad-0.1.1/src/erad/default_fragility_curves/default_peak_ground_velocity.py +94 -0
- nrel_erad-0.1.1/src/erad/default_fragility_curves/default_wind_speed.py +94 -0
- nrel_erad-0.1.1/src/erad/enums.py +40 -0
- nrel_erad-0.1.1/src/erad/gdm_mapping.py +83 -0
- nrel_erad-0.1.1/src/erad/models/__init__.py +1 -0
- nrel_erad-0.1.1/src/erad/models/asset.py +300 -0
- nrel_erad-0.1.1/src/erad/models/asset_mapping.py +20 -0
- nrel_erad-0.1.1/src/erad/models/edit_store.py +22 -0
- nrel_erad-0.1.1/src/erad/models/fragility_curve.py +116 -0
- nrel_erad-0.1.1/src/erad/models/hazard/__init__.py +5 -0
- nrel_erad-0.1.1/src/erad/models/hazard/base_models.py +12 -0
- nrel_erad-0.1.1/src/erad/models/hazard/common.py +26 -0
- nrel_erad-0.1.1/src/erad/models/hazard/earthquake.py +93 -0
- nrel_erad-0.1.1/src/erad/models/hazard/flood.py +83 -0
- nrel_erad-0.1.1/src/erad/models/hazard/wild_fire.py +121 -0
- nrel_erad-0.1.1/src/erad/models/hazard/wind.py +143 -0
- nrel_erad-0.1.1/src/erad/models/probability.py +76 -0
- nrel_erad-0.1.1/src/erad/probability_builder.py +38 -0
- nrel_erad-0.1.1/src/erad/quantities.py +31 -0
- nrel_erad-0.1.1/src/erad/runner.py +125 -0
- nrel_erad-0.1.1/src/erad/systems/__init__.py +2 -0
- nrel_erad-0.1.1/src/erad/systems/asset_system.py +462 -0
- nrel_erad-0.1.1/src/erad/systems/hazard_system.py +122 -0
- nrel_erad-0.1.1/tests/test_asset_system.py +42 -0
- nrel_erad-0.1.1/tests/test_fragility_curves.py +88 -0
- nrel_erad-0.1.1/tests/test_from_history.py +13 -0
- nrel_erad-0.1.1/tests/test_gdm_model_interface.py +51 -0
- nrel_erad-0.1.1/tests/test_hazard_scenario_generator.py +36 -0
- nrel_erad-0.1.1/tests/test_hazard_system.py +71 -0
- nrel_erad-0.1.1/tests/test_models.py +8 -0
- nrel_erad-0.1.1/tests/test_plot_probability_fuctions.py +11 -0
- nrel_erad-0.1.1/tests/test_runner.py +31 -0
- NREL-erad-0.0.0a0/NREL_erad.egg-info/PKG-INFO +0 -31
- NREL-erad-0.0.0a0/NREL_erad.egg-info/SOURCES.txt +0 -45
- NREL-erad-0.0.0a0/NREL_erad.egg-info/requires.txt +0 -32
- NREL-erad-0.0.0a0/PKG-INFO +0 -31
- NREL-erad-0.0.0a0/README.md +0 -15
- NREL-erad-0.0.0a0/erad/__init__.py +0 -0
- NREL-erad-0.0.0a0/erad/constants.py +0 -20
- NREL-erad-0.0.0a0/erad/cypher_queries/load_data_v1.cypher +0 -212
- NREL-erad-0.0.0a0/erad/data/World_Earthquakes_1960_2016.csv +0 -23410
- NREL-erad-0.0.0a0/erad/db/__init__.py +0 -0
- NREL-erad-0.0.0a0/erad/db/assets/__init__.py +0 -0
- NREL-erad-0.0.0a0/erad/db/assets/critical_infras.py +0 -171
- NREL-erad-0.0.0a0/erad/db/assets/distribution_lines.py +0 -101
- NREL-erad-0.0.0a0/erad/db/credential_model.py +0 -20
- NREL-erad-0.0.0a0/erad/db/disaster_input_model.py +0 -23
- NREL-erad-0.0.0a0/erad/db/inject_earthquake.py +0 -52
- NREL-erad-0.0.0a0/erad/db/inject_flooding.py +0 -53
- NREL-erad-0.0.0a0/erad/db/neo4j_.py +0 -162
- NREL-erad-0.0.0a0/erad/db/utils.py +0 -14
- NREL-erad-0.0.0a0/erad/exceptions.py +0 -68
- NREL-erad-0.0.0a0/erad/metrics/__init__.py +0 -0
- NREL-erad-0.0.0a0/erad/metrics/check_microgrid.py +0 -208
- NREL-erad-0.0.0a0/erad/metrics/metric.py +0 -178
- NREL-erad-0.0.0a0/erad/programs/__init__.py +0 -0
- NREL-erad-0.0.0a0/erad/programs/backup.py +0 -62
- NREL-erad-0.0.0a0/erad/programs/microgrid.py +0 -45
- NREL-erad-0.0.0a0/erad/scenarios/__init__.py +0 -0
- NREL-erad-0.0.0a0/erad/scenarios/abstract_scenario.py +0 -103
- NREL-erad-0.0.0a0/erad/scenarios/common.py +0 -93
- NREL-erad-0.0.0a0/erad/scenarios/earthquake_scenario.py +0 -161
- NREL-erad-0.0.0a0/erad/scenarios/fire_scenario.py +0 -160
- NREL-erad-0.0.0a0/erad/scenarios/flood_scenario.py +0 -494
- NREL-erad-0.0.0a0/erad/scenarios/utilities.py +0 -76
- NREL-erad-0.0.0a0/erad/scenarios/wind_scenario.py +0 -89
- NREL-erad-0.0.0a0/erad/utils/__init__.py +0 -0
- NREL-erad-0.0.0a0/erad/utils/ditto_utils.py +0 -252
- NREL-erad-0.0.0a0/erad/utils/hifld_utils.py +0 -147
- NREL-erad-0.0.0a0/erad/utils/opendss_utils.py +0 -357
- NREL-erad-0.0.0a0/erad/utils/overpass.py +0 -76
- NREL-erad-0.0.0a0/erad/utils/util.py +0 -178
- NREL-erad-0.0.0a0/erad/visualization/__init__.py +0 -0
- NREL-erad-0.0.0a0/erad/visualization/plot_graph.py +0 -218
- NREL-erad-0.0.0a0/setup.py +0 -54
- {NREL-erad-0.0.0a0 → nrel_erad-0.1.1}/LICENSE.txt +0 -0
- {NREL-erad-0.0.0a0 → nrel_erad-0.1.1/src}/NREL_erad.egg-info/dependency_links.txt +0 -0
- {NREL-erad-0.0.0a0 → nrel_erad-0.1.1/src}/NREL_erad.egg-info/top_level.txt +0 -0
nrel_erad-0.1.1/PKG-INFO
ADDED
@@ -0,0 +1,61 @@
|
|
1
|
+
Metadata-Version: 2.4
|
2
|
+
Name: NREL-erad
|
3
|
+
Version: 0.1.1
|
4
|
+
Summary: Graph based scalable tool for computing energy resilience metrics for distribution systems.
|
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>
|
7
|
+
Project-URL: Homepage, https://github.com/nrel/erad
|
8
|
+
Keywords: Distribution,Earthquake,Energy,Fire,Flooding,Power,Python,Resilience,Systems
|
9
|
+
Classifier: License :: OSI Approved :: BSD License
|
10
|
+
Classifier: Operating System :: OS Independent
|
11
|
+
Classifier: Programming Language :: Python :: 3.8
|
12
|
+
Requires-Python: >=3.11
|
13
|
+
Description-Content-Type: text/markdown
|
14
|
+
License-File: LICENSE.txt
|
15
|
+
Requires-Dist: grid-data-models~=2.1.3
|
16
|
+
Requires-Dist: gdmloader
|
17
|
+
Requires-Dist: geopandas
|
18
|
+
Requires-Dist: requests
|
19
|
+
Requires-Dist: shapely
|
20
|
+
Requires-Dist: pandas
|
21
|
+
Requires-Dist: pyhigh
|
22
|
+
Requires-Dist: geopy
|
23
|
+
Requires-Dist: scipy
|
24
|
+
Provides-Extra: dev
|
25
|
+
Requires-Dist: black; extra == "dev"
|
26
|
+
Requires-Dist: mkdocs; extra == "dev"
|
27
|
+
Requires-Dist: mkdocs-jupyter; extra == "dev"
|
28
|
+
Requires-Dist: mkdocs-material; extra == "dev"
|
29
|
+
Requires-Dist: mkdocstrings[python]; extra == "dev"
|
30
|
+
Requires-Dist: pylint; extra == "dev"
|
31
|
+
Requires-Dist: pytest; extra == "dev"
|
32
|
+
Requires-Dist: pytest-cov; extra == "dev"
|
33
|
+
Requires-Dist: ruff; extra == "dev"
|
34
|
+
Provides-Extra: doc
|
35
|
+
Requires-Dist: sphinx; extra == "doc"
|
36
|
+
Requires-Dist: pydata-sphinx-theme; extra == "doc"
|
37
|
+
Requires-Dist: myst-parser; extra == "doc"
|
38
|
+
Requires-Dist: autodoc_pydantic; extra == "doc"
|
39
|
+
Requires-Dist: sphinxcontrib-mermaid; extra == "doc"
|
40
|
+
Dynamic: license-file
|
41
|
+
|
42
|
+
# ERAD (<u>E</u>nergy <u>R</u>esilience <u>A</u>nalysis for electric <u>D</u>istribution systems)
|
43
|
+
<p align="center">
|
44
|
+
<img src="docs/images/logo.svg" width="250" style="display:flex;justify-content:center;">
|
45
|
+
<p align="center">Graph based python tool for computing energy resilience. </p>
|
46
|
+
</p>
|
47
|
+
|
48
|
+

|
49
|
+

|
50
|
+
[](https://www.codefactor.io/repository/github/nrel/erad)
|
51
|
+
[](https://github.com/NREL/erad/blob/main/LICENSE.txt)
|
52
|
+
[](https://github.com/NREL/erad/issues)
|
53
|
+

|
54
|
+
|
55
|
+
[Visit full documentation here.](https://nrel.github.io/erad/)
|
56
|
+
|
57
|
+
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.
|
58
|
+
|
59
|
+
ERAD is a free, open-source Python toolkit for computing energy 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 energy resilience.
|
60
|
+
|
61
|
+
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 energy resilience. It was funded by National Renewable Energy Laboratory (NREL) and made publicly available with open license.
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# ERAD (<u>E</u>nergy <u>R</u>esilience <u>A</u>nalysis for electric <u>D</u>istribution systems)
|
2
|
+
<p align="center">
|
3
|
+
<img src="docs/images/logo.svg" width="250" style="display:flex;justify-content:center;">
|
4
|
+
<p align="center">Graph based python tool for computing energy resilience. </p>
|
5
|
+
</p>
|
6
|
+
|
7
|
+

|
8
|
+

|
9
|
+
[](https://www.codefactor.io/repository/github/nrel/erad)
|
10
|
+
[](https://github.com/NREL/erad/blob/main/LICENSE.txt)
|
11
|
+
[](https://github.com/NREL/erad/issues)
|
12
|
+

|
13
|
+
|
14
|
+
[Visit full documentation here.](https://nrel.github.io/erad/)
|
15
|
+
|
16
|
+
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.
|
17
|
+
|
18
|
+
ERAD is a free, open-source Python toolkit for computing energy 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 energy resilience.
|
19
|
+
|
20
|
+
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 energy resilience. It was funded by National Renewable Energy Laboratory (NREL) and made publicly available with open license.
|
@@ -0,0 +1,118 @@
|
|
1
|
+
[build-system]
|
2
|
+
requires = ["setuptools >= 61.0"]
|
3
|
+
build-backend = "setuptools.build_meta"
|
4
|
+
|
5
|
+
[project]
|
6
|
+
name = "NREL-erad"
|
7
|
+
version="0.1.1"
|
8
|
+
description = "Graph based scalable tool for computing energy resilience metrics for distribution systems."
|
9
|
+
readme = "README.md"
|
10
|
+
requires-python = ">=3.11"
|
11
|
+
authors = [
|
12
|
+
{ name = "Kapil Duwadi", email = "kapil.duwadi@nrel.gov" },
|
13
|
+
{ name = "Aadil Latif", email = "aadil.altif@nrel.gov" },
|
14
|
+
{ name = "Kwami Sedzro", email = "sherinann.abraham@nrel.gov" },
|
15
|
+
{ name = "Sherin Ann Abraham", email = "kwami.sedzro@nrel.gov" },
|
16
|
+
{ name = "Bryan Palmintier", email = "bryan.palmintier@nrel.gov" },
|
17
|
+
]
|
18
|
+
maintainers = [
|
19
|
+
{ name = "Aadil Latif", email = "Aadil.Latif@nrel.gov" },
|
20
|
+
]
|
21
|
+
keywords = [
|
22
|
+
"Distribution",
|
23
|
+
"Earthquake",
|
24
|
+
"Energy",
|
25
|
+
"Fire",
|
26
|
+
"Flooding",
|
27
|
+
"Power",
|
28
|
+
"Python",
|
29
|
+
"Resilience",
|
30
|
+
"Systems",
|
31
|
+
]
|
32
|
+
classifiers = [
|
33
|
+
"License :: OSI Approved :: BSD License",
|
34
|
+
"Operating System :: OS Independent",
|
35
|
+
"Programming Language :: Python :: 3.8",
|
36
|
+
]
|
37
|
+
dependencies = [
|
38
|
+
"grid-data-models~=2.1.3",
|
39
|
+
"gdmloader",
|
40
|
+
"geopandas",
|
41
|
+
"requests",
|
42
|
+
"shapely",
|
43
|
+
"pandas",
|
44
|
+
"pyhigh",
|
45
|
+
"geopy",
|
46
|
+
"scipy",
|
47
|
+
]
|
48
|
+
|
49
|
+
|
50
|
+
|
51
|
+
[project.optional-dependencies]
|
52
|
+
dev = [
|
53
|
+
"black",
|
54
|
+
"mkdocs",
|
55
|
+
"mkdocs-jupyter",
|
56
|
+
"mkdocs-material",
|
57
|
+
"mkdocstrings[python]",
|
58
|
+
"pylint",
|
59
|
+
"pytest",
|
60
|
+
"pytest-cov",
|
61
|
+
"ruff"
|
62
|
+
]
|
63
|
+
doc = [
|
64
|
+
"sphinx",
|
65
|
+
"pydata-sphinx-theme",
|
66
|
+
"myst-parser",
|
67
|
+
"autodoc_pydantic",
|
68
|
+
"sphinxcontrib-mermaid",
|
69
|
+
]
|
70
|
+
|
71
|
+
[project.urls]
|
72
|
+
Homepage = "https://github.com/nrel/erad"
|
73
|
+
|
74
|
+
|
75
|
+
[tool.ruff]
|
76
|
+
# Exclude a variety of commonly ignored directories.
|
77
|
+
exclude = [
|
78
|
+
".git",
|
79
|
+
".ruff_cache",
|
80
|
+
".venv",
|
81
|
+
"_build",
|
82
|
+
"build",
|
83
|
+
"dist",
|
84
|
+
"env",
|
85
|
+
"venv",
|
86
|
+
]
|
87
|
+
ignore-init-module-imports = true
|
88
|
+
line-length = 99
|
89
|
+
indent-width = 4
|
90
|
+
target-version = "py311"
|
91
|
+
|
92
|
+
[tool.ruff.lint]
|
93
|
+
# Enable Pyflakes (`F`) and a subset of the pycodestyle (`E`) codes by default.
|
94
|
+
select = [
|
95
|
+
"C901", # McCabe complexity
|
96
|
+
"E4", # Subset of pycodestyle (E)
|
97
|
+
"E7",
|
98
|
+
"E9",
|
99
|
+
"F", # Pyflakes
|
100
|
+
"W", # pycodestyle warnings
|
101
|
+
]
|
102
|
+
ignore = []
|
103
|
+
|
104
|
+
# Allow fix for all enabled rules (when `--fix`) is provided.
|
105
|
+
fixable = ["ALL"]
|
106
|
+
unfixable = []
|
107
|
+
|
108
|
+
[tool.ruff.format]
|
109
|
+
quote-style = "double"
|
110
|
+
indent-style = "space"
|
111
|
+
skip-magic-trailing-comma = false
|
112
|
+
line-ending = "auto"
|
113
|
+
docstring-code-format = true
|
114
|
+
docstring-code-line-length = "dynamic"
|
115
|
+
|
116
|
+
[tool.ruff.lint.per-file-ignores]
|
117
|
+
"__init__.py" = ["E402", "F401"]
|
118
|
+
"**/{tests,docs,tools}/*" = ["E402"]
|
@@ -1,4 +1,4 @@
|
|
1
|
-
[egg_info]
|
2
|
-
tag_build =
|
3
|
-
tag_date = 0
|
4
|
-
|
1
|
+
[egg_info]
|
2
|
+
tag_build =
|
3
|
+
tag_date = 0
|
4
|
+
|
@@ -0,0 +1,61 @@
|
|
1
|
+
Metadata-Version: 2.4
|
2
|
+
Name: NREL-erad
|
3
|
+
Version: 0.1.1
|
4
|
+
Summary: Graph based scalable tool for computing energy resilience metrics for distribution systems.
|
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>
|
7
|
+
Project-URL: Homepage, https://github.com/nrel/erad
|
8
|
+
Keywords: Distribution,Earthquake,Energy,Fire,Flooding,Power,Python,Resilience,Systems
|
9
|
+
Classifier: License :: OSI Approved :: BSD License
|
10
|
+
Classifier: Operating System :: OS Independent
|
11
|
+
Classifier: Programming Language :: Python :: 3.8
|
12
|
+
Requires-Python: >=3.11
|
13
|
+
Description-Content-Type: text/markdown
|
14
|
+
License-File: LICENSE.txt
|
15
|
+
Requires-Dist: grid-data-models~=2.1.3
|
16
|
+
Requires-Dist: gdmloader
|
17
|
+
Requires-Dist: geopandas
|
18
|
+
Requires-Dist: requests
|
19
|
+
Requires-Dist: shapely
|
20
|
+
Requires-Dist: pandas
|
21
|
+
Requires-Dist: pyhigh
|
22
|
+
Requires-Dist: geopy
|
23
|
+
Requires-Dist: scipy
|
24
|
+
Provides-Extra: dev
|
25
|
+
Requires-Dist: black; extra == "dev"
|
26
|
+
Requires-Dist: mkdocs; extra == "dev"
|
27
|
+
Requires-Dist: mkdocs-jupyter; extra == "dev"
|
28
|
+
Requires-Dist: mkdocs-material; extra == "dev"
|
29
|
+
Requires-Dist: mkdocstrings[python]; extra == "dev"
|
30
|
+
Requires-Dist: pylint; extra == "dev"
|
31
|
+
Requires-Dist: pytest; extra == "dev"
|
32
|
+
Requires-Dist: pytest-cov; extra == "dev"
|
33
|
+
Requires-Dist: ruff; extra == "dev"
|
34
|
+
Provides-Extra: doc
|
35
|
+
Requires-Dist: sphinx; extra == "doc"
|
36
|
+
Requires-Dist: pydata-sphinx-theme; extra == "doc"
|
37
|
+
Requires-Dist: myst-parser; extra == "doc"
|
38
|
+
Requires-Dist: autodoc_pydantic; extra == "doc"
|
39
|
+
Requires-Dist: sphinxcontrib-mermaid; extra == "doc"
|
40
|
+
Dynamic: license-file
|
41
|
+
|
42
|
+
# ERAD (<u>E</u>nergy <u>R</u>esilience <u>A</u>nalysis for electric <u>D</u>istribution systems)
|
43
|
+
<p align="center">
|
44
|
+
<img src="docs/images/logo.svg" width="250" style="display:flex;justify-content:center;">
|
45
|
+
<p align="center">Graph based python tool for computing energy resilience. </p>
|
46
|
+
</p>
|
47
|
+
|
48
|
+

|
49
|
+

|
50
|
+
[](https://www.codefactor.io/repository/github/nrel/erad)
|
51
|
+
[](https://github.com/NREL/erad/blob/main/LICENSE.txt)
|
52
|
+
[](https://github.com/NREL/erad/issues)
|
53
|
+

|
54
|
+
|
55
|
+
[Visit full documentation here.](https://nrel.github.io/erad/)
|
56
|
+
|
57
|
+
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.
|
58
|
+
|
59
|
+
ERAD is a free, open-source Python toolkit for computing energy 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 energy resilience.
|
60
|
+
|
61
|
+
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 energy resilience. It was funded by National Renewable Energy Laboratory (NREL) and made publicly available with open license.
|
@@ -0,0 +1,48 @@
|
|
1
|
+
LICENSE.txt
|
2
|
+
README.md
|
3
|
+
pyproject.toml
|
4
|
+
src/NREL_erad.egg-info/PKG-INFO
|
5
|
+
src/NREL_erad.egg-info/SOURCES.txt
|
6
|
+
src/NREL_erad.egg-info/dependency_links.txt
|
7
|
+
src/NREL_erad.egg-info/requires.txt
|
8
|
+
src/NREL_erad.egg-info/top_level.txt
|
9
|
+
src/erad/__init__.py
|
10
|
+
src/erad/constants.py
|
11
|
+
src/erad/enums.py
|
12
|
+
src/erad/gdm_mapping.py
|
13
|
+
src/erad/probability_builder.py
|
14
|
+
src/erad/quantities.py
|
15
|
+
src/erad/runner.py
|
16
|
+
src/erad/default_fragility_curves/__init__.py
|
17
|
+
src/erad/default_fragility_curves/default_fire_boundary_dist.py
|
18
|
+
src/erad/default_fragility_curves/default_flood_depth.py
|
19
|
+
src/erad/default_fragility_curves/default_flood_velocity.py
|
20
|
+
src/erad/default_fragility_curves/default_fragility_curves.py
|
21
|
+
src/erad/default_fragility_curves/default_peak_ground_acceleration.py
|
22
|
+
src/erad/default_fragility_curves/default_peak_ground_velocity.py
|
23
|
+
src/erad/default_fragility_curves/default_wind_speed.py
|
24
|
+
src/erad/models/__init__.py
|
25
|
+
src/erad/models/asset.py
|
26
|
+
src/erad/models/asset_mapping.py
|
27
|
+
src/erad/models/edit_store.py
|
28
|
+
src/erad/models/fragility_curve.py
|
29
|
+
src/erad/models/probability.py
|
30
|
+
src/erad/models/hazard/__init__.py
|
31
|
+
src/erad/models/hazard/base_models.py
|
32
|
+
src/erad/models/hazard/common.py
|
33
|
+
src/erad/models/hazard/earthquake.py
|
34
|
+
src/erad/models/hazard/flood.py
|
35
|
+
src/erad/models/hazard/wild_fire.py
|
36
|
+
src/erad/models/hazard/wind.py
|
37
|
+
src/erad/systems/__init__.py
|
38
|
+
src/erad/systems/asset_system.py
|
39
|
+
src/erad/systems/hazard_system.py
|
40
|
+
tests/test_asset_system.py
|
41
|
+
tests/test_fragility_curves.py
|
42
|
+
tests/test_from_history.py
|
43
|
+
tests/test_gdm_model_interface.py
|
44
|
+
tests/test_hazard_scenario_generator.py
|
45
|
+
tests/test_hazard_system.py
|
46
|
+
tests/test_models.py
|
47
|
+
tests/test_plot_probability_fuctions.py
|
48
|
+
tests/test_runner.py
|
@@ -0,0 +1,27 @@
|
|
1
|
+
grid-data-models~=2.1.3
|
2
|
+
gdmloader
|
3
|
+
geopandas
|
4
|
+
requests
|
5
|
+
shapely
|
6
|
+
pandas
|
7
|
+
pyhigh
|
8
|
+
geopy
|
9
|
+
scipy
|
10
|
+
|
11
|
+
[dev]
|
12
|
+
black
|
13
|
+
mkdocs
|
14
|
+
mkdocs-jupyter
|
15
|
+
mkdocs-material
|
16
|
+
mkdocstrings[python]
|
17
|
+
pylint
|
18
|
+
pytest
|
19
|
+
pytest-cov
|
20
|
+
ruff
|
21
|
+
|
22
|
+
[doc]
|
23
|
+
sphinx
|
24
|
+
pydata-sphinx-theme
|
25
|
+
myst-parser
|
26
|
+
autodoc_pydantic
|
27
|
+
sphinxcontrib-mermaid
|
@@ -0,0 +1 @@
|
|
1
|
+
__version__ = "0.0.1"
|
@@ -0,0 +1,89 @@
|
|
1
|
+
"""Module for managing constants in ERAD package.
|
2
|
+
|
3
|
+
_Do not change this constants in your code._
|
4
|
+
"""
|
5
|
+
|
6
|
+
from datetime import datetime
|
7
|
+
from pathlib import Path
|
8
|
+
|
9
|
+
import elevation
|
10
|
+
|
11
|
+
import erad.models.fragility_curve as frag
|
12
|
+
import erad.models.probability as prob
|
13
|
+
import erad.models.hazard as hazard
|
14
|
+
import erad.models.asset as asset
|
15
|
+
|
16
|
+
from erad.enums import AssetTypes
|
17
|
+
|
18
|
+
# Get list of continuous distributions
|
19
|
+
|
20
|
+
RASTER_DOWNLOAD_PATH = Path(elevation.CACHE_DIR) / "SRTM1" / "raster.tif"
|
21
|
+
ROOT_PATH = Path(__file__).parent.parent.parent
|
22
|
+
TEST_PATH = Path(__file__).parent.parent.parent / "tests"
|
23
|
+
DATA_FOLDER_NAME = "data"
|
24
|
+
DATA_FOLDER = TEST_PATH / DATA_FOLDER_NAME
|
25
|
+
|
26
|
+
DEFAULT_TIME_STAMP = datetime(1970, 1, 1, 0, 0, 0)
|
27
|
+
|
28
|
+
DEFAULT_HEIGHTS_M = {
|
29
|
+
AssetTypes.substation: 0.0,
|
30
|
+
AssetTypes.solar_panels: 3.0,
|
31
|
+
AssetTypes.distribution_underground_cables: -1.0,
|
32
|
+
AssetTypes.transmission_underground_cables: -1.0,
|
33
|
+
AssetTypes.battery_storage: 1.0,
|
34
|
+
AssetTypes.transmission_tower: 0.0,
|
35
|
+
AssetTypes.distribution_poles: 0.0,
|
36
|
+
AssetTypes.transmission_overhead_lines: 30.0,
|
37
|
+
AssetTypes.distribution_overhead_lines: 10.0,
|
38
|
+
AssetTypes.transformer_mad_mount: 0.3,
|
39
|
+
AssetTypes.transformer_pole_mount: 6.0,
|
40
|
+
AssetTypes.transmission_junction_box: -1.0,
|
41
|
+
AssetTypes.distribution_junction_box: -1.0,
|
42
|
+
AssetTypes.switch: 6.0,
|
43
|
+
}
|
44
|
+
|
45
|
+
ASSET_TYPES = (
|
46
|
+
asset.AssetState,
|
47
|
+
asset.Asset,
|
48
|
+
prob.AccelerationProbability,
|
49
|
+
prob.TemperatureProbability,
|
50
|
+
prob.DistanceProbability,
|
51
|
+
prob.SpeedProbability,
|
52
|
+
)
|
53
|
+
|
54
|
+
HAZARD_TYPES = (
|
55
|
+
hazard.EarthQuakeModel,
|
56
|
+
hazard.FloodModel,
|
57
|
+
hazard.FireModel,
|
58
|
+
hazard.WindModel,
|
59
|
+
)
|
60
|
+
|
61
|
+
HAZARD_MODELS = (
|
62
|
+
hazard.EarthQuakeModel,
|
63
|
+
hazard.FloodModelArea,
|
64
|
+
hazard.FireModelArea,
|
65
|
+
hazard.FloodModel,
|
66
|
+
hazard.FireModel,
|
67
|
+
hazard.WindModel,
|
68
|
+
frag.ProbabilityFunction,
|
69
|
+
frag.FragilityCurve,
|
70
|
+
frag.HazardFragilityCurves,
|
71
|
+
)
|
72
|
+
|
73
|
+
SUPPORTED_MODELS = [
|
74
|
+
hazard.EarthQuakeModel,
|
75
|
+
hazard.FloodModelArea,
|
76
|
+
hazard.FireModelArea,
|
77
|
+
hazard.FloodModel,
|
78
|
+
hazard.FireModel,
|
79
|
+
hazard.WindModel,
|
80
|
+
prob.AccelerationProbability,
|
81
|
+
prob.TemperatureProbability,
|
82
|
+
prob.DistanceProbability,
|
83
|
+
prob.SpeedProbability,
|
84
|
+
frag.ProbabilityFunction,
|
85
|
+
frag.FragilityCurve,
|
86
|
+
frag.HazardFragilityCurves,
|
87
|
+
asset.AssetState,
|
88
|
+
asset.Asset,
|
89
|
+
]
|
@@ -0,0 +1,15 @@
|
|
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
|
@@ -0,0 +1,94 @@
|
|
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
|
+
)
|
@@ -0,0 +1,108 @@
|
|
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
|
+
)
|