ltbams 1.0.9__py3-none-any.whl → 1.0.11__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.
- ams/__init__.py +0 -1
- ams/_version.py +3 -3
- ams/cases/5bus/pjm5bus_demo.json +1324 -0
- ams/core/__init__.py +1 -0
- ams/core/common.py +30 -0
- ams/core/documenter.py +130 -62
- ams/core/model.py +1 -1
- ams/core/symprocessor.py +1 -1
- ams/extension/eva.py +1 -1
- ams/interface.py +42 -26
- ams/io/matpower.py +31 -17
- ams/io/psse.py +278 -1
- ams/main.py +2 -2
- ams/models/group.py +2 -1
- ams/models/static/pq.py +7 -3
- ams/opt/param.py +1 -2
- ams/routines/__init__.py +2 -3
- ams/routines/acopf.py +5 -108
- ams/routines/dcopf.py +8 -0
- ams/routines/dcpf.py +1 -1
- ams/routines/ed.py +4 -2
- ams/routines/grbopt.py +155 -0
- ams/routines/pflow.py +2 -2
- ams/routines/pypower.py +622 -0
- ams/routines/routine.py +4 -10
- ams/routines/uc.py +2 -2
- ams/shared.py +26 -43
- ams/system.py +120 -4
- ams/utils/paths.py +3 -3
- docs/source/api.rst +2 -0
- docs/source/examples/index.rst +2 -1
- docs/source/genroutineref.py +1 -1
- docs/source/getting_started/install.rst +9 -6
- docs/source/images/dcopf_time.png +0 -0
- docs/source/images/educ_pie.png +0 -0
- docs/source/release-notes.rst +37 -57
- {ltbams-1.0.9.dist-info → ltbams-1.0.11.dist-info}/METADATA +85 -48
- {ltbams-1.0.9.dist-info → ltbams-1.0.11.dist-info}/RECORD +58 -75
- {ltbams-1.0.9.dist-info → ltbams-1.0.11.dist-info}/WHEEL +1 -1
- tests/test_1st_system.py +2 -2
- tests/test_case.py +14 -14
- tests/test_export_csv.py +1 -1
- tests/test_interface.py +24 -2
- tests/test_io.py +50 -0
- tests/test_omodel.py +1 -1
- tests/test_report.py +6 -6
- tests/test_routine.py +2 -2
- tests/test_rtn_acopf.py +75 -0
- tests/test_rtn_dcopf.py +1 -1
- tests/test_rtn_dcopf2.py +1 -1
- tests/test_rtn_ed.py +9 -9
- tests/test_rtn_opf.py +142 -0
- tests/test_rtn_pflow.py +0 -72
- tests/test_rtn_pypower.py +315 -0
- tests/test_rtn_rted.py +8 -8
- tests/test_rtn_uc.py +18 -18
- ams/pypower/__init__.py +0 -8
- ams/pypower/_compat.py +0 -9
- ams/pypower/core/__init__.py +0 -8
- ams/pypower/core/pips.py +0 -894
- ams/pypower/core/ppoption.py +0 -244
- ams/pypower/core/ppver.py +0 -18
- ams/pypower/core/solver.py +0 -2451
- ams/pypower/eps.py +0 -6
- ams/pypower/idx.py +0 -174
- ams/pypower/io.py +0 -604
- ams/pypower/make/__init__.py +0 -11
- ams/pypower/make/matrices.py +0 -665
- ams/pypower/make/pdv.py +0 -506
- ams/pypower/routines/__init__.py +0 -7
- ams/pypower/routines/cpf.py +0 -513
- ams/pypower/routines/cpf_callbacks.py +0 -114
- ams/pypower/routines/opf.py +0 -1803
- ams/pypower/routines/opffcns.py +0 -1946
- ams/pypower/routines/pflow.py +0 -852
- ams/pypower/toggle.py +0 -1098
- ams/pypower/utils.py +0 -293
- ams/routines/cpf.py +0 -65
- ams/routines/dcpf0.py +0 -196
- ams/routines/pflow0.py +0 -113
- tests/test_rtn_dcpf.py +0 -77
- {ltbams-1.0.9.dist-info → ltbams-1.0.11.dist-info}/entry_points.txt +0 -0
- {ltbams-1.0.9.dist-info → ltbams-1.0.11.dist-info}/top_level.txt +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: ltbams
|
3
|
-
Version: 1.0.
|
3
|
+
Version: 1.0.11
|
4
4
|
Summary: Python software for scheduling modeling and co-simulation with dynamics.
|
5
5
|
Home-page: https://github.com/CURENT/ams
|
6
6
|
Author: Jinning Wang
|
@@ -23,6 +23,28 @@ Requires-Dist: openpyxl
|
|
23
23
|
Requires-Dist: andes>=1.9.3
|
24
24
|
Requires-Dist: pybind11
|
25
25
|
Requires-Dist: cvxpy
|
26
|
+
Provides-Extra: dev
|
27
|
+
Requires-Dist: pytest; extra == "dev"
|
28
|
+
Requires-Dist: pytest-cov; extra == "dev"
|
29
|
+
Requires-Dist: coverage; extra == "dev"
|
30
|
+
Requires-Dist: flake8; extra == "dev"
|
31
|
+
Requires-Dist: numpydoc; extra == "dev"
|
32
|
+
Requires-Dist: toml; extra == "dev"
|
33
|
+
Provides-Extra: nlp
|
34
|
+
Requires-Dist: PYPOWER; extra == "nlp"
|
35
|
+
Requires-Dist: pyoptinterface; extra == "nlp"
|
36
|
+
Requires-Dist: gurobipy; extra == "nlp"
|
37
|
+
Requires-Dist: gurobi-optimods; extra == "nlp"
|
38
|
+
Provides-Extra: doc
|
39
|
+
Requires-Dist: pandoc; extra == "doc"
|
40
|
+
Requires-Dist: ipython; extra == "doc"
|
41
|
+
Requires-Dist: sphinx; extra == "doc"
|
42
|
+
Requires-Dist: pydata-sphinx-theme; extra == "doc"
|
43
|
+
Requires-Dist: numpydoc; extra == "doc"
|
44
|
+
Requires-Dist: sphinx-copybutton; extra == "doc"
|
45
|
+
Requires-Dist: sphinx-panels; extra == "doc"
|
46
|
+
Requires-Dist: myst-parser; extra == "doc"
|
47
|
+
Requires-Dist: nbsphinx; extra == "doc"
|
26
48
|
Dynamic: author
|
27
49
|
Dynamic: home-page
|
28
50
|
|
@@ -30,40 +52,26 @@ Dynamic: home-page
|
|
30
52
|
|
31
53
|
Python Software for Power System Scheduling Modeling and Co-Simulation with Dynamics, serving as the market simulator for the [CURENT Largescale Testbed][LTB Repository].
|
32
54
|
|
33
|
-
|
34
|
-

