ltbams 0.9.6__tar.gz → 0.9.7__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.
- {ltbams-0.9.6 → ltbams-0.9.7}/LICENSE +2 -2
- {ltbams-0.9.6/ltbams.egg-info → ltbams-0.9.7}/PKG-INFO +5 -5
- {ltbams-0.9.6 → ltbams-0.9.7}/README.md +3 -3
- {ltbams-0.9.6 → ltbams-0.9.7}/ams/__init__.py +2 -1
- {ltbams-0.9.6 → ltbams-0.9.7}/ams/_version.py +3 -3
- ltbams-0.9.7/ams/cases/5bus/pjm5bus_uced_ev.xlsx +0 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/ams/core/matprocessor.py +69 -48
- {ltbams-0.9.6 → ltbams-0.9.7}/ams/core/model.py +1 -1
- {ltbams-0.9.6 → ltbams-0.9.7}/ams/core/service.py +1 -1
- ltbams-0.9.7/ams/extension/__init__.py +5 -0
- ltbams-0.9.7/ams/extension/eva.py +401 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/ams/interop/andes.py +1 -1
- {ltbams-0.9.6 → ltbams-0.9.7}/ams/io/matpower.py +31 -23
- {ltbams-0.9.6 → ltbams-0.9.7}/ams/models/__init__.py +2 -2
- {ltbams-0.9.6 → ltbams-0.9.7}/ams/models/bus.py +7 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/ams/models/distributed/__init__.py +1 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/ams/models/distributed/esd1.py +1 -1
- ltbams-0.9.7/ams/models/distributed/ev.py +60 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/ams/models/distributed/pvd1.py +1 -1
- {ltbams-0.9.6 → ltbams-0.9.7}/ams/models/group.py +1 -1
- {ltbams-0.9.6 → ltbams-0.9.7}/ams/models/renewable/regc.py +4 -4
- {ltbams-0.9.6 → ltbams-0.9.7}/ams/models/static/gen.py +1 -1
- {ltbams-0.9.6 → ltbams-0.9.7}/ams/models/timeslot.py +1 -1
- {ltbams-0.9.6 → ltbams-0.9.7}/ams/pypower/routines/pflow.py +3 -5
- {ltbams-0.9.6 → ltbams-0.9.7}/ams/routines/__init__.py +1 -1
- {ltbams-0.9.6 → ltbams-0.9.7}/ams/routines/acopf.py +1 -2
- {ltbams-0.9.6 → ltbams-0.9.7}/ams/routines/dcpf.py +10 -6
- {ltbams-0.9.6 → ltbams-0.9.7}/ams/routines/ed.py +7 -7
- {ltbams-0.9.6 → ltbams-0.9.7}/ams/routines/pflow.py +2 -2
- {ltbams-0.9.6 → ltbams-0.9.7}/ams/routines/routine.py +1 -1
- {ltbams-0.9.6 → ltbams-0.9.7}/ams/routines/rted.py +1 -1
- {ltbams-0.9.6 → ltbams-0.9.7}/ams/routines/uc.py +2 -2
- {ltbams-0.9.6 → ltbams-0.9.7}/ams/system.py +8 -1
- {ltbams-0.9.6 → ltbams-0.9.7}/docs/source/conf.py +1 -1
- {ltbams-0.9.6 → ltbams-0.9.7}/docs/source/getting_started/formats/pypower.rst +1 -1
- {ltbams-0.9.6 → ltbams-0.9.7}/docs/source/getting_started/index.rst +1 -1
- {ltbams-0.9.6 → ltbams-0.9.7}/docs/source/getting_started/overview.rst +1 -1
- {ltbams-0.9.6 → ltbams-0.9.7}/docs/source/index.rst +4 -4
- {ltbams-0.9.6 → ltbams-0.9.7}/docs/source/modeling/example.rst +1 -1
- {ltbams-0.9.6 → ltbams-0.9.7}/docs/source/modeling/routine.rst +5 -5
- {ltbams-0.9.6 → ltbams-0.9.7}/docs/source/release-notes.rst +59 -2
- {ltbams-0.9.6 → ltbams-0.9.7/ltbams.egg-info}/PKG-INFO +5 -5
- {ltbams-0.9.6 → ltbams-0.9.7}/ltbams.egg-info/SOURCES.txt +4 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/ltbams.egg-info/requires.txt +1 -1
- {ltbams-0.9.6 → ltbams-0.9.7}/requirements.txt +1 -1
- {ltbams-0.9.6 → ltbams-0.9.7}/setup.py +1 -1
- {ltbams-0.9.6 → ltbams-0.9.7}/tests/test_mats.py +54 -57
- {ltbams-0.9.6 → ltbams-0.9.7}/tests/test_routine.py +5 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/CONTRIBUTING.rst +0 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/MANIFEST.in +0 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/ams/__main__.py +0 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/ams/cases/5bus/pjm5bus_demo.xlsx +0 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/ams/cases/5bus/pjm5bus_uced.json +0 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/ams/cases/5bus/pjm5bus_uced.xlsx +0 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/ams/cases/5bus/pjm5bus_uced_esd1.xlsx +0 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/ams/cases/ieee123/ieee123.xlsx +0 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/ams/cases/ieee123/ieee123_regcv1.xlsx +0 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/ams/cases/ieee14/ieee14.json +0 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/ams/cases/ieee14/ieee14.raw +0 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/ams/cases/ieee14/ieee14_uced.xlsx +0 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/ams/cases/ieee39/ieee39.xlsx +0 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/ams/cases/ieee39/ieee39_uced.xlsx +0 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/ams/cases/ieee39/ieee39_uced_esd1.xlsx +0 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/ams/cases/ieee39/ieee39_uced_pvd1.xlsx +0 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/ams/cases/ieee39/ieee39_uced_vis.xlsx +0 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/ams/cases/matpower/case118.m +0 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/ams/cases/matpower/case14.m +0 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/ams/cases/matpower/case300.m +0 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/ams/cases/matpower/case39.m +0 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/ams/cases/matpower/case5.m +0 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/ams/cases/matpower/case_ACTIVSg2000.m +0 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/ams/cases/npcc/npcc.m +0 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/ams/cases/npcc/npcc_uced.xlsx +0 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/ams/cases/pglib/pglib_opf_case39_epri__api.m +0 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/ams/cases/wecc/wecc.m +0 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/ams/cases/wecc/wecc_uced.xlsx +0 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/ams/cli.py +0 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/ams/core/__init__.py +0 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/ams/core/documenter.py +0 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/ams/core/param.py +0 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/ams/core/symprocessor.py +0 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/ams/core/var.py +0 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/ams/interop/__init__.py +0 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/ams/io/__init__.py +0 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/ams/io/json.py +0 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/ams/io/psse.py +0 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/ams/io/pypower.py +0 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/ams/io/xlsx.py +0 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/ams/main.py +0 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/ams/models/area.py +0 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/ams/models/cost.py +0 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/ams/models/info.py +0 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/ams/models/line.py +0 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/ams/models/region.py +0 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/ams/models/renewable/__init__.py +0 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/ams/models/reserve.py +0 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/ams/models/shunt.py +0 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/ams/models/static/__init__.py +0 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/ams/models/static/pq.py +0 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/ams/opt/__init__.py +0 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/ams/opt/omodel.py +0 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/ams/pypower/__init__.py +0 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/ams/pypower/_compat.py +0 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/ams/pypower/core/__init__.py +0 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/ams/pypower/core/pips.py +0 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/ams/pypower/core/ppoption.py +0 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/ams/pypower/core/ppver.py +0 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/ams/pypower/core/solver.py +0 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/ams/pypower/eps.py +0 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/ams/pypower/idx.py +0 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/ams/pypower/io.py +0 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/ams/pypower/make/__init__.py +0 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/ams/pypower/make/matrices.py +0 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/ams/pypower/make/pdv.py +0 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/ams/pypower/routines/__init__.py +0 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/ams/pypower/routines/cpf.py +0 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/ams/pypower/routines/cpf_callbacks.py +0 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/ams/pypower/routines/opf.py +0 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/ams/pypower/routines/opffcns.py +0 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/ams/pypower/toggle.py +0 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/ams/pypower/utils.py +0 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/ams/report.py +0 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/ams/routines/cpf.py +0 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/ams/routines/dcopf.py +0 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/ams/routines/dopf.py +0 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/ams/routines/type.py +0 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/ams/shared.py +0 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/ams/utils/__init__.py +0 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/ams/utils/paths.py +0 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/docs/Makefile +0 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/docs/make.bat +0 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/docs/source/_templates/autosummary/base.rst +0 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/docs/source/_templates/autosummary/class.rst +0 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/docs/source/_templates/autosummary/module.rst +0 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/docs/source/_templates/autosummary/module_toctree.rst +0 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/docs/source/api.rst +0 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/docs/source/examples/index.rst +0 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/docs/source/getting_started/copyright.rst +0 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/docs/source/getting_started/formats/index.rst +0 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/docs/source/getting_started/formats/matpower.rst +0 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/docs/source/getting_started/formats/psse.rst +0 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/docs/source/getting_started/formats/xlsx.png +0 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/docs/source/getting_started/formats/xlsx.rst +0 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/docs/source/getting_started/install.rst +0 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/docs/source/getting_started/testcase.rst +0 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/docs/source/getting_started/verification.rst +0 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/docs/source/images/dcopf_time.png +0 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/docs/source/images/sponsors/CURENT_Logo_NameOnTrans.png +0 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/docs/source/images/sponsors/CURENT_Logo_Transparent.png +0 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/docs/source/images/sponsors/CURENT_Logo_Transparent_Name.png +0 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/docs/source/images/sponsors/doe.png +0 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/docs/source/modeling/index.rst +0 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/docs/source/modeling/model.rst +0 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/docs/source/modeling/system.rst +0 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/ltbams.egg-info/dependency_links.txt +0 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/ltbams.egg-info/entry_points.txt +0 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/ltbams.egg-info/top_level.txt +0 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/requirements-extra.txt +0 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/setup.cfg +0 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/tests/__init__.py +0 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/tests/test_1st_system.py +0 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/tests/test_addressing.py +0 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/tests/test_andes.py +0 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/tests/test_case.py +0 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/tests/test_cli.py +0 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/tests/test_dctypes.py +0 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/tests/test_export_csv.py +0 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/tests/test_group.py +0 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/tests/test_known_good.py +0 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/tests/test_model.py +0 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/tests/test_paths.py +0 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/tests/test_report.py +0 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/tests/test_repr.py +0 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/tests/test_service.py +0 -0
- {ltbams-0.9.6 → ltbams-0.9.7}/versioneer.py +0 -0
@@ -1,4 +1,4 @@
|
|
1
|
-
AMS: Python Software for
|
1
|
+
AMS: Python Software for Scheduling Modeling and Co-Simulation with Dynanic
|
2
2
|
|
3
3
|
Copyright (c) 2023-2024 Jinning Wang
|
4
4
|
|
@@ -649,7 +649,7 @@ to attach them to the start of each source file to most effectively
|
|
649
649
|
state the exclusion of warranty; and each file should have at least
|
650
650
|
the "copyright" line and a pointer to where the full notice is found.
|
651
651
|
|
652
|
-
AMS, a python software for
|
652
|
+
AMS, a python software for scheduling modeling and co-simulation with dynanic
|
653
653
|
Copyright (C) 2023 Jinning Wang
|
654
654
|
|
655
655
|
This program is free software: you can redistribute it and/or modify
|
@@ -1,7 +1,7 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: ltbams
|
3
|
-
Version: 0.9.
|
4
|
-
Summary: Python software for
|
3
|
+
Version: 0.9.7
|
4
|
+
Summary: Python software for scheduling modeling and co-simulation with dynanics.
|
5
5
|
Home-page: https://github.com/CURENT/ams
|
6
6
|
Author: Jinning Wang
|
7
7
|
Author-email: jinninggm@gmail.com
|
@@ -33,7 +33,7 @@ License-File: LICENSE
|
|
33
33
|
|
34
34
|
# LTB AMS
|
35
35
|
|
36
|
-
Python Software for Power System
|
36
|
+
Python Software for Power System Scheduling Modeling and Co-Simulation with Dynanic, serving as the market simulator for the [CURENT Largescale Testbed][LTB Repository].
|
37
37
|
|
38
38
|
[](https://github.com/CURENT/ams/blob/master/LICENSE)
|
39
39
|

|
@@ -64,7 +64,7 @@ Python Software for Power System Dispatch Modeling and Co-Simulation with Dynani
|
|
64
64
|
|
65
65
|
With the built-in interface with dynamic simulation engine, ANDES, AMS enables Dynamics Interfaced Stability Constrained Production Cost and Market Operation Modeling.
|
66
66
|
|
67
|
-
AMS produces credible
|
67
|
+
AMS produces credible scheduling results and competitive performance.
|
68
68
|
The following results show the comparison of DCOPF between AMS and other tools.
|
69
69
|
|
70
70
|
| Cost [\$] | AMS | MATPOWER | pandapower |
|
@@ -112,7 +112,7 @@ pip install git+https://github.com/CURENT/ams.git
|
|
112
112
|
```
|
113
113
|
|
114
114
|
# Sponsors and Contributors
|
115
|
-
AMS is the
|
115
|
+
AMS is the scheduling simulation engine for the CURENT Largescale Testbed (LTB).
|
116
116
|
More information about CURENT LTB can be found at the [LTB Repository][LTB Repository].
|
117
117
|
|
118
118
|
This work was supported in part by the Engineering Research Center Program of the National Science Foundation and the Department of Energy
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# LTB AMS
|
2
2
|
|
3
|
-
Python Software for Power System
|
3
|
+
Python Software for Power System Scheduling Modeling and Co-Simulation with Dynanic, serving as the market simulator for the [CURENT Largescale Testbed][LTB Repository].
|
4
4
|
|
5
5
|
[](https://github.com/CURENT/ams/blob/master/LICENSE)
|
6
6
|

|
@@ -31,7 +31,7 @@ Python Software for Power System Dispatch Modeling and Co-Simulation with Dynani
|
|
31
31
|
|
32
32
|
With the built-in interface with dynamic simulation engine, ANDES, AMS enables Dynamics Interfaced Stability Constrained Production Cost and Market Operation Modeling.
|
33
33
|
|
34
|
-
AMS produces credible
|
34
|
+
AMS produces credible scheduling results and competitive performance.
|
35
35
|
The following results show the comparison of DCOPF between AMS and other tools.
|
36
36
|
|
37
37
|
| Cost [\$] | AMS | MATPOWER | pandapower |
|
@@ -79,7 +79,7 @@ pip install git+https://github.com/CURENT/ams.git
|
|
79
79
|
```
|
80
80
|
|
81
81
|
# Sponsors and Contributors
|
82
|
-
AMS is the
|
82
|
+
AMS is the scheduling simulation engine for the CURENT Largescale Testbed (LTB).
|
83
83
|
More information about CURENT LTB can be found at the [LTB Repository][LTB Repository].
|
84
84
|
|
85
85
|
This work was supported in part by the Engineering Research Center Program of the National Science Foundation and the Department of Energy
|
@@ -9,6 +9,7 @@ from ams import routines # NOQA
|
|
9
9
|
from ams import opt # NOQA
|
10
10
|
from ams import pypower # NOQA
|
11
11
|
from ams import report # NOQA
|
12
|
+
from ams import extension # NOQA
|
12
13
|
|
13
14
|
from ams.main import config_logger, load, run # NOQA
|
14
15
|
from ams.utils.paths import get_case # NOQA
|
@@ -16,4 +17,4 @@ from ams.shared import ppc2df # NOQA
|
|
16
17
|
|
17
18
|
__author__ = 'Jining Wang'
|
18
19
|
|
19
|
-
__all__ = ['io', 'utils', 'models', 'system']
|
20
|
+
__all__ = ['io', 'utils', 'models', 'system', 'extension']
|
@@ -8,11 +8,11 @@ import json
|
|
8
8
|
|
9
9
|
version_json = '''
|
10
10
|
{
|
11
|
-
"date": "2024-
|
11
|
+
"date": "2024-05-24T15:44:01-0400",
|
12
12
|
"dirty": false,
|
13
13
|
"error": null,
|
14
|
-
"full-revisionid": "
|
15
|
-
"version": "0.9.
|
14
|
+
"full-revisionid": "bc97bef7420651060bce99b80588ccb4d23a322b",
|
15
|
+
"version": "0.9.7"
|
16
16
|
}
|
17
17
|
''' # END VERSION_JSON
|
18
18
|
|
Binary file
|
@@ -392,7 +392,7 @@ class MatProcessor:
|
|
392
392
|
|
393
393
|
return b
|
394
394
|
|
395
|
-
def build_ptdf(self):
|
395
|
+
def build_ptdf(self, dtype='float64', no_store=False):
|
396
396
|
"""
|
397
397
|
Build the DC PTDF matrix and store it in the MParam `PTDF`.
|
398
398
|
|
@@ -404,6 +404,15 @@ class MatProcessor:
|
|
404
404
|
Note that there is discrepency between the PTDF-based line flow and
|
405
405
|
DCOPF calcualted line flow. The gap is ignorable for small cases.
|
406
406
|
|
407
|
+
Try to use 'float32' for dtype if memory is a concern.
|
408
|
+
|
409
|
+
Parameters
|
410
|
+
----------
|
411
|
+
dtype : str, optional
|
412
|
+
Data type of the PTDF matrix. Default is 'float64'.
|
413
|
+
no_store : bool, optional
|
414
|
+
If True, the PTDF will not be stored into `MatProcessor.PTDF._v`.
|
415
|
+
|
407
416
|
Returns
|
408
417
|
-------
|
409
418
|
PTDF : np.ndarray
|
@@ -411,10 +420,6 @@ class MatProcessor:
|
|
411
420
|
"""
|
412
421
|
system = self.system
|
413
422
|
|
414
|
-
# common variables
|
415
|
-
nb = system.Bus.n
|
416
|
-
nl = system.Line.n
|
417
|
-
|
418
423
|
# use first slack bus as reference slack bus
|
419
424
|
slack = system.Slack.bus.v[0]
|
420
425
|
|
@@ -428,19 +433,22 @@ class MatProcessor:
|
|
428
433
|
if not self.initialized:
|
429
434
|
logger.debug("System matrices are not built. Building now.")
|
430
435
|
self.build()
|
436
|
+
|
431
437
|
# use dense representation
|
432
|
-
Bbus
|
438
|
+
Bbus = self.Bbus._v.todense().astype(dtype)
|
439
|
+
Bf = self.Bf._v.todense().astype(dtype)
|
433
440
|
|
434
441
|
# initialize PTDF matrix
|
435
|
-
H = np.zeros((
|
442
|
+
H = np.zeros((system.Line.n, system.Bus.n), dtype=dtype)
|
436
443
|
# calculate PTDF
|
437
444
|
H[:, noslack] = np.linalg.solve(Bbus[np.ix_(noslack, noref)].T, Bf[:, noref].T).T
|
438
|
-
# store PTDF
|
439
|
-
self.PTDF._v = H
|
440
445
|
|
441
|
-
|
446
|
+
if not no_store:
|
447
|
+
self.PTDF._v = H
|
448
|
+
|
449
|
+
return H
|
442
450
|
|
443
|
-
def build_lodf(self):
|
451
|
+
def build_lodf(self, dtype='float64', no_store=False):
|
444
452
|
"""
|
445
453
|
Build the DC LODF matrix and store it in the MParam `LODF`.
|
446
454
|
|
@@ -449,70 +457,83 @@ class MatProcessor:
|
|
449
457
|
|
450
458
|
It requires DC PTDF and Cft.
|
451
459
|
|
460
|
+
Try to use 'float32' for dtype if memory is a concern.
|
461
|
+
|
462
|
+
Parameters
|
463
|
+
----------
|
464
|
+
dtype : str, optional
|
465
|
+
Data type of the LODF matrix. Default is 'float64'.
|
466
|
+
no_store : bool, optional
|
467
|
+
If True, the LODF will not be stored into `MatProcessor.LODF._v`.
|
468
|
+
|
452
469
|
Returns
|
453
470
|
-------
|
454
471
|
LODF : np.ndarray
|
455
472
|
Line outage distribution factor.
|
456
473
|
"""
|
457
|
-
|
458
|
-
|
459
|
-
# common variables
|
460
|
-
nl = system.Line.n
|
474
|
+
nl = self.system.Line.n
|
461
475
|
|
462
476
|
# build PTDF if not built
|
463
477
|
if self.PTDF._v is None:
|
464
|
-
self.build_ptdf()
|
478
|
+
ptdf = self.build_ptdf(dtype=dtype, no_store=True)
|
479
|
+
else:
|
480
|
+
ptdf = self.PTDF._v
|
465
481
|
|
466
|
-
H =
|
482
|
+
H = ptdf * self.Cft._v
|
467
483
|
h = np.diag(H, 0)
|
468
484
|
LODF = safe_div(H, np.ones((nl, nl)) - np.ones((nl, 1)) * h.T)
|
469
485
|
LODF = LODF - np.diag(np.diag(LODF)) - np.eye(nl, nl)
|
470
486
|
|
471
|
-
|
472
|
-
|
487
|
+
if not no_store:
|
488
|
+
self.LODF._v = LODF.astype(dtype)
|
489
|
+
return LODF.astype(dtype)
|
473
490
|
|
474
|
-
def build_otdf(self, line=None):
|
491
|
+
def build_otdf(self, line=None, dtype='float64'):
|
475
492
|
"""
|
476
|
-
Build the DC OTDF matrix
|
493
|
+
Build the DC OTDF matrix for line outage:
|
494
|
+
:math:`OTDF_k = PTDF + LODF[:, k] @ PTDF[k, ]`,
|
495
|
+
where k is the outage line locations.
|
477
496
|
|
478
|
-
|
497
|
+
OTDF_k[m, n] means the increased line flow on line `m` when there is
|
498
|
+
1 p.u. line flow decrease on line `k` due to line `k` outage.
|
479
499
|
|
480
|
-
|
500
|
+
Note that the OTDF is not stored in the MatProcessor.
|
501
|
+
|
502
|
+
Try to use 'float32' for dtype if memory is a concern.
|
481
503
|
|
482
504
|
Parameters
|
483
505
|
----------
|
484
|
-
line : int, str, optional
|
485
|
-
|
486
|
-
|
506
|
+
line : int, str, list, optional
|
507
|
+
Lines index for which the OTDF is calculated. It takes both single
|
508
|
+
or multiple line indices.
|
509
|
+
If not given, the first line is used by default.
|
510
|
+
dtype : str, optional
|
511
|
+
Data type of the OTDF matrix. Default is 'float64'.
|
487
512
|
|
488
513
|
Returns
|
489
514
|
-------
|
490
515
|
OTDF : np.ndarray
|
491
516
|
Line outage distribution factor.
|
492
517
|
"""
|
493
|
-
|
494
|
-
|
495
|
-
|
496
|
-
|
497
|
-
elif isinstance(line, list):
|
498
|
-
logger.warning("Multiple line is given, only the first one is used.")
|
499
|
-
line = line[0]
|
500
|
-
line_uid = system.Line.idx2uid(line)
|
518
|
+
if self.PTDF._v is None:
|
519
|
+
ptdf = self.build_ptdf(dtype=dtype, no_store=True)
|
520
|
+
else:
|
521
|
+
ptdf = self.PTDF._v
|
501
522
|
|
502
|
-
# build LODF if not built
|
503
523
|
if self.LODF._v is None:
|
504
|
-
self.build_lodf()
|
524
|
+
lodf = self.build_lodf(dtype=dtype, no_store=True)
|
525
|
+
else:
|
526
|
+
lodf = self.LODF._v
|
505
527
|
|
506
|
-
|
507
|
-
|
508
|
-
|
509
|
-
|
510
|
-
|
511
|
-
|
512
|
-
|
513
|
-
|
514
|
-
|
515
|
-
OTDF += self.PTDF._v # Add PTDF to OTDF
|
516
|
-
OTDF += line_lodf[:, np.newaxis] * line_ptdf # Add LODF * PTDF for the outage line
|
528
|
+
if line is None:
|
529
|
+
luid = [0]
|
530
|
+
elif isinstance(line, (int, str)):
|
531
|
+
try:
|
532
|
+
luid = [self.system.Line.idx2uid(line)]
|
533
|
+
except ValueError:
|
534
|
+
raise ValueError(f"Line {line} not found.")
|
535
|
+
elif isinstance(line, list):
|
536
|
+
luid = self.system.Line.idx2uid(line)
|
517
537
|
|
518
|
-
|
538
|
+
otdf = ptdf + lodf[:, luid] @ ptdf[luid, :]
|
539
|
+
return otdf.astype(dtype)
|
@@ -497,7 +497,7 @@ class MinDur(NumOpDual):
|
|
497
497
|
n_gen = self.u.n
|
498
498
|
n_ts = self.u.horizon.n
|
499
499
|
tout = np.zeros((n_gen, n_ts))
|
500
|
-
t = self.rtn.config.t #
|
500
|
+
t = self.rtn.config.t # scheduling interval
|
501
501
|
|
502
502
|
# minimum online/offline duration
|
503
503
|
td = np.ceil(self.u2.v/t).astype(int)
|