grid-data-models 0.0.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.
- grid_data_models-0.0.1/.github/workflows/gh-pages.yml +31 -0
- grid_data_models-0.0.1/.github/workflows/main_test.yaml +39 -0
- grid_data_models-0.0.1/.github/workflows/publish_to_pypi.yaml +27 -0
- grid_data_models-0.0.1/.github/workflows/pull_request_tests.yml +33 -0
- grid_data_models-0.0.1/.gitignore +163 -0
- grid_data_models-0.0.1/.pre-commit-config.yaml +10 -0
- grid_data_models-0.0.1/LICENSE.txt +29 -0
- grid_data_models-0.0.1/PKG-INFO +54 -0
- grid_data_models-0.0.1/README.md +27 -0
- grid_data_models-0.0.1/docs/Makefile +20 -0
- grid_data_models-0.0.1/docs/api/distribution_branch.md +9 -0
- grid_data_models-0.0.1/docs/api/distribution_bus.md +9 -0
- grid_data_models-0.0.1/docs/api/distribution_capacitor.md +9 -0
- grid_data_models-0.0.1/docs/api/distribution_component.md +9 -0
- grid_data_models-0.0.1/docs/api/distribution_enum.md +8 -0
- grid_data_models-0.0.1/docs/api/distribution_feeder.md +8 -0
- grid_data_models-0.0.1/docs/api/distribution_load.md +9 -0
- grid_data_models-0.0.1/docs/api/distribution_substation.md +8 -0
- grid_data_models-0.0.1/docs/api/distribution_transformer.md +9 -0
- grid_data_models-0.0.1/docs/api/distribution_transformer_equipment.md +9 -0
- grid_data_models-0.0.1/docs/api/distribution_vsource.md +9 -0
- grid_data_models-0.0.1/docs/api/distribution_wires.md +9 -0
- grid_data_models-0.0.1/docs/api/limitset.md +9 -0
- grid_data_models-0.0.1/docs/api/quantities.md +8 -0
- grid_data_models-0.0.1/docs/cim/cim-connectivity-node.PNG +0 -0
- grid_data_models-0.0.1/docs/cim/distribution-bus.md +86 -0
- grid_data_models-0.0.1/docs/cim/index.md +23 -0
- grid_data_models-0.0.1/docs/conf.py +88 -0
- grid_data_models-0.0.1/docs/index.md +63 -0
- grid_data_models-0.0.1/docs/install.md +10 -0
- grid_data_models-0.0.1/docs/make.bat +35 -0
- grid_data_models-0.0.1/pyproject.toml +75 -0
- grid_data_models-0.0.1/src/gdm/__init__.py +111 -0
- grid_data_models-0.0.1/src/gdm/bus.py +28 -0
- grid_data_models-0.0.1/src/gdm/capacitor.py +43 -0
- grid_data_models-0.0.1/src/gdm/dataset/__init__.py +0 -0
- grid_data_models-0.0.1/src/gdm/dataset/cost_model.py +49 -0
- grid_data_models-0.0.1/src/gdm/dataset/dataset_system.py +91 -0
- grid_data_models-0.0.1/src/gdm/distribution/__init__.py +3 -0
- grid_data_models-0.0.1/src/gdm/distribution/components/__init__.py +0 -0
- grid_data_models-0.0.1/src/gdm/distribution/components/distribution_branch.py +104 -0
- grid_data_models-0.0.1/src/gdm/distribution/components/distribution_bus.py +49 -0
- grid_data_models-0.0.1/src/gdm/distribution/components/distribution_capacitor.py +89 -0
- grid_data_models-0.0.1/src/gdm/distribution/components/distribution_component.py +25 -0
- grid_data_models-0.0.1/src/gdm/distribution/components/distribution_feeder.py +11 -0
- grid_data_models-0.0.1/src/gdm/distribution/components/distribution_fuse.py +13 -0
- grid_data_models-0.0.1/src/gdm/distribution/components/distribution_load.py +60 -0
- grid_data_models-0.0.1/src/gdm/distribution/components/distribution_recloser.py +13 -0
- grid_data_models-0.0.1/src/gdm/distribution/components/distribution_regulator.py +86 -0
- grid_data_models-0.0.1/src/gdm/distribution/components/distribution_solar.py +63 -0
- grid_data_models-0.0.1/src/gdm/distribution/components/distribution_substation.py +23 -0
- grid_data_models-0.0.1/src/gdm/distribution/components/distribution_switch.py +13 -0
- grid_data_models-0.0.1/src/gdm/distribution/components/distribution_transformer.py +132 -0
- grid_data_models-0.0.1/src/gdm/distribution/components/distribution_vsource.py +76 -0
- grid_data_models-0.0.1/src/gdm/distribution/components/geometry_branch.py +35 -0
- grid_data_models-0.0.1/src/gdm/distribution/components/matrix_impedance_branch.py +45 -0
- grid_data_models-0.0.1/src/gdm/distribution/components/matrix_impedance_fuse.py +24 -0
- grid_data_models-0.0.1/src/gdm/distribution/components/matrix_impedance_recloser.py +33 -0
- grid_data_models-0.0.1/src/gdm/distribution/components/matrix_impedance_switch.py +41 -0
- grid_data_models-0.0.1/src/gdm/distribution/components/sequence_impedance_branch.py +38 -0
- grid_data_models-0.0.1/src/gdm/distribution/controllers/__init__.py +0 -0
- grid_data_models-0.0.1/src/gdm/distribution/controllers/distribution_capacitor_controller.py +196 -0
- grid_data_models-0.0.1/src/gdm/distribution/controllers/distribution_inverter_controller.py +106 -0
- grid_data_models-0.0.1/src/gdm/distribution/controllers/distribution_recloser_controller.py +67 -0
- grid_data_models-0.0.1/src/gdm/distribution/controllers/distribution_regulator_controller.py +41 -0
- grid_data_models-0.0.1/src/gdm/distribution/controllers/distribution_switch_controller.py +28 -0
- grid_data_models-0.0.1/src/gdm/distribution/curve.py +67 -0
- grid_data_models-0.0.1/src/gdm/distribution/distribution_common.py +17 -0
- grid_data_models-0.0.1/src/gdm/distribution/distribution_enum.py +38 -0
- grid_data_models-0.0.1/src/gdm/distribution/distribution_graph.py +25 -0
- grid_data_models-0.0.1/src/gdm/distribution/distribution_system.py +26 -0
- grid_data_models-0.0.1/src/gdm/distribution/equipment/__init__.py +0 -0
- grid_data_models-0.0.1/src/gdm/distribution/equipment/bare_conductor_equipment.py +61 -0
- grid_data_models-0.0.1/src/gdm/distribution/equipment/capacitor_equipment.py +34 -0
- grid_data_models-0.0.1/src/gdm/distribution/equipment/concentric_cable_equipment.py +105 -0
- grid_data_models-0.0.1/src/gdm/distribution/equipment/distribution_transformer_equipment.py +248 -0
- grid_data_models-0.0.1/src/gdm/distribution/equipment/geometry_branch_equipment.py +57 -0
- grid_data_models-0.0.1/src/gdm/distribution/equipment/inverter_equipment.py +37 -0
- grid_data_models-0.0.1/src/gdm/distribution/equipment/load_equipment.py +31 -0
- grid_data_models-0.0.1/src/gdm/distribution/equipment/matrix_impedance_branch_equipment.py +56 -0
- grid_data_models-0.0.1/src/gdm/distribution/equipment/matrix_impedance_fuse_equipment.py +28 -0
- grid_data_models-0.0.1/src/gdm/distribution/equipment/matrix_impedance_recloser_equipment.py +16 -0
- grid_data_models-0.0.1/src/gdm/distribution/equipment/matrix_impedance_switch_equipment.py +29 -0
- grid_data_models-0.0.1/src/gdm/distribution/equipment/phase_capacitor_equipment.py +38 -0
- grid_data_models-0.0.1/src/gdm/distribution/equipment/phase_load_equipment.py +30 -0
- grid_data_models-0.0.1/src/gdm/distribution/equipment/recloser_controller_equipment.py +12 -0
- grid_data_models-0.0.1/src/gdm/distribution/equipment/sequence_impedance_branch_equipment.py +62 -0
- grid_data_models-0.0.1/src/gdm/distribution/equipment/solar_equipment.py +73 -0
- grid_data_models-0.0.1/src/gdm/distribution/limitset.py +32 -0
- grid_data_models-0.0.1/src/gdm/distribution/sequence_pair.py +10 -0
- grid_data_models-0.0.1/src/gdm/exceptions.py +13 -0
- grid_data_models-0.0.1/src/gdm/load.py +68 -0
- grid_data_models-0.0.1/src/gdm/quantities.py +146 -0
- grid_data_models-0.0.1/src/gdm/transformer.py +7 -0
- grid_data_models-0.0.1/src/gdm/transmission/transmission_branch.py +18 -0
- grid_data_models-0.0.1/src/gdm/transmission/transmission_bus.py +15 -0
- grid_data_models-0.0.1/src/gdm/transmission/transmission_capacitor.py +12 -0
- grid_data_models-0.0.1/src/gdm/transmission/transmission_component.py +13 -0
- grid_data_models-0.0.1/src/gdm/transmission/transmission_load.py +12 -0
- grid_data_models-0.0.1/src/gdm/transmission/transmission_substation.py +10 -0
- grid_data_models-0.0.1/tests/__init__.py +0 -0
- grid_data_models-0.0.1/tests/get_sample_system.py +150 -0
- grid_data_models-0.0.1/tests/test_dataset_system.py +46 -0
- grid_data_models-0.0.1/tests/test_distribution_examples.py +126 -0
- grid_data_models-0.0.1/tests/test_distribution_graph.py +22 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
name: Documentation
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
|
|
7
|
+
jobs:
|
|
8
|
+
make-pages:
|
|
9
|
+
runs-on: ubuntu-latest
|
|
10
|
+
steps:
|
|
11
|
+
- uses: actions/checkout@v4
|
|
12
|
+
- name: select python version
|
|
13
|
+
uses: actions/setup-python@v5
|
|
14
|
+
with:
|
|
15
|
+
python-version: "3.11"
|
|
16
|
+
- name: install dependencies
|
|
17
|
+
run: |
|
|
18
|
+
python -m pip install --upgrade pip
|
|
19
|
+
python -m pip install ".[doc]"
|
|
20
|
+
- name: build documentation
|
|
21
|
+
run: |
|
|
22
|
+
cd docs
|
|
23
|
+
make clean
|
|
24
|
+
make html
|
|
25
|
+
- name: deploy
|
|
26
|
+
uses: peaceiris/actions-gh-pages@v3.6.1
|
|
27
|
+
with:
|
|
28
|
+
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
29
|
+
publish_dir: ./docs/_build/html
|
|
30
|
+
force_orphan: true
|
|
31
|
+
full_commit_message: ${{ github.event.head_commit.message }}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
name: Main - CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
schedule:
|
|
5
|
+
- cron: "0 0 * * 1-5"
|
|
6
|
+
push:
|
|
7
|
+
branches:
|
|
8
|
+
- main
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
test:
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
strategy:
|
|
15
|
+
matrix:
|
|
16
|
+
python-version: ["3.11"]
|
|
17
|
+
|
|
18
|
+
steps:
|
|
19
|
+
- uses: actions/checkout@v4
|
|
20
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
21
|
+
uses: actions/setup-python@v5
|
|
22
|
+
with:
|
|
23
|
+
python-version: ${{ matrix.python-version }}
|
|
24
|
+
- name: Install dependencies
|
|
25
|
+
run: |
|
|
26
|
+
python -m pip install --upgrade pip
|
|
27
|
+
python -m pip install ".[dev]"
|
|
28
|
+
- name: Run pytest
|
|
29
|
+
run: |
|
|
30
|
+
python -m pytest -v --disable-warnings tests
|
|
31
|
+
ruff:
|
|
32
|
+
runs-on: ubuntu-latest
|
|
33
|
+
name: "ruff"
|
|
34
|
+
steps:
|
|
35
|
+
- uses: davidslusser/actions_python_ruff@v1.0.0
|
|
36
|
+
with:
|
|
37
|
+
src: "src"
|
|
38
|
+
pip_install_command: "pip install -e .[dev]"
|
|
39
|
+
python_version: "3.11"
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
name: Upload to PyPi
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
release:
|
|
5
|
+
types: [published]
|
|
6
|
+
|
|
7
|
+
jobs:
|
|
8
|
+
deploy:
|
|
9
|
+
runs-on: ubuntu-latest
|
|
10
|
+
steps:
|
|
11
|
+
- uses: actions/checkout@v4
|
|
12
|
+
- name: Set up Python
|
|
13
|
+
uses: actions/setup-python@v5
|
|
14
|
+
with:
|
|
15
|
+
python-version: 3.11
|
|
16
|
+
- name: Install dependencies
|
|
17
|
+
run: |
|
|
18
|
+
python -m pip install --upgrade pip
|
|
19
|
+
python -m pip install build
|
|
20
|
+
pip install setuptools wheel twine
|
|
21
|
+
- name: Build and publish
|
|
22
|
+
env:
|
|
23
|
+
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
|
|
24
|
+
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
|
|
25
|
+
run: |
|
|
26
|
+
python -m build
|
|
27
|
+
twine upload dist/*
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
name: Pytest
|
|
2
|
+
|
|
3
|
+
on: pull_request
|
|
4
|
+
|
|
5
|
+
jobs:
|
|
6
|
+
test:
|
|
7
|
+
runs-on: ubuntu-latest
|
|
8
|
+
strategy:
|
|
9
|
+
matrix:
|
|
10
|
+
python-version: ["3.11"]
|
|
11
|
+
|
|
12
|
+
steps:
|
|
13
|
+
- uses: actions/checkout@v4
|
|
14
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
15
|
+
uses: actions/setup-python@v5
|
|
16
|
+
with:
|
|
17
|
+
python-version: ${{ matrix.python-version }}
|
|
18
|
+
- name: Install dependencies
|
|
19
|
+
run: |
|
|
20
|
+
python -m pip install --upgrade pip
|
|
21
|
+
python -m pip install ".[dev]"
|
|
22
|
+
- name: Run pytest
|
|
23
|
+
run: |
|
|
24
|
+
python -m pytest -v --disable-warnings tests
|
|
25
|
+
ruff:
|
|
26
|
+
runs-on: ubuntu-latest
|
|
27
|
+
name: "ruff"
|
|
28
|
+
steps:
|
|
29
|
+
- uses: davidslusser/actions_python_ruff@v1.0.0
|
|
30
|
+
with:
|
|
31
|
+
src: "src"
|
|
32
|
+
pip_install_command: "pip install -e .[dev]"
|
|
33
|
+
python_version: "3.11"
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
# C extensions
|
|
7
|
+
*.so
|
|
8
|
+
*.code-workspace
|
|
9
|
+
*.sqlite
|
|
10
|
+
*.ruff_cache/
|
|
11
|
+
|
|
12
|
+
# Distribution / packaging
|
|
13
|
+
.Python
|
|
14
|
+
build/
|
|
15
|
+
develop-eggs/
|
|
16
|
+
dist/
|
|
17
|
+
downloads/
|
|
18
|
+
eggs/
|
|
19
|
+
.eggs/
|
|
20
|
+
lib/
|
|
21
|
+
lib64/
|
|
22
|
+
parts/
|
|
23
|
+
sdist/
|
|
24
|
+
var/
|
|
25
|
+
wheels/
|
|
26
|
+
share/python-wheels/
|
|
27
|
+
*.egg-info/
|
|
28
|
+
.installed.cfg
|
|
29
|
+
*.egg
|
|
30
|
+
MANIFEST
|
|
31
|
+
|
|
32
|
+
# PyInstaller
|
|
33
|
+
# Usually these files are written by a python script from a template
|
|
34
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
35
|
+
*.manifest
|
|
36
|
+
*.spec
|
|
37
|
+
|
|
38
|
+
# Installer logs
|
|
39
|
+
pip-log.txt
|
|
40
|
+
pip-delete-this-directory.txt
|
|
41
|
+
|
|
42
|
+
# Unit test / coverage reports
|
|
43
|
+
htmlcov/
|
|
44
|
+
.tox/
|
|
45
|
+
.nox/
|
|
46
|
+
.coverage
|
|
47
|
+
.coverage.*
|
|
48
|
+
.cache
|
|
49
|
+
nosetests.xml
|
|
50
|
+
coverage.xml
|
|
51
|
+
*.cover
|
|
52
|
+
*.py,cover
|
|
53
|
+
.hypothesis/
|
|
54
|
+
.pytest_cache/
|
|
55
|
+
cover/
|
|
56
|
+
|
|
57
|
+
# Translations
|
|
58
|
+
*.mo
|
|
59
|
+
*.pot
|
|
60
|
+
|
|
61
|
+
# Django stuff:
|
|
62
|
+
*.log
|
|
63
|
+
local_settings.py
|
|
64
|
+
db.sqlite3
|
|
65
|
+
db.sqlite3-journal
|
|
66
|
+
|
|
67
|
+
# Flask stuff:
|
|
68
|
+
instance/
|
|
69
|
+
.webassets-cache
|
|
70
|
+
|
|
71
|
+
# Scrapy stuff:
|
|
72
|
+
.scrapy
|
|
73
|
+
|
|
74
|
+
# Sphinx documentation
|
|
75
|
+
docs/_build/
|
|
76
|
+
|
|
77
|
+
# PyBuilder
|
|
78
|
+
.pybuilder/
|
|
79
|
+
target/
|
|
80
|
+
|
|
81
|
+
# Jupyter Notebook
|
|
82
|
+
.ipynb_checkpoints
|
|
83
|
+
|
|
84
|
+
# IPython
|
|
85
|
+
profile_default/
|
|
86
|
+
ipython_config.py
|
|
87
|
+
|
|
88
|
+
# pyenv
|
|
89
|
+
# For a library or package, you might want to ignore these files since the code is
|
|
90
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
91
|
+
# .python-version
|
|
92
|
+
|
|
93
|
+
# pipenv
|
|
94
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
95
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
96
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
97
|
+
# install all needed dependencies.
|
|
98
|
+
#Pipfile.lock
|
|
99
|
+
|
|
100
|
+
# poetry
|
|
101
|
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
|
102
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
103
|
+
# commonly ignored for libraries.
|
|
104
|
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
|
105
|
+
#poetry.lock
|
|
106
|
+
|
|
107
|
+
# pdm
|
|
108
|
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
|
109
|
+
#pdm.lock
|
|
110
|
+
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
|
|
111
|
+
# in version control.
|
|
112
|
+
# https://pdm.fming.dev/#use-with-ide
|
|
113
|
+
.pdm.toml
|
|
114
|
+
|
|
115
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
|
116
|
+
__pypackages__/
|
|
117
|
+
|
|
118
|
+
# Celery stuff
|
|
119
|
+
celerybeat-schedule
|
|
120
|
+
celerybeat.pid
|
|
121
|
+
|
|
122
|
+
# SageMath parsed files
|
|
123
|
+
*.sage.py
|
|
124
|
+
|
|
125
|
+
# Environments
|
|
126
|
+
.env
|
|
127
|
+
.venv
|
|
128
|
+
env/
|
|
129
|
+
venv/
|
|
130
|
+
ENV/
|
|
131
|
+
env.bak/
|
|
132
|
+
venv.bak/
|
|
133
|
+
|
|
134
|
+
# Spyder project settings
|
|
135
|
+
.spyderproject
|
|
136
|
+
.spyproject
|
|
137
|
+
|
|
138
|
+
# Rope project settings
|
|
139
|
+
.ropeproject
|
|
140
|
+
|
|
141
|
+
# mkdocs documentation
|
|
142
|
+
/site
|
|
143
|
+
|
|
144
|
+
# mypy
|
|
145
|
+
.mypy_cache/
|
|
146
|
+
.dmypy.json
|
|
147
|
+
dmypy.json
|
|
148
|
+
|
|
149
|
+
# Pyre type checker
|
|
150
|
+
.pyre/
|
|
151
|
+
|
|
152
|
+
# pytype static type analyzer
|
|
153
|
+
.pytype/
|
|
154
|
+
|
|
155
|
+
# Cython debug symbols
|
|
156
|
+
cython_debug/
|
|
157
|
+
|
|
158
|
+
# PyCharm
|
|
159
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
160
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
161
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
162
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
163
|
+
#.idea/
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
BSD 3-Clause License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024, 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
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
Metadata-Version: 2.3
|
|
2
|
+
Name: grid-data-models
|
|
3
|
+
Version: 0.0.1
|
|
4
|
+
Project-URL: Documentation, https://github.com/NREL-Distribution-Suites/grid-data-models#readme
|
|
5
|
+
Project-URL: Issues, https://github.com/NREL-Distribution-Suites/grid-data-models/issues
|
|
6
|
+
Project-URL: Source, https://github.com/NREL-Distribution-Suites/grid-data-models
|
|
7
|
+
Author-email: Kapil Duwadi <Kapil.Duwadi@nrel.gov>, Aadil Latif <Aadil.Latif@nrel.gov>, Tarek Elgindy <tarek.elgindy@nrel.gov>
|
|
8
|
+
License-Expression: BSD-3-Clause
|
|
9
|
+
License-File: LICENSE.txt
|
|
10
|
+
Classifier: License :: OSI Approved :: BSD License
|
|
11
|
+
Classifier: Operating System :: OS Independent
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
13
|
+
Requires-Python: >=3.11
|
|
14
|
+
Requires-Dist: infrasys
|
|
15
|
+
Requires-Dist: networkx
|
|
16
|
+
Provides-Extra: dev
|
|
17
|
+
Requires-Dist: pre-commit; extra == 'dev'
|
|
18
|
+
Requires-Dist: pytest; extra == 'dev'
|
|
19
|
+
Requires-Dist: pytest-cov; extra == 'dev'
|
|
20
|
+
Requires-Dist: ruff; extra == 'dev'
|
|
21
|
+
Provides-Extra: doc
|
|
22
|
+
Requires-Dist: myst-parser; extra == 'doc'
|
|
23
|
+
Requires-Dist: sphinx; extra == 'doc'
|
|
24
|
+
Requires-Dist: sphinx-immaterial; extra == 'doc'
|
|
25
|
+
Requires-Dist: sphinxcontrib-mermaid; extra == 'doc'
|
|
26
|
+
Description-Content-Type: text/markdown
|
|
27
|
+
|
|
28
|
+
# Grid Data Models (GDM)
|
|
29
|
+
|
|
30
|
+
GDM is a python package containing [pydantic](https://docs.pydantic.dev/latest/) data models for power system assets and datasets. This package is actively being developed at [National Renewable Energy Laboratory (NREL)](https://www.nrel.gov/).
|
|
31
|
+
|
|
32
|
+
## Why Grid Data Models ?
|
|
33
|
+
|
|
34
|
+
In an effort to reduce code duplication and provide client packages a standard interface to interact with power system data, a group of
|
|
35
|
+
research engineers at NREL is working on developing standard data models. Features:
|
|
36
|
+
|
|
37
|
+
- **Builtin validation layer:** Use of [pydantic](https://docs.pydantic.dev/latest/) in creating data models allows us to check for fields during the time of construction and update.
|
|
38
|
+
- **Timeseries data management:** GDM uses [infrasys](https://github.nrel.gov/CADET/infrastructure_systems) package which enables attaching time series data to fields in the data model. For example, we can attach time series power consumption data to a load profile.
|
|
39
|
+
- **Builtin unit conversion:** GDM leverages [pint](https://pint.readthedocs.io/en/stable/) for unit conversion for power system quantities. For e.g power, voltage, time etc.
|
|
40
|
+
- **JSON serialization/deserializatin:** GDM uses [infrasys](https://github.nrel.gov/CADET/infrastructure_systems) to serialize and deserialize distribution system containing power system components and time series data attached to components.
|
|
41
|
+
|
|
42
|
+
## How to get started ?
|
|
43
|
+
|
|
44
|
+
To get started, you can clone and pip install this library from [here](https://github.nrel.gov/CADET/grid-data-models).
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
## Contributors
|
|
48
|
+
|
|
49
|
+
- **Kapil Duwadi**
|
|
50
|
+
- **Tarek Elgindy**
|
|
51
|
+
- **Aadil Latif**
|
|
52
|
+
- **Pedro Andres Sanchez Perez**
|
|
53
|
+
- **Daniel Thompson**
|
|
54
|
+
- **Jeremy Keen**
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Grid Data Models (GDM)
|
|
2
|
+
|
|
3
|
+
GDM is a python package containing [pydantic](https://docs.pydantic.dev/latest/) data models for power system assets and datasets. This package is actively being developed at [National Renewable Energy Laboratory (NREL)](https://www.nrel.gov/).
|
|
4
|
+
|
|
5
|
+
## Why Grid Data Models ?
|
|
6
|
+
|
|
7
|
+
In an effort to reduce code duplication and provide client packages a standard interface to interact with power system data, a group of
|
|
8
|
+
research engineers at NREL is working on developing standard data models. Features:
|
|
9
|
+
|
|
10
|
+
- **Builtin validation layer:** Use of [pydantic](https://docs.pydantic.dev/latest/) in creating data models allows us to check for fields during the time of construction and update.
|
|
11
|
+
- **Timeseries data management:** GDM uses [infrasys](https://github.nrel.gov/CADET/infrastructure_systems) package which enables attaching time series data to fields in the data model. For example, we can attach time series power consumption data to a load profile.
|
|
12
|
+
- **Builtin unit conversion:** GDM leverages [pint](https://pint.readthedocs.io/en/stable/) for unit conversion for power system quantities. For e.g power, voltage, time etc.
|
|
13
|
+
- **JSON serialization/deserializatin:** GDM uses [infrasys](https://github.nrel.gov/CADET/infrastructure_systems) to serialize and deserialize distribution system containing power system components and time series data attached to components.
|
|
14
|
+
|
|
15
|
+
## How to get started ?
|
|
16
|
+
|
|
17
|
+
To get started, you can clone and pip install this library from [here](https://github.nrel.gov/CADET/grid-data-models).
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
## Contributors
|
|
21
|
+
|
|
22
|
+
- **Kapil Duwadi**
|
|
23
|
+
- **Tarek Elgindy**
|
|
24
|
+
- **Aadil Latif**
|
|
25
|
+
- **Pedro Andres Sanchez Perez**
|
|
26
|
+
- **Daniel Thompson**
|
|
27
|
+
- **Jeremy Keen**
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Minimal makefile for Sphinx documentation
|
|
2
|
+
#
|
|
3
|
+
|
|
4
|
+
# You can set these variables from the command line, and also
|
|
5
|
+
# from the environment for the first two.
|
|
6
|
+
SPHINXOPTS ?=
|
|
7
|
+
SPHINXBUILD ?= sphinx-build
|
|
8
|
+
SOURCEDIR = .
|
|
9
|
+
BUILDDIR = _build
|
|
10
|
+
|
|
11
|
+
# Put it first so that "make" without argument is like "make help".
|
|
12
|
+
help:
|
|
13
|
+
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
|
14
|
+
|
|
15
|
+
.PHONY: help Makefile
|
|
16
|
+
|
|
17
|
+
# Catch-all target: route all unknown targets to Sphinx using the new
|
|
18
|
+
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
|
|
19
|
+
%: Makefile
|
|
20
|
+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Distribution Branch
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
```{eval-rst}
|
|
5
|
+
.. automodule:: gdm
|
|
6
|
+
:members: SequenceImpedanceBranchEquipment, MatrixImpedanceBranchEquipment, GeometryBranchEquipment, DistributionBranch, MatrixImpedanceBranch, GeometryBranch
|
|
7
|
+
:exclude-members: model_fields, model_config, validate_fields
|
|
8
|
+
|
|
9
|
+
```
|
|
Binary file
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# Terminal in CIM vs DistributionBus in GDM
|
|
2
|
+
|
|
3
|
+
Figure below shows an UML diagram for `Terminal` and `ConnectivityNode` in Common Information Model (CIM) which is used to connect terminals of
|
|
4
|
+
ac conducting equipment which is analogous to `DistributionBus` in grid data models. [The CIM diagram is accessed from here.](https://ontology.tno.nl/IEC_CIM/cim_Terminal.html). `Terminal` class inherits from `IdentifiedObject` class which has `name`, `description` and `mrid`. `IdentifiedObject.mrid` is analogous to `ComponentWithQuantities.uuid`. Note in GDM we also have `system_uuid` to sort of manage which system these assets belong to. Also `DistributionBus` has `coordinate` attribute of type `Location` which is equivalent to `PositionPoint` in CIM.
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
| GDM | CIM | Note |
|
|
8
|
+
|-----|-----|------|
|
|
9
|
+
|`ComponentWithQuantities.name`| `cim:IdentifiedObject.name`| Both of them are string. |
|
|
10
|
+
| `ComponentWithQuantities.uuid` | `cim:IdentifiedObject.mrid` | Unique identifier for the component. |
|
|
11
|
+
| `ComponentWithQuantities.system_uuid` | N/A | System UUID to which this component belongs to. |
|
|
12
|
+
| `PowerSystemBus.nominal_voltage` | `cim:BaseVoltage.nominalVoltage` | Note nominal voltage is unit aware but BaseVoltage is not. |
|
|
13
|
+
| `Location.x` | `cim:PositionPoint.xPosition` | x coordinate of the component. |
|
|
14
|
+
| `Location.y` | `cim:PositionPoint.yPosition` | y coordinate of the component |
|
|
15
|
+
| `Location.crs` | N/A | Coordinate reference system for geo coordinates. |
|
|
16
|
+
| `DistributionBus.voltage_type` | N/A | Differentiates from line to line voltage to line to ground voltage |
|
|
17
|
+
| `DistributionComponent.feeder` | | Name of the feeder to which this component belong to|
|
|
18
|
+
| `DistributionComponent.substation` | | Name of the substation to which this component belongs to. |
|
|
19
|
+
| `DistributionBus.phases` | `cim:Terminal.phases`| List of phases.|
|
|
20
|
+
| `VoltageLimitSet.type` | | Limit type min or max |
|
|
21
|
+
| `VoltageLimitSet.value` | | Value for limit. |
|
|
22
|
+
|
|
23
|
+

|
|
24
|
+
|
|
25
|
+
Here is an UML diagram of `DistributionBus` from Grid data models.
|
|
26
|
+
|
|
27
|
+
```{mermaid}
|
|
28
|
+
|
|
29
|
+
classDiagram
|
|
30
|
+
|
|
31
|
+
class ComponentWithQuantities
|
|
32
|
+
ComponentWithQuantities: +name str
|
|
33
|
+
ComponentWithQuantities: +uuid UUID
|
|
34
|
+
ComponentWithQuantities: +system_uuid UUID | None
|
|
35
|
+
|
|
36
|
+
class PowerSystemBus
|
|
37
|
+
PowerSystemBus: +nominal_voltage PositiveVoltage
|
|
38
|
+
PowerSystemBus: +coordinate Location | None
|
|
39
|
+
|
|
40
|
+
class Location
|
|
41
|
+
Location: +x float
|
|
42
|
+
Location: +y float
|
|
43
|
+
Location: +crs str | None
|
|
44
|
+
|
|
45
|
+
class DistributionBus
|
|
46
|
+
DistributionBus: +voltage_type VoltageTypes
|
|
47
|
+
DistributionBus: +belongs_to DistributionComponent | None
|
|
48
|
+
DistributionBus: +phases list[Phase]
|
|
49
|
+
DistributionBus: +voltagelimits list[VoltageLimitSet]
|
|
50
|
+
|
|
51
|
+
class VoltageTypes{
|
|
52
|
+
<<enumeration>>
|
|
53
|
+
LINE_TO_LINE
|
|
54
|
+
LINE_TO_GROUND
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
class DistributionComponent
|
|
58
|
+
DistributionComponent: +feeder str
|
|
59
|
+
DistributionComponent: +substation str
|
|
60
|
+
|
|
61
|
+
class Phase{
|
|
62
|
+
<<enumeration>>
|
|
63
|
+
A
|
|
64
|
+
B
|
|
65
|
+
C
|
|
66
|
+
N
|
|
67
|
+
s1
|
|
68
|
+
s2
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
class VoltageLimitSet
|
|
72
|
+
VoltageLimitSet: +limit_type LimitType
|
|
73
|
+
VoltageLimitSet: +value PositiveVoltage
|
|
74
|
+
|
|
75
|
+
class LimitType{
|
|
76
|
+
<<enumerations>>
|
|
77
|
+
MIN
|
|
78
|
+
MAX
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
PowerSystemBus --|> ComponentWithQuantities
|
|
82
|
+
Location --* PowerSystemBus
|
|
83
|
+
DistributionBus --|> PowerSystemBus
|
|
84
|
+
DistributionComponent <-- DistributionBus
|
|
85
|
+
VoltageLimitSet "0..*" --> "1" DistributionBus
|
|
86
|
+
```
|