|
35
|
-
[](https://www.python.org/)
|
55
|
+

|
36
56
|
[](https://ieeexplore.ieee.org/document/10836855)
|
37
|
-
[](https://www.repostatus.org/#active)
|
38
|
-
[](https://codecov.io/gh/CURENT/ams)
|
39
|
-
|
40
|
-
[](https://github.com/CURENT/ams/tags)
|
41
|
-

|
42
|
-
[](https://github.com/CURENT/ams/commits/master/)
|
43
|
-
[](https://github.com/CURENT/ams/commits/develop/)
|
44
|
-
|
45
|
-
[](https://libraries.io/pypi/ltbams)
|
46
|
-

|
47
|
-
[](https://mango-dune-07a8b7110.1.azurestaticapps.net/?repo=CURENT%2Fams)
|
48
|
-
|
49
|
-
[](https://github.com/CURENT/ams/actions/workflows/compatibility.yml)
|
50
|
-
[](https://github.com/CURENT/ams/actions/workflows/publish-pypi.yml)
|
51
|
-
[](https://dev.azure.com/curentltb/ams/_build/latest?definitionId=2&branchName=master)
|
52
57
|
|
53
58
|
<img src="docs/source/images/sponsors/CURENT_Logo_NameOnTrans.png" alt="CURENT ERC Logo" width="300" height="auto">
|
54
59
|
|
55
|
-
|
|
56
|
-
|
57
|
-
|
|
58
|
-
|
59
|
-
|
60
|
-
|
|
61
|
-
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
66
|
-
|
60
|
+
| Badges | | |
|
61
|
+
|---|---|---|
|
62
|
+
| Repo |  |  |
|
63
|
+
| Version | [](https://pypi.org/project/ltbams/) | [](https://anaconda.org/conda-forge/ltbams) |
|
64
|
+
| Tag | [](https://github.com/CURENT/ams/tags) |  |
|
65
|
+
| Documentation | [](https://ltb.readthedocs.io/projects/ams/en/stable/?badge=stable) | [](https://ltb.readthedocs.io/projects/ams/en/develop/?badge=develop) |
|
66
|
+
| Download | [](https://pypi.org/project/ltbams/) | [](https://anaconda.org/conda-forge/ltbams) |
|
67
|
+
| Code Quality |  |  |
|
68
|
+
| Code Cov |  | |
|
69
|
+
| Last Commit |  |  |
|
70
|
+
| CI | [](https://github.com/CURENT/ams/actions/workflows/compatibility.yml) | [](https://dev.azure.com/curentltb/ams/_build/latest?definitionId=2&branchName=scuc) |
|
71
|
+
| CD | [](https://github.com/CURENT/ams/actions/workflows/publish-pypi.yml) | |
|
72
|
+
| Structure | [](https://mango-dune-07a8b7110.1.azurestaticapps.net/?repo=CURENT%2Fams) | [](https://deepwiki.com/CURENT/ams) |
|
73
|
+
| Dependency | [](https://libraries.io/pypi/ltbams) | |
|
74
|
+
| Try on Binder | [](https://mybinder.org/v2/gh/curent/ams/master) | |
|
67
75
|
|
68
76
|
# Why AMS
|
69
77
|
|
@@ -82,25 +90,27 @@ and solved with third-party solvers.
|
|
82
90
|
|
83
91
|
AMS produces credible scheduling results and competitive performance.
|
84
92
|
The following results show the comparison of DCOPF between AMS and other tools.
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
|
89
|
-
|
90
|
-
|
|
91
|
-
| IEEE
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
93
|
+
In the table, **AMS Gap** is the difference between the AMS and MATPOWER results,
|
94
|
+
and **pandapower Gap** is the difference between the pandapower and MATPOWER results.
|
95
|
+
|
96
|
+
| Case | MATPOWER [\$] | AMS Gap [\$] | pandapower Gap [\$] |
|
97
|
+
|------------------|--------------|--------------|---------------------|
|
98
|
+
| IEEE 14-Bus | 7,642.59 | 0.00 | 0.00 |
|
99
|
+
| IEEE 39-Bus | 41,263.94 | 0.00 | 0.00 |
|
100
|
+
| PEGASE 89-Bus | 5,733.37 | 0.00 | 0.00 |
|
101
|
+
| IEEE 118-Bus | 125,947.88 | 0.00 | 0.00 |
|
102
|
+
| NPCC 140-Bus | 810,033.37 | 0.00 | **-17.31** |
|
103
|
+
| WECC 179-Bus | 411,706.13 | 0.00 | 0.00 |
|
104
|
+
| IEEE 300-Bus | 706,292.32 | 0.00 | 0.00 |
|
105
|
+
| PEGASE 1354-Bus | 1,218,096.86 | 0.00 | 0.00 |
|
106
|
+
| PEGASE 2869-Bus | 2,386,235.33 | 0.00 | 0.00 |
|
107
|
+
| GOC 4020-Bus | 793,634.11 | 0.00 | 0.00 |
|
108
|
+
| EPIGRIDS 5658-Bus| 1,195,466.12 | 0.00 | 0.00 |
|
109
|
+
| EPIGRIDS 7336-Bus| 1,855,870.94 | 0.00 | 0.00 |
|
100
110
|
|
101
111
|
<div style="text-align: left;">
|
102
112
|
<img src="docs/source/images/dcopf_time.png" alt="DCOPF Time" width="480" height="auto">
|
103
|
-
<p><strong>Figure:</strong> Computation time of OPF on
|
113
|
+
<p><strong>Figure:</strong> Computation time of OPF on medium to large cases.</p>
|
104
114
|
</div>
|
105
115
|
|
106
116
|
In the bar chart, the gray bar labeled "AMS Symbolic Processing" represents the time spent
|
@@ -113,6 +123,19 @@ Regarding the baselines, the blue and green bars represent the running time of M
|
|
113
123
|
solver MIPS and pandapower using solver PIPS, respectively.
|
114
124
|
The results for AMS, pandapower, and matpower are the average time consumed over ten repeat tests.
|
115
125
|
|
126
|
+
<div style="text-align: left;">
|
127
|
+
<img src="docs/source/images/educ_pie.png" alt="DCOPF Time" width="480" height="auto">
|
128
|
+
<p><strong>Figure:</strong> Computation time distribution for multi-period economic dispatch and
|
129
|
+
unit commitment using a 31,777-bus case.</p>
|
130
|
+
</div>
|
131
|
+
|
132
|
+
To further demonstrate AMS's scalability, we validated multi-period economic dispatch and unit commitment
|
133
|
+
on an ultra-large power system case with 31,777 buses, 4,664 generators, 41,573 transmission lines,
|
134
|
+
and 5 time intervals.
|
135
|
+
The computation time distribution for this case is shown in the figure below. Notably, the time spent
|
136
|
+
on symbolic processing remains negligible even at this scale, highlighting AMS's efficiency for
|
137
|
+
large-scale studies.
|
138
|
+
|
116
139
|
AMS is currently under active development.
|
117
140
|
Use the following resources to get involved.
|
118
141
|
|
@@ -136,6 +159,20 @@ Install from PyPI using pip:
|
|
136
159
|
pip install ltbams
|
137
160
|
```
|
138
161
|
|
162
|
+
You can also install with optional dependencies, such as ``dev``, ``docs``, and ``nlp``:
|
163
|
+
|
164
|
+
```bash
|
165
|
+
pip install ltbams[dev]
|
166
|
+
pip install ltbams[docs]
|
167
|
+
pip install ltbams[nlp]
|
168
|
+
```
|
169
|
+
|
170
|
+
Or install with all optional dependencies:
|
171
|
+
|
172
|
+
```bash
|
173
|
+
pip install ltbams[all]
|
174
|
+
```
|
175
|
+
|
139
176
|
Install from conda-forge using conda:
|
140
177
|
|
141
178
|
```bash
|
@@ -197,7 +234,7 @@ See [GitHub contributors][GitHub contributors] for the contributor list.
|
|
197
234
|
AMS is licensed under the [GPL v3 License](./LICENSE).
|
198
235
|
|
199
236
|
# Related Projects
|
200
|
-
- [Popular Open Source Libraries for Power System Analysis](https://github.com/
|
237
|
+
- [Popular Open Source Libraries for Power System Analysis](https://github.com/ps-wiki/best-of-ps)
|
201
238
|
- [G-PST Tools Portal](https://g-pst.github.io/tools/): An open tools portal with a classification approach
|
202
239
|
- [Open Source Software (OSS) for Electricity Market Research, Teaching, and Training](https://www2.econ.iastate.edu/tesfatsi/ElectricOSS.htm)
|
203
240
|
|
@@ -1,12 +1,13 @@
|
|
1
|
-
ams/__init__.py,sha256=
|
1
|
+
ams/__init__.py,sha256=q-9-f0YCg6aaTW19VCkY6VosfvRA2ObI9mF1f_3016Y,313
|
2
2
|
ams/__main__.py,sha256=EB4GfGiKgvnQ_psNr0QwPoziYvjmGvQ2yVsBwQtfrLw,170
|
3
|
-
ams/_version.py,sha256=
|
3
|
+
ams/_version.py,sha256=9w0v2vIzAou5TWcsacfNdhiCAr9S83BM7FAKRy_t8h0,498
|
4
4
|
ams/cli.py,sha256=EyNFXn565gFCppTxpyTZviBdPgUuKtgAPZ4WE6xewRk,6164
|
5
|
-
ams/interface.py,sha256
|
6
|
-
ams/main.py,sha256=
|
5
|
+
ams/interface.py,sha256=-UN7-TiSt7mOS0W7526LuOk4KCIGDZSguRaVmh_KMRM,45240
|
6
|
+
ams/main.py,sha256=lIqC16TO0pye75Wv8l_6EemNtm15iyMdvu8YQFkdd_4,23599
|
7
7
|
ams/report.py,sha256=ewcffopOzT5o45eJNmcV8pxeQqPIjKbarGN33-yHGA8,10961
|
8
|
-
ams/shared.py,sha256=
|
9
|
-
ams/system.py,sha256=
|
8
|
+
ams/shared.py,sha256=4sY2U0sghs_S2V6C7Z0OyQ6WZRfpCXk2_Cf_Mg24Vr4,3900
|
9
|
+
ams/system.py,sha256=eAsaXO2O_7_PAIuPFup3edztuAhKMhODrR9l92CYx38,29765
|
10
|
+
ams/cases/5bus/pjm5bus_demo.json,sha256=IpxO2vzB9-9Kg9xjOXREKeXEz9wjFE7cuQbcUu8VORA,23152
|
10
11
|
ams/cases/5bus/pjm5bus_demo.xlsx,sha256=OWIUprkg8_aQ_bTCaEFMl7Bhfa1R20zxAHXRQtXBix0,32607
|
11
12
|
ams/cases/5bus/pjm5bus_ev.xlsx,sha256=vR8dJv5jIxib1pgcMonhzvraoqZVJWhBSJdVXDL0qsI,19498
|
12
13
|
ams/cases/5bus/pjm5bus_jumper.xlsx,sha256=47QAol1RGz_aGvhV2emq9XCy_Db9Zca15_OMVAdFVR0,19332
|
@@ -34,27 +35,28 @@ ams/cases/npcc/npcc_uced.xlsx,sha256=zuaZEOBwdOHwK5hFgQSXownyH-MfKDZQ-iVFeaFVSyg
|
|
34
35
|
ams/cases/pglib/pglib_opf_case39_epri__api.m,sha256=DKUNon8FgIYKJWOK5ZyQ0fLP0zowNRrf4vmPN-UxU3M,16351
|
35
36
|
ams/cases/wecc/wecc.m,sha256=8Wqal6H5r1wNxLLQBCXo2V3v3JZY5IJDEkyrEGCrCWE,30498
|
36
37
|
ams/cases/wecc/wecc_uced.xlsx,sha256=R3tZgxEqz_ctKcjA1wwFecxn-QZXutvf7NzgnCg_078,94767
|
37
|
-
ams/core/__init__.py,sha256=
|
38
|
-
ams/core/
|
38
|
+
ams/core/__init__.py,sha256=lIvrAvYf2yrHWqYi0rVuJgJt8KNA8nTmN2iuZ125z9Q,123
|
39
|
+
ams/core/common.py,sha256=934J7xq5JvC14yKp2Z4hWKUFJFhxzAnxB_8_99CChY0,704
|
40
|
+
ams/core/documenter.py,sha256=3-jUYrtN8zDZXd8tQZlmZouJluJPH9_xIDbK9ZEEnRU,25762
|
39
41
|
ams/core/matprocessor.py,sha256=3eEij-ul8Rx25ZwNbv66YEOKyUXB-fYO-ZQs5BpqmIU,26610
|
40
|
-
ams/core/model.py,sha256=
|
42
|
+
ams/core/model.py,sha256=LNZtzyf2A7Tz3pn9IDs35JYaHSkQRqhqZicTpZGSqsc,10926
|
41
43
|
ams/core/param.py,sha256=LPH48xUHyqWqODD6IsiamUtkJDDSgGCEMAo6vroFoHE,11130
|
42
44
|
ams/core/service.py,sha256=Q4aeaYFWycIEH7I8DSO8Itah2CJxc3oAW46dtKCQEyA,28041
|
43
|
-
ams/core/symprocessor.py,sha256=
|
45
|
+
ams/core/symprocessor.py,sha256=qGzztGqe15-nrq1ZdrjslEH-375vjvB3O8fi7nau5Hw,8419
|
44
46
|
ams/core/var.py,sha256=f48pzir4miBsB5sh6PwUsFe0LdNNEM-d3VufcjbUU0w,1591
|
45
47
|
ams/extension/__init__.py,sha256=5IFTNirDL0uDaUsg05_oociVT9VCy2rhPx1ad4LGveM,65
|
46
|
-
ams/extension/eva.py,sha256=
|
48
|
+
ams/extension/eva.py,sha256=4_q4ME0WrQIcd205SBTjv0-rMRZZIdQ07QJuEHwLIC8,16340
|
47
49
|
ams/io/__init__.py,sha256=GIfF7X44olHaySL8EzOBU1eXUnunr1owzzdPfPvvHZU,3802
|
48
50
|
ams/io/json.py,sha256=IurwcZDuKczSbRTpcbQZiIi0ARCrMK6kJ0E3wS8ENy8,2585
|
49
|
-
ams/io/matpower.py,sha256=
|
50
|
-
ams/io/psse.py,sha256=
|
51
|
+
ams/io/matpower.py,sha256=IK6NwVUAM0FAv2rFF1hBoSTowfXD8l6YXrKiPch9hW8,26166
|
52
|
+
ams/io/psse.py,sha256=qvKP9CP-70UejUsffPu4ibtyF1JXO0Sz0-evT4fDPXg,13631
|
51
53
|
ams/io/pypower.py,sha256=Fe0sxzC5DZegtYksTixadXk_LcfJ1GNetWu9EuHCkG8,2790
|
52
54
|
ams/io/xlsx.py,sha256=7ATW1seyxsGn7d5p5IuSRFHcoCHVVjMu3E7mP1Mc74U,2460
|
53
55
|
ams/models/__init__.py,sha256=EGkViLkVX_We9FAGuEkgfleMNmPw_vGp2Nq1OQimL7U,691
|
54
56
|
ams/models/area.py,sha256=AKYU6aJQKsVWRZdvMO7yic-8wZ1GumSTQXgDg5L0THw,899
|
55
57
|
ams/models/bus.py,sha256=U0vSegkm-9fqPQS9KMJQU6gpIMX_1GK5O_dvRc8-0P0,1585
|
56
58
|
ams/models/cost.py,sha256=rmGNj9ztMbqA-OIJj8fNNBh8bdYJSY9hk10vffgxc6k,5916
|
57
|
-
ams/models/group.py,sha256
|
59
|
+
ams/models/group.py,sha256=qVYhyMJQHIDikcxxY-mAOOVZOE1_Bp9Av4dP6AtQ4hs,5780
|
58
60
|
ams/models/info.py,sha256=Oh0Xo5J4ZHBsNIkMOzIwv_DegsX1inyuv3Q5CpCfyQw,788
|
59
61
|
ams/models/line.py,sha256=ju5h1BcW4kgVWm_lgl8zWhSYqlsUjbdoUwzz2t0Vx1s,2770
|
60
62
|
ams/models/reserve.py,sha256=3BjWCyKrPL4CwTvmzRxk25H8Nkxh-Rz0Ne17I9Y2TUA,2816
|
@@ -69,7 +71,7 @@ ams/models/renewable/__init__.py,sha256=7dZyRXbvBAHbLJeJssJ1hsOHj9Bgeg77kB5gcX_m
|
|
69
71
|
ams/models/renewable/regc.py,sha256=3J9alIGUn_GkibQ3-dKTylAOpNPzd5zpancPc79q9T4,3448
|
70
72
|
ams/models/static/__init__.py,sha256=lh5yR5Xb2unS4ndng-cLU1TAeoidu2s6VAVFLc3HUDU,96
|
71
73
|
ams/models/static/gen.py,sha256=QXklOYlnU7QHWy-WFJwhxuNItUPqFsLJIjAO4sGMUbg,7087
|
72
|
-
ams/models/static/pq.py,sha256=
|
74
|
+
ams/models/static/pq.py,sha256=SCwAqhqvKy_PFHp6VYO_zgv3v6gI5pK3KvT3RNX-nvA,2782
|
73
75
|
ams/opt/__init__.py,sha256=INsl8yxtOzTKqV9pzVxlL6RSGDRaUDwxpZMY1QROrF4,459
|
74
76
|
ams/opt/constraint.py,sha256=ERT9zwjQyGkvDo465Yd0wBexlIhjVmw0MyWq4BWnWoI,5534
|
75
77
|
ams/opt/exprcalc.py,sha256=oVtjNHzdWvYHV-8PdRehAxjledsQxpxatdNgMLeWS5o,3935
|
@@ -77,63 +79,41 @@ ams/opt/expression.py,sha256=WrWnYliB61uHA_wQjtYgtAXdpgSN1pNqQmWvzHWSsdE,5569
|
|
77
79
|
ams/opt/objective.py,sha256=W0dQfW5dHNdWEc2DQtWYNGMuhMY6Pu-HTD0n7-izDZA,5519
|
78
80
|
ams/opt/omodel.py,sha256=hEtfKoSNssSxHgUDdep79pifNTsywytDTjgGgne7nKM,12750
|
79
81
|
ams/opt/optzbase.py,sha256=KEYRPhfTCw1E5EUmjpDXSF1kdyqzdR9Yg10Z2VNJahw,5615
|
80
|
-
ams/opt/param.py,sha256=
|
82
|
+
ams/opt/param.py,sha256=G0KkWo1SqLiecZ7gLPzsbG5_WBORSVZ2GJ20ekdYJoQ,5121
|
81
83
|
ams/opt/var.py,sha256=cpDiELo37E7IoTDlVn_NbkuFNQ88oey23YOF6Gpg6zM,7707
|
82
|
-
ams/
|
83
|
-
ams/
|
84
|
-
ams/
|
85
|
-
ams/pypower/idx.py,sha256=YGEkHdrGDOmF_wHsQzRfDp8blaymJuWb1xErUyCYgD4,8176
|
86
|
-
ams/pypower/io.py,sha256=KlXKyErbt2i_UzFJDI4obWbUddQXM3sD4fEtl2ePp7k,26368
|
87
|
-
ams/pypower/toggle.py,sha256=7o4vS0fcQXL_Ha8iiMXxnsqAPPPnypnhPcGQ-NXmbO0,50088
|
88
|
-
ams/pypower/utils.py,sha256=UOkNNJNs_zHVqcxFUlNG6QiBpqPnDlgSGqhnEXPukvs,8779
|
89
|
-
ams/pypower/core/__init__.py,sha256=J4mOfUN6heywauKP99R-Ois2vem5tF6cMS3gsGHSfy8,277
|
90
|
-
ams/pypower/core/pips.py,sha256=YD2b3dttyEDhk5Ki9z_KxP3DLg-fJQ-PFovXifLjoxc,32645
|
91
|
-
ams/pypower/core/ppoption.py,sha256=pyWqiXtkKNAQNlqxqbUZ3gUoXpthXjafGpJd1vvlVoc,8231
|
92
|
-
ams/pypower/core/ppver.py,sha256=J_NX8YfgINQT6FiBG6UxQztfk08lGOOtLk6fce8RVE0,304
|
93
|
-
ams/pypower/core/solver.py,sha256=x1Qv_j_Ol7cTJXYh2KNCvP3R9t0HwD3FM_yvT-Vb1W8,84912
|
94
|
-
ams/pypower/make/__init__.py,sha256=z-BBqZG4SUzrCAvwwgY5EBf2zsnpS74NWOGGyg_U2ck,494
|
95
|
-
ams/pypower/make/matrices.py,sha256=7gFnY_5FdVDFy9XBFVFgPsPFc-XPsPjYJ2y7vkp1uOM,23713
|
96
|
-
ams/pypower/make/pdv.py,sha256=0gxiUyh6uoVvv91-td_AZ6-QLBDyD7-km-qkMTWxAiE,18633
|
97
|
-
ams/pypower/routines/__init__.py,sha256=D3gkMZBjo6TzGLyMPNjM1TvTSY-9XIlgqUqNoSr_8b0,204
|
98
|
-
ams/pypower/routines/cpf.py,sha256=VRL8rWGFaOMn3VheKm2DWZzjpY99W1msvWN4yY9kHcE,17371
|
99
|
-
ams/pypower/routines/cpf_callbacks.py,sha256=93f3sdibG7FsXOP9EmqX-iTe0_eZmGtH1JhvtJB1Xig,4480
|
100
|
-
ams/pypower/routines/opf.py,sha256=SNklP0cC8qu-ji1vluEj7DjAtvWDneOEkZWZeMBdd5g,73447
|
101
|
-
ams/pypower/routines/opffcns.py,sha256=o8EpvWH32x3vbN9gV7Xi-D6RHQ5V2eB8NT15cZrwX2w,78144
|
102
|
-
ams/pypower/routines/pflow.py,sha256=q5RFZ5XuB5YQZk1jpJ5aTUB3DfgPJEGsvWyLDNo5PJo,30697
|
103
|
-
ams/routines/__init__.py,sha256=idfPyMhFr0hkUZjcAEQw14JA5zPHeFe3Vl3p4DCJ5d0,640
|
104
|
-
ams/routines/acopf.py,sha256=VZC3qs1G7zE--6XxE_wXv432nj3SV5hcrR8967ogYlg,3835
|
105
|
-
ams/routines/cpf.py,sha256=xsrUVjtGQ1b7UCXpwwYihqzTeEGJJKnO9LlX1Tz9Tks,1552
|
106
|
-
ams/routines/dcopf.py,sha256=6ETgopvX9tSFF3kssHsBchAttcyo2DTG-eIqjvlk0WY,11087
|
84
|
+
ams/routines/__init__.py,sha256=V_IyEb5qLBrZ4zc_eVe-Rc0G_j-u881tvEzcEejhNv8,647
|
85
|
+
ams/routines/acopf.py,sha256=dLVTh84KiBvLyG2auNsIfcufsl6N-9FcXWjpdYrQfYQ,208
|
86
|
+
ams/routines/dcopf.py,sha256=40I5pYUsUiear_DT9iHwRtFPs_yy-wlxQVDnFrlMtg4,11619
|
107
87
|
ams/routines/dcopf2.py,sha256=sDCP8zqYHDh7s7p9SX6G8QhMfIxCg3VPYJn6r3pRKyo,3620
|
108
|
-
ams/routines/dcpf.py,sha256=
|
109
|
-
ams/routines/dcpf0.py,sha256=V9zfBoV0cRMFLJdLrpvieyvwTybLTZADPoaKMJLKSkY,6814
|
88
|
+
ams/routines/dcpf.py,sha256=lGZ9LmCL1DsFB-sNxI7NGrq0qd_iBRMDPJmU5022t20,8242
|
110
89
|
ams/routines/dopf.py,sha256=8D36-FkPORYGaMnwGTqwz8HxAXk5ywo3mk8NlGq327g,6289
|
111
|
-
ams/routines/ed.py,sha256=
|
112
|
-
ams/routines/
|
113
|
-
ams/routines/
|
114
|
-
ams/routines/
|
90
|
+
ams/routines/ed.py,sha256=9Hf_ZqD6poIxCIBfsTMC0DGoPNEja1ZtVxqhb4ijhgE,11875
|
91
|
+
ams/routines/grbopt.py,sha256=RjrMq6XPHeBEbf-Pt9sLk2D1vnXZYYwaic4BP8lbACg,5480
|
92
|
+
ams/routines/pflow.py,sha256=5_9n10r_PfsVXIRkaBgKxVITumImZ8mvpHnwxX_ECdw,9432
|
93
|
+
ams/routines/pypower.py,sha256=U1UJbcNG7JawGmK9sKtjZlRrGwODVWDjJFucisMcvJs,26545
|
94
|
+
ams/routines/routine.py,sha256=v4jzsziQPvbVh5m0AH629NBEtmKlLvitFW5m-YfFtfY,35833
|
115
95
|
ams/routines/rted.py,sha256=GOHRxo0-HS5HhwQg8lv7-2VcGr_M_TdUvvomgJ31fDQ,22070
|
116
96
|
ams/routines/type.py,sha256=lvTWSnCYIbRJXIm3HX6jA0Hv-WWYusTOUPfoW8DITlU,3877
|
117
|
-
ams/routines/uc.py,sha256=
|
97
|
+
ams/routines/uc.py,sha256=VcuNy2TnBjsewKEGIqeo2EFTyuhpx5QsEvgpAtscDIQ,15648
|
118
98
|
ams/utils/__init__.py,sha256=2hAQmWRgmnE-bCGT9cJoW9FkPDMGRiGkbBcUgj-bgjI,122
|
119
99
|
ams/utils/misc.py,sha256=Y6tPKpUKJa7bL9alroJuG2UNW9vdQjnfAmKb2EbIls8,2027
|
120
|
-
ams/utils/paths.py,sha256=
|
100
|
+
ams/utils/paths.py,sha256=o9Ku2ETmYxsoD7VbMlS4qv_wGtXtT-SWIgDs0F7jpCQ,6693
|
121
101
|
docs/Makefile,sha256=UKXBFAbKGPt1Xw9J84343v0Mh8ylAZ-tE0uCd74DrQU,725
|
122
102
|
docs/make.bat,sha256=9UgKGb4SdP006622fJiFxeFT1BeycYAs6hDbV1xwPy8,804
|
123
|
-
docs/source/api.rst,sha256=
|
103
|
+
docs/source/api.rst,sha256=BRzdDFDzDwVL7Jr_Xj-O5Icgx0gt5hNNd1OjvPl7ap0,1490
|
124
104
|
docs/source/conf.py,sha256=UyoWogZTUNSJU7pQS_JaR28nKddW94zr01LYoIciZZw,6688
|
125
105
|
docs/source/genmodelref.py,sha256=IhmF7bDw8BXPvLD8V3WjQNrfc-H07r5iS-_4DHbbp-8,1420
|
126
|
-
docs/source/genroutineref.py,sha256=
|
106
|
+
docs/source/genroutineref.py,sha256=glHhbWUXfZzMDrkque9CBZu8QtdxlxPojInERzAAOwA,1063
|
127
107
|
docs/source/index.rst,sha256=N5phQS5RIyYs-NZo_5yYB8LjvHzOKLeXzRA-M8i-g3Q,2688
|
128
|
-
docs/source/release-notes.rst,sha256=
|
108
|
+
docs/source/release-notes.rst,sha256=7BtbNLQ2EUvSvB9KGNELicPAFqNT8uBzQQLqlT9MpMc,13830
|
129
109
|
docs/source/_templates/autosummary/base.rst,sha256=zl3U4baR4a6YjsHyT-x9zCOrHwKZOVUdWn1NPX2u3bc,106
|
130
110
|
docs/source/_templates/autosummary/class.rst,sha256=Hv_igCsLsUpM62_zN0nqj6FSfKnS5xLyu8ZldMbfOAk,668
|
131
111
|
docs/source/_templates/autosummary/module.rst,sha256=YdbpCudOrEU-JbuSlzGvcOI2hn_KrCM6FW5HcGqkaEE,1113
|
132
112
|
docs/source/_templates/autosummary/module_toctree.rst,sha256=sg30OdqFDLyo8Y3hl9V-s2BXb1bzcjjqqWaWi-C3qFM,1126
|
133
|
-
docs/source/examples/index.rst,sha256=
|
113
|
+
docs/source/examples/index.rst,sha256=yXR54WHHcBY38-h9LkdTBcNq3HDeT6eSNyrMmafq12E,792
|
134
114
|
docs/source/getting_started/copyright.rst,sha256=d3S7FjrbysVqQd3pEBadrrkcQOZ7sYYeDTCOS4goPC8,715
|
135
115
|
docs/source/getting_started/index.rst,sha256=mcp1NdUwbPoNzpn7Owf5Qzfd6J_--ToU52PjmrbwjBY,1512
|
136
|
-
docs/source/getting_started/install.rst,sha256=
|
116
|
+
docs/source/getting_started/install.rst,sha256=pCL5GDNxwkWnrPaO48i9c0bBPT_dYAWvD2CQ7Oi2P_0,7400
|
137
117
|
docs/source/getting_started/overview.rst,sha256=Zy890bDCUVW37NvjhQFUJUae1Zkghr72Az4Qd0PhP_I,1068
|
138
118
|
docs/source/getting_started/testcase.rst,sha256=L3fGjfm7mGj7ChRovYw5Jx6OP8PU5pTerid0_Y4iKVM,2016
|
139
119
|
docs/source/getting_started/verification.rst,sha256=Jxbgf-SmXYLSokylr1LKtGOjAWUc7a5D-uT_mQZ7i7c,243
|
@@ -144,7 +124,8 @@ docs/source/getting_started/formats/pypower.rst,sha256=8rpKdZkNcj1s-KK76XJAc3FZ2
|
|
144
124
|
docs/source/getting_started/formats/xlsx.png,sha256=WX5x7ZG9hBu5Ft8gmA_u4XQewK_SDWw30WOaXsAS8LY,171220
|
145
125
|
docs/source/getting_started/formats/xlsx.rst,sha256=utsE0AJirT_P7ZvCk63NhB-z19NdbS8OjWQyQ9juskM,761
|
146
126
|
docs/source/images/curent.ico,sha256=pKetB19VTcdXTRH6iACq5YWHZYPcDesd9bfnT2KaaOM,36637
|
147
|
-
docs/source/images/dcopf_time.png,sha256=
|
127
|
+
docs/source/images/dcopf_time.png,sha256=6BU5hCr-4mHZj76BNaHlTBVTrDXML-o78WGUxtrukEk,45985
|
128
|
+
docs/source/images/educ_pie.png,sha256=XZyhH4FFtRySpOAMoKpBnFCTWD4hE659Yf-55qGf63s,111483
|
148
129
|
docs/source/images/sponsors/CURENT_Logo_NameOnTrans.png,sha256=0t3hcFcIEdwFWqwCW3xivrpbqHihBlrzq-BjrajQXrA,87680
|
149
130
|
docs/source/images/sponsors/CURENT_Logo_Transparent.png,sha256=dCz3400_jBhWG7oJUKJO_Gm4Lejp-hOyFnj60UI2fUI,59336
|
150
131
|
docs/source/images/sponsors/CURENT_Logo_Transparent_Name.png,sha256=nIOUmexImq_Ytu7r8ZMTO1wM47wZ_ICHniShnB7JxSc,837476
|
@@ -155,33 +136,35 @@ docs/source/modeling/model.rst,sha256=j7OSvoXnDht6rGpgwPiJklsCWrebfx4DxIN-G8r6iF
|
|
155
136
|
docs/source/modeling/routine.rst,sha256=BkUE3y5L1lA7LP9Nyzc4zzY-tF3t4k7egBE188kybHY,4286
|
156
137
|
docs/source/modeling/system.rst,sha256=NMOPNMOKG1_dRyNPPx-MiCKbbpadxWJxGyU6geRUsvQ,1374
|
157
138
|
tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
158
|
-
tests/test_1st_system.py,sha256=
|
139
|
+
tests/test_1st_system.py,sha256=WoCgeyUCjBVwyYCqzwDkYy8F3dWArMQBESqIUQk6tOk,1907
|
159
140
|
tests/test_addressing.py,sha256=MIT713KCqMg0h2o4rBDZsGUrpGadmMlXnrrdq-wB77E,1364
|
160
|
-
tests/test_case.py,sha256=
|
141
|
+
tests/test_case.py,sha256=b_YZhwIN9sX3FCMD03hRNygV-mYthNj7cOhEv7-by-g,8857
|
161
142
|
tests/test_cli.py,sha256=TtCGBy2e7Ll_2gJTFo9juZtzhaakho_MqkcqhG2w2dk,870
|
162
|
-
tests/test_export_csv.py,sha256=
|
143
|
+
tests/test_export_csv.py,sha256=NTULXfTexgI1jf5koUMOYi3RLrSQouS7zxRjXo3ng50,2921
|
163
144
|
tests/test_group.py,sha256=Tq0s9gtenqrv4ws5YNzWxbiF4WgyhtMEAXZfJtew6M4,2699
|
164
|
-
tests/test_interface.py,sha256=
|
165
|
-
tests/test_io.py,sha256=
|
145
|
+
tests/test_interface.py,sha256=8hOZ1caRfoyoEdy1lnh8Y4rIL97FLb2oUKfX_N1lEDo,8838
|
146
|
+
tests/test_io.py,sha256=MIale4g0jMC9Vy4jjtFKpnh12aavp9lusczff1iIVC0,6493
|
166
147
|
tests/test_jumper.py,sha256=bdOknplEGnO_tiJc7p3xQvgTe2b6Dz53bOgbFaXKMAI,537
|
167
148
|
tests/test_known_good.py,sha256=NBrlAxnVMxIHXR2cWps-Kwjh36fiU4Y-eupspZkM0ks,9670
|
168
149
|
tests/test_matp.py,sha256=LkjhqxSFr6oY_ENpduDQ77rhLLBl6RzIHZ2d0m_8i-8,17262
|
169
150
|
tests/test_model.py,sha256=ZgghNYmEeALf8_1sPjq9lIJwuYDQ2SelivJNEYpHxJU,1621
|
170
|
-
tests/test_omodel.py,sha256=
|
151
|
+
tests/test_omodel.py,sha256=niVdTZJEZNSVHz-ocA0nnVx84Dt3-8P5FUrwKkNiA0I,4305
|
171
152
|
tests/test_paths.py,sha256=BU6Tjl4Q_WuHbid0ujkiibqx7yas42YJ7eV_avVMwuw,633
|
172
|
-
tests/test_report.py,sha256=
|
153
|
+
tests/test_report.py,sha256=RR23by4G-cyleaHTy9A7SEVet0eOVS-Tm0kk1GXY5dM,8134
|
173
154
|
tests/test_repr.py,sha256=g7MRdxLcZRI1PlREFdUG_npp0LkcQiJZfOPw1aq0EFM,570
|
174
|
-
tests/test_routine.py,sha256=
|
175
|
-
tests/
|
176
|
-
tests/
|
177
|
-
tests/
|
178
|
-
tests/test_rtn_ed.py,sha256=
|
179
|
-
tests/
|
180
|
-
tests/
|
181
|
-
tests/
|
155
|
+
tests/test_routine.py,sha256=DP5CwKtzliw2gNLW2W_3kp0Ihy4rCaxeBxMpgyN5AXA,6234
|
156
|
+
tests/test_rtn_acopf.py,sha256=Kg-RHflrrwyX2uHr16xSAze9XAdYcK7eg1LHMyr1uyA,2354
|
157
|
+
tests/test_rtn_dcopf.py,sha256=Pl6yGfvznnjP1oGiIWEhnqFIBW2futxPZS4o_DRkbrw,3660
|
158
|
+
tests/test_rtn_dcopf2.py,sha256=57_62TnHW-cS6iK2zXT_eXChnh83YiYoPypJwub3VmQ,3747
|
159
|
+
tests/test_rtn_ed.py,sha256=SeSuzqpTZZnBph41PV2Piplo9yxR3qpbhQUa6UCYnSw,10267
|
160
|
+
tests/test_rtn_opf.py,sha256=MmMNwb9-G0KzHcrrP4uHTvs9DBU71_XPIJqNnkQQPHo,4846
|
161
|
+
tests/test_rtn_pflow.py,sha256=QLg0q89Tcb-rrncpiNw6phjMEnvzvExjGTrkqGliiak,4664
|
162
|
+
tests/test_rtn_pypower.py,sha256=KO5VOZxETxVH2mY1mgNvzj1gz1Gdak1sAWxYleDU4E8,10477
|
163
|
+
tests/test_rtn_rted.py,sha256=QHDUymorCqQAJKFlDgTy40JyLTGDvNVNU3tjbjDl3-0,9850
|
164
|
+
tests/test_rtn_uc.py,sha256=UbMeaam3dZwgq2LAJokGOl3LT5B3TWKMjCp4dRcLs40,8497
|
182
165
|
tests/test_service.py,sha256=6IP6CAH2xHxGHZM4-R8LjZxVJ2L10LcGaPDyRIqKLmc,2438
|
183
|
-
ltbams-1.0.
|
184
|
-
ltbams-1.0.
|
185
|
-
ltbams-1.0.
|
186
|
-
ltbams-1.0.
|
187
|
-
ltbams-1.0.
|
166
|
+
ltbams-1.0.11.dist-info/METADATA,sha256=HJopLlES434MQhl_hg4DDQNs90TfSJLovZKG-NChtNs,13808
|
167
|
+
ltbams-1.0.11.dist-info/WHEEL,sha256=zaaOINJESkSfm_4HQVc5ssNzHCPXhJm0kEUakpsEHaU,91
|
168
|
+
ltbams-1.0.11.dist-info/entry_points.txt,sha256=FA56FlhO_yVNeEf810SrorVQb7_Xsmo3_EW-W-ijUfA,37
|
169
|
+
ltbams-1.0.11.dist-info/top_level.txt,sha256=pyKDqG2kj13F9-BYd_wkruRdBSqLXw8Nwc-cmljqrxg,15
|
170
|
+
ltbams-1.0.11.dist-info/RECORD,,
|
tests/test_1st_system.py
CHANGED
@@ -19,7 +19,7 @@ class TestCodegen(unittest.TestCase):
|
|
19
19
|
out += group.doc_all()
|
20
20
|
|
21
21
|
def test_docum(self) -> None:
|
22
|
-
sp = ams.load(ams.get_case('5bus/pjm5bus_demo.
|
22
|
+
sp = ams.load(ams.get_case('5bus/pjm5bus_demo.json'),
|
23
23
|
setup=True, no_output=True)
|
24
24
|
sp.DCOPF.init()
|
25
25
|
docum = sp.DCOPF.docum
|
@@ -30,7 +30,7 @@ class TestCodegen(unittest.TestCase):
|
|
30
30
|
docum._var_doc(max_width=78, export=export)
|
31
31
|
docum._service_doc(max_width=78, export=export)
|
32
32
|
docum._param_doc(max_width=78, export=export)
|
33
|
-
docum.config.doc(max_width=78, export=export)
|
33
|
+
docum.parent.config.doc(max_width=78, export=export)
|
34
34
|
|
35
35
|
|
36
36
|
class TestParamCorrection(unittest.TestCase):
|
tests/test_case.py
CHANGED
@@ -14,7 +14,7 @@ class Test5Bus(unittest.TestCase):
|
|
14
14
|
|
15
15
|
def setUp(self) -> None:
|
16
16
|
self.ss = ams.main.load(
|
17
|
-
get_case("5bus/pjm5bus_demo.
|
17
|
+
get_case("5bus/pjm5bus_demo.json"),
|
18
18
|
default_config=True,
|
19
19
|
no_output=True,
|
20
20
|
)
|
@@ -110,19 +110,19 @@ class Test5Bus(unittest.TestCase):
|
|
110
110
|
self.ss.ACOPF.run()
|
111
111
|
np.testing.assert_array_equal(self.ss.GCost.c1.v, [1500., 3100., 0.4, 0.1, 0.01])
|
112
112
|
|
113
|
-
def test_multiple_disconnected_line(self):
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
113
|
+
# def test_multiple_disconnected_line(self):
|
114
|
+
# """
|
115
|
+
# Test connectivity check for systems with disconnected lines.
|
116
|
+
|
117
|
+
# These disconnected lines (zeros) was not excluded when counting
|
118
|
+
# connected buses, causing an out-of-bound error.
|
119
|
+
# """
|
120
|
+
# # TODO: need to add `connectivity` in `system`
|
121
|
+
# pass
|
122
|
+
# # self.ss.Line.u.v[[0, 6]] = 0
|
123
|
+
# # self.ss.PFlow.run()
|
124
|
+
# # self.assertEqual(len(self.ss.Bus.islands), 1)
|
125
|
+
# # self.assertEqual(self.ss.Bus.n_islanded_buses, 0)
|
126
126
|
|
127
127
|
|
128
128
|
class TestIEEE14RAW(unittest.TestCase):
|
tests/test_export_csv.py
CHANGED
tests/test_interface.py
CHANGED
@@ -17,7 +17,7 @@ class TestAndesConversion(unittest.TestCase):
|
|
17
17
|
Tests conversion from AMS to ANDES.
|
18
18
|
"""
|
19
19
|
ad_cases = [
|
20
|
-
'ieee14/
|
20
|
+
'ieee14/ieee14_exac1.json',
|
21
21
|
'ieee39/ieee39_full.xlsx',
|
22
22
|
'npcc/npcc.xlsx',
|
23
23
|
]
|
@@ -133,7 +133,7 @@ class TestAndesConversion(unittest.TestCase):
|
|
133
133
|
"""
|
134
134
|
Test conversion when there is Toggle in ANDES case.
|
135
135
|
"""
|
136
|
-
sp = ams.load(ams.get_case('5bus/pjm5bus_demo.
|
136
|
+
sp = ams.load(ams.get_case('5bus/pjm5bus_demo.json'),
|
137
137
|
setup=True,
|
138
138
|
no_output=True,
|
139
139
|
default_config=True)
|
@@ -214,3 +214,25 @@ class TestDataExchange(unittest.TestCase):
|
|
214
214
|
sa.TDS.run()
|
215
215
|
self.sp.dyn.send(adsys=sa, routine='RTED')
|
216
216
|
self.sp.dyn.receive(adsys=sa, routine='RTED', no_update=False)
|
217
|
+
|
218
|
+
|
219
|
+
class TestLoadANDESFile(unittest.TestCase):
|
220
|
+
"""
|
221
|
+
Test loading ANDES file.
|
222
|
+
"""
|
223
|
+
|
224
|
+
def test_no_dyn_models(self):
|
225
|
+
"""
|
226
|
+
Test loading ANDES file without dynamic models.
|
227
|
+
"""
|
228
|
+
sp1 = ams.load(andes.get_case('ieee14/ieee14_exac1.json'),
|
229
|
+
setup=True,
|
230
|
+
no_output=True,
|
231
|
+
default_config=True,)
|
232
|
+
self.assertNotIn('EXAC1', sp1.models.keys())
|
233
|
+
|
234
|
+
sp2 = ams.load(andes.get_case('ieee14/ieee14_pvd1.json'),
|
235
|
+
setup=True,
|
236
|
+
no_output=True,
|
237
|
+
default_config=True,)
|
238
|
+
self.assertIn('PVD1', sp2.models.keys())
|
tests/test_io.py
CHANGED
@@ -50,6 +50,7 @@ class TestMATPOWER(unittest.TestCase):
|
|
50
50
|
with self.assertRaises(ValueError, msg='gentype length check failed!'):
|
51
51
|
ams.io.matpower.mpc2system(mpc14, system14)
|
52
52
|
|
53
|
+
system14 = ams.system.System()
|
53
54
|
ams.io.matpower.mpc2system(self.mpc14, system14)
|
54
55
|
# In case14.m, the gencost has type 2 cost model, with 3 parameters.
|
55
56
|
np.testing.assert_array_less(np.zeros(system14.StaticGen.n),
|
@@ -128,3 +129,52 @@ class TestMATPOWER(unittest.TestCase):
|
|
128
129
|
# Clean up the generated files
|
129
130
|
os.remove(mfile5)
|
130
131
|
os.remove(mfile14)
|
132
|
+
|
133
|
+
def test_system2m(self):
|
134
|
+
"""Test conversion from AMS System to M file."""
|
135
|
+
s5 = ams.load(ams.get_case('matpower/case5.m'),
|
136
|
+
no_output=True)
|
137
|
+
mfile5 = './case5out.m'
|
138
|
+
ams.io.matpower.write(s5, mfile5)
|
139
|
+
|
140
|
+
# Clean up the generated file
|
141
|
+
os.remove(mfile5)
|
142
|
+
|
143
|
+
|
144
|
+
class TestSystemExport(unittest.TestCase):
|
145
|
+
"""
|
146
|
+
Test system export functions.
|
147
|
+
"""
|
148
|
+
|
149
|
+
def test_system_to(self):
|
150
|
+
"""Test conversion from AMS System to several formats."""
|
151
|
+
ss = ams.load(ams.get_case('matpower/case5.m'),
|
152
|
+
no_output=True)
|
153
|
+
|
154
|
+
mpc = ss.to_mpc()
|
155
|
+
|
156
|
+
self.assertIsInstance(mpc, dict)
|
157
|
+
self.assertIn('bus', mpc)
|
158
|
+
self.assertIn('branch', mpc)
|
159
|
+
self.assertIn('gen', mpc)
|
160
|
+
self.assertIn('gencost', mpc)
|
161
|
+
self.assertIn('baseMVA', mpc)
|
162
|
+
self.assertIn('bus_name', mpc)
|
163
|
+
self.assertIn('gentype', mpc)
|
164
|
+
self.assertIn('genfuel', mpc)
|
165
|
+
|
166
|
+
ss.to_m("./case5_out.m")
|
167
|
+
self.assertTrue(os.path.exists("./case5_out.m"))
|
168
|
+
os.remove("./case5_out.m")
|
169
|
+
|
170
|
+
ss.to_json("./case5_out.json")
|
171
|
+
self.assertTrue(os.path.exists("./case5_out.json"))
|
172
|
+
os.remove("./case5_out.json")
|
173
|
+
|
174
|
+
ss.to_xlsx("./case5_out.xlsx")
|
175
|
+
self.assertTrue(os.path.exists("./case5_out.xlsx"))
|
176
|
+
os.remove("./case5_out.xlsx")
|
177
|
+
|
178
|
+
ss.to_raw("./case5_out.raw", overwrite=True)
|
179
|
+
self.assertTrue(os.path.exists("./case5_out.raw"))
|
180
|
+
os.remove("./case5_out.raw")
|
tests/test_omodel.py
CHANGED
@@ -70,7 +70,7 @@ class TestOModelrepr(unittest.TestCase):
|
|
70
70
|
"""
|
71
71
|
|
72
72
|
def setUp(self) -> None:
|
73
|
-
self.ss = ams.load(ams.get_case("5bus/pjm5bus_demo.
|
73
|
+
self.ss = ams.load(ams.get_case("5bus/pjm5bus_demo.json"),
|
74
74
|
setup=True,
|
75
75
|
default_config=True,
|
76
76
|
no_output=True,
|