ltbams 1.0.5__tar.gz → 1.0.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-1.0.5/ltbams.egg-info → ltbams-1.0.7}/PKG-INFO +1 -1
- {ltbams-1.0.5 → ltbams-1.0.7}/ams/_version.py +3 -3
- ltbams-1.0.7/ams/cases/5bus/pjm5bus_demo.xlsx +0 -0
- ltbams-1.0.7/ams/cases/5bus/pjm5bus_ev.xlsx +0 -0
- ltbams-1.0.7/ams/cases/5bus/pjm5bus_jumper.xlsx +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/ams/cases/ieee14/ieee14_uced.xlsx +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/ams/cases/ieee39/ieee39_uced.xlsx +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/ams/cases/ieee39/ieee39_uced_esd1.xlsx +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/ams/cases/ieee39/ieee39_uced_pvd1.xlsx +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/ams/cases/ieee39/ieee39_uced_vis.xlsx +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/ams/core/matprocessor.py +7 -16
- {ltbams-1.0.5 → ltbams-1.0.7}/ams/core/service.py +4 -3
- {ltbams-1.0.5 → ltbams-1.0.7}/ams/interface.py +17 -4
- {ltbams-1.0.5 → ltbams-1.0.7}/ams/io/matpower.py +7 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/ams/models/__init__.py +1 -1
- {ltbams-1.0.5 → ltbams-1.0.7}/ams/models/cost.py +2 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/ams/models/group.py +2 -2
- {ltbams-1.0.5 → ltbams-1.0.7}/ams/models/line.py +2 -2
- {ltbams-1.0.5 → ltbams-1.0.7}/ams/models/renewable/regc.py +1 -5
- {ltbams-1.0.5 → ltbams-1.0.7}/ams/models/reserve.py +2 -2
- {ltbams-1.0.5 → ltbams-1.0.7}/ams/models/static/gen.py +2 -2
- {ltbams-1.0.5 → ltbams-1.0.7}/ams/models/static/pq.py +2 -2
- {ltbams-1.0.5 → ltbams-1.0.7}/ams/models/timeslot.py +1 -1
- {ltbams-1.0.5 → ltbams-1.0.7}/ams/routines/dcopf.py +6 -6
- {ltbams-1.0.5 → ltbams-1.0.7}/ams/routines/dcopf2.py +2 -2
- {ltbams-1.0.5 → ltbams-1.0.7}/ams/routines/dopf.py +10 -10
- {ltbams-1.0.5 → ltbams-1.0.7}/ams/routines/ed.py +4 -6
- {ltbams-1.0.5 → ltbams-1.0.7}/ams/routines/pflow.py +9 -10
- {ltbams-1.0.5 → ltbams-1.0.7}/ams/routines/rted.py +20 -29
- {ltbams-1.0.5 → ltbams-1.0.7}/ams/routines/uc.py +5 -7
- {ltbams-1.0.5 → ltbams-1.0.7}/ams/shared.py +1 -1
- {ltbams-1.0.5 → ltbams-1.0.7}/ams/system.py +11 -11
- {ltbams-1.0.5 → ltbams-1.0.7}/docs/source/api.rst +2 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/docs/source/conf.py +1 -1
- {ltbams-1.0.5 → ltbams-1.0.7}/docs/source/examples/index.rst +0 -4
- {ltbams-1.0.5 → ltbams-1.0.7}/docs/source/release-notes.rst +18 -0
- {ltbams-1.0.5 → ltbams-1.0.7/ltbams.egg-info}/PKG-INFO +1 -1
- {ltbams-1.0.5 → ltbams-1.0.7}/ltbams.egg-info/SOURCES.txt +1 -4
- {ltbams-1.0.5 → ltbams-1.0.7}/tests/test_1st_system.py +31 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/tests/test_andes_mats.py +1 -1
- {ltbams-1.0.5 → ltbams-1.0.7}/tests/test_case.py +54 -19
- {ltbams-1.0.5 → ltbams-1.0.7}/tests/test_io.py +9 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/tests/test_rtn_ed.py +4 -4
- {ltbams-1.0.5 → ltbams-1.0.7}/tests/test_rtn_rted.py +4 -4
- {ltbams-1.0.5 → ltbams-1.0.7}/tests/test_rtn_uc.py +4 -4
- {ltbams-1.0.5 → ltbams-1.0.7}/tests/test_service.py +2 -2
- ltbams-1.0.5/ams/cases/5bus/pjm5bus_demo.xlsx +0 -0
- ltbams-1.0.5/ams/cases/5bus/pjm5bus_jumper.xlsx +0 -0
- ltbams-1.0.5/ams/cases/5bus/pjm5bus_uced.json +0 -1062
- ltbams-1.0.5/ams/cases/5bus/pjm5bus_uced.xlsx +0 -0
- ltbams-1.0.5/ams/cases/5bus/pjm5bus_uced_esd1.xlsx +0 -0
- ltbams-1.0.5/ams/cases/5bus/pjm5bus_uced_ev.xlsx +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/CONTRIBUTING.rst +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/LICENSE +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/MANIFEST.in +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/README.md +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/ams/__init__.py +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/ams/__main__.py +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/ams/cases/ieee123/ieee123.xlsx +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/ams/cases/ieee123/ieee123_regcv1.xlsx +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/ams/cases/ieee14/ieee14.json +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/ams/cases/ieee14/ieee14.raw +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/ams/cases/ieee14/ieee14_conn.xlsx +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/ams/cases/ieee39/ieee39.xlsx +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/ams/cases/matpower/benchmark.json +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/ams/cases/matpower/case118.m +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/ams/cases/matpower/case14.m +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/ams/cases/matpower/case300.m +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/ams/cases/matpower/case39.m +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/ams/cases/matpower/case5.m +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/ams/cases/matpower/case_ACTIVSg2000.m +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/ams/cases/npcc/npcc.m +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/ams/cases/npcc/npcc_uced.xlsx +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/ams/cases/pglib/pglib_opf_case39_epri__api.m +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/ams/cases/wecc/wecc.m +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/ams/cases/wecc/wecc_uced.xlsx +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/ams/cli.py +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/ams/core/__init__.py +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/ams/core/documenter.py +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/ams/core/model.py +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/ams/core/param.py +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/ams/core/symprocessor.py +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/ams/core/var.py +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/ams/extension/__init__.py +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/ams/extension/eva.py +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/ams/io/__init__.py +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/ams/io/json.py +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/ams/io/psse.py +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/ams/io/pypower.py +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/ams/io/xlsx.py +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/ams/main.py +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/ams/models/area.py +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/ams/models/bus.py +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/ams/models/distributed/__init__.py +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/ams/models/distributed/esd1.py +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/ams/models/distributed/ev.py +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/ams/models/distributed/pvd1.py +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/ams/models/info.py +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/ams/models/renewable/__init__.py +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/ams/models/shunt.py +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/ams/models/static/__init__.py +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/ams/models/zone.py +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/ams/opt/__init__.py +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/ams/opt/constraint.py +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/ams/opt/exprcalc.py +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/ams/opt/expression.py +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/ams/opt/objective.py +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/ams/opt/omodel.py +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/ams/opt/optzbase.py +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/ams/opt/param.py +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/ams/opt/var.py +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/ams/pypower/__init__.py +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/ams/pypower/_compat.py +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/ams/pypower/core/__init__.py +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/ams/pypower/core/pips.py +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/ams/pypower/core/ppoption.py +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/ams/pypower/core/ppver.py +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/ams/pypower/core/solver.py +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/ams/pypower/eps.py +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/ams/pypower/idx.py +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/ams/pypower/io.py +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/ams/pypower/make/__init__.py +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/ams/pypower/make/matrices.py +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/ams/pypower/make/pdv.py +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/ams/pypower/routines/__init__.py +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/ams/pypower/routines/cpf.py +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/ams/pypower/routines/cpf_callbacks.py +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/ams/pypower/routines/opf.py +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/ams/pypower/routines/opffcns.py +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/ams/pypower/routines/pflow.py +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/ams/pypower/toggle.py +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/ams/pypower/utils.py +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/ams/report.py +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/ams/routines/__init__.py +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/ams/routines/acopf.py +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/ams/routines/cpf.py +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/ams/routines/dcpf.py +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/ams/routines/dcpf0.py +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/ams/routines/pflow0.py +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/ams/routines/routine.py +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/ams/routines/type.py +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/ams/utils/__init__.py +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/ams/utils/misc.py +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/ams/utils/paths.py +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/docs/Makefile +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/docs/make.bat +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/docs/source/_templates/autosummary/base.rst +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/docs/source/_templates/autosummary/class.rst +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/docs/source/_templates/autosummary/module.rst +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/docs/source/_templates/autosummary/module_toctree.rst +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/docs/source/genmodelref.py +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/docs/source/genroutineref.py +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/docs/source/getting_started/copyright.rst +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/docs/source/getting_started/formats/index.rst +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/docs/source/getting_started/formats/matpower.rst +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/docs/source/getting_started/formats/psse.rst +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/docs/source/getting_started/formats/pypower.rst +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/docs/source/getting_started/formats/xlsx.png +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/docs/source/getting_started/formats/xlsx.rst +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/docs/source/getting_started/index.rst +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/docs/source/getting_started/install.rst +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/docs/source/getting_started/overview.rst +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/docs/source/getting_started/testcase.rst +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/docs/source/getting_started/verification.rst +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/docs/source/images/curent.ico +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/docs/source/images/dcopf_time.png +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/docs/source/images/sponsors/CURENT_Logo_NameOnTrans.png +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/docs/source/images/sponsors/CURENT_Logo_Transparent.png +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/docs/source/images/sponsors/CURENT_Logo_Transparent_Name.png +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/docs/source/images/sponsors/doe.png +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/docs/source/index.rst +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/docs/source/modeling/example.rst +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/docs/source/modeling/index.rst +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/docs/source/modeling/model.rst +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/docs/source/modeling/routine.rst +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/docs/source/modeling/system.rst +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/ltbams.egg-info/dependency_links.txt +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/ltbams.egg-info/entry_points.txt +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/ltbams.egg-info/requires.txt +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/ltbams.egg-info/top_level.txt +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/pyproject.toml +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/requirements-dev.txt +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/requirements.txt +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/setup.cfg +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/setup.py +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/tests/__init__.py +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/tests/test_addressing.py +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/tests/test_cli.py +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/tests/test_export_csv.py +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/tests/test_group.py +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/tests/test_interface.py +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/tests/test_jumper.py +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/tests/test_known_good.py +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/tests/test_matp.py +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/tests/test_model.py +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/tests/test_omodel.py +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/tests/test_paths.py +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/tests/test_report.py +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/tests/test_repr.py +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/tests/test_routine.py +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/tests/test_rtn_dcopf.py +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/tests/test_rtn_dcopf2.py +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/tests/test_rtn_dcpf.py +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/tests/test_rtn_pflow.py +0 -0
- {ltbams-1.0.5 → ltbams-1.0.7}/versioneer.py +0 -0
@@ -8,11 +8,11 @@ import json
|
|
8
8
|
|
9
9
|
version_json = '''
|
10
10
|
{
|
11
|
-
"date": "2025-04-
|
11
|
+
"date": "2025-04-14T02:15:15-0400",
|
12
12
|
"dirty": false,
|
13
13
|
"error": null,
|
14
|
-
"full-revisionid": "
|
15
|
-
"version": "1.0.
|
14
|
+
"full-revisionid": "ba5d62c3b3d080ab5ffe03e04883a3492dc121eb",
|
15
|
+
"version": "1.0.7"
|
16
16
|
}
|
17
17
|
''' # END VERSION_JSON
|
18
18
|
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -492,11 +492,8 @@ class MatProcessor:
|
|
492
492
|
|
493
493
|
References
|
494
494
|
----------
|
495
|
-
|
496
|
-
|
497
|
-
Available:
|
498
|
-
|
499
|
-
https://www.powerworld.com/WebHelp/Content/MainDocumentation_HTML/Power_Transfer_Distribution_Factors.htm
|
495
|
+
1. PowerWorld Documentation, Power Transfer Distribution Factors,
|
496
|
+
https://www.powerworld.com/WebHelp/Content/MainDocumentation_HTML/Power_Transfer_Distribution_Factors.htm
|
500
497
|
"""
|
501
498
|
system = self.system
|
502
499
|
|
@@ -616,11 +613,8 @@ class MatProcessor:
|
|
616
613
|
|
617
614
|
References
|
618
615
|
----------
|
619
|
-
|
620
|
-
|
621
|
-
Available:
|
622
|
-
|
623
|
-
https://www.powerworld.com/WebHelp/Content/MainDocumentation_HTML/Line_Outage_Distribution_Factors_LODFs.htm
|
616
|
+
1. PowerWorld Documentation, Line Outage Distribution Factors,
|
617
|
+
https://www.powerworld.com/WebHelp/Content/MainDocumentation_HTML/Line_Outage_Distribution_Factors_LODFs.htm
|
624
618
|
"""
|
625
619
|
system = self.system
|
626
620
|
|
@@ -716,7 +710,7 @@ class MatProcessor:
|
|
716
710
|
def build_otdf(self, line=None):
|
717
711
|
"""
|
718
712
|
Build the Outrage Transfer Distribution Factor (OTDF) matrix for line
|
719
|
-
k outage:
|
713
|
+
k outage: $OTDF_k = PTDF + LODF[:, k] @ PTDF[k, ]$.
|
720
714
|
|
721
715
|
OTDF_k[m, n] means the increased line flow on line `m` when there is
|
722
716
|
1 p.u. power injection at bus `n` when line `k` is outage.
|
@@ -737,11 +731,8 @@ class MatProcessor:
|
|
737
731
|
|
738
732
|
References
|
739
733
|
----------
|
740
|
-
|
741
|
-
|
742
|
-
Available:
|
743
|
-
|
744
|
-
https://www.powerworld.com/WebHelp/Content/MainDocumentation_HTML/Line_Outage_Distribution_Factors_LODFs.htm
|
734
|
+
1. PowerWorld Documentation, Line Outage Distribution Factors,
|
735
|
+
https://www.powerworld.com/WebHelp/Content/MainDocumentation_HTML/Line_Outage_Distribution_Factors_LODFs.htm
|
745
736
|
"""
|
746
737
|
if (self.PTDF._v is None) or (self.LODF._v is None):
|
747
738
|
raise ValueError("Internal PTDF and LODF are not available. Please build them first.")
|
@@ -176,7 +176,8 @@ class ROperationService(RBaseService):
|
|
176
176
|
|
177
177
|
class LoadScale(ROperationService):
|
178
178
|
"""
|
179
|
-
|
179
|
+
Retrieve zonal load by scaling nodal load using the specified load scale factor.
|
180
|
+
The load scale factor is defined for each "Area".
|
180
181
|
|
181
182
|
Parameters
|
182
183
|
----------
|
@@ -220,8 +221,8 @@ class LoadScale(ROperationService):
|
|
220
221
|
u_idx = self.u.get_all_idxes()
|
221
222
|
ue = self.u.owner.get(src='u', attr='v', idx=u_idx)
|
222
223
|
u_bus = self.u.owner.get(src='bus', attr='v', idx=u_idx)
|
223
|
-
|
224
|
-
u_yloc = np.array(sys.
|
224
|
+
u_area = sys.Bus.get(src='area', attr='v', idx=u_bus)
|
225
|
+
u_yloc = np.array(sys.Area.idx2uid(u_area))
|
225
226
|
p0s = np.multiply(self.sd.v[:, u_yloc].transpose(),
|
226
227
|
(ue * self.u.v)[:, np.newaxis])
|
227
228
|
if self.sparse:
|
@@ -56,6 +56,8 @@ def sync_adsys(amsys, adsys):
|
|
56
56
|
"""
|
57
57
|
Sync parameters value of PFlow models between AMS and ANDES systems.
|
58
58
|
|
59
|
+
This function should be used carefully when per unit conversion is involved.
|
60
|
+
|
59
61
|
Parameters
|
60
62
|
----------
|
61
63
|
amsys : AMS.system.System
|
@@ -84,10 +86,23 @@ def sync_adsys(amsys, adsys):
|
|
84
86
|
return True
|
85
87
|
|
86
88
|
|
87
|
-
def
|
89
|
+
def to_andes_pflow(system, no_output=False, default_config=True, **kwargs):
|
88
90
|
"""
|
89
91
|
Helper function to convert the AMS system to an ANDES system with only
|
90
92
|
power flow models.
|
93
|
+
|
94
|
+
The returned ANDES system is ***not*** setup.
|
95
|
+
|
96
|
+
Parameters
|
97
|
+
----------
|
98
|
+
system: System
|
99
|
+
The AMS system to be converted to ANDES format.
|
100
|
+
no_output: bool, optional
|
101
|
+
To ANDES system.
|
102
|
+
default_config: bool, optional
|
103
|
+
To ANDES system.
|
104
|
+
kwargs:
|
105
|
+
Additional arguments to be passed to ``andes.system.System()``.
|
91
106
|
"""
|
92
107
|
|
93
108
|
adsys = andes_System(no_outpu=no_output, default_config=default_config, **kwargs)
|
@@ -101,8 +116,6 @@ def _to_andes_pflow(system, no_output=False, default_config=True, **kwargs):
|
|
101
116
|
for row in mdl.cache.df_in[mdl_cols].to_dict(orient='records'):
|
102
117
|
adsys.add(mdl_name, row)
|
103
118
|
|
104
|
-
sync_adsys(amsys=system, adsys=adsys)
|
105
|
-
|
106
119
|
return adsys
|
107
120
|
|
108
121
|
|
@@ -169,7 +182,7 @@ def to_andes(system, addfile=None,
|
|
169
182
|
t0, _ = elapsed()
|
170
183
|
|
171
184
|
# --- convert power flow models ---
|
172
|
-
adsys =
|
185
|
+
adsys = to_andes_pflow(system, no_output=no_output, default_config=default_config, **kwargs)
|
173
186
|
|
174
187
|
_, s = elapsed(t0)
|
175
188
|
|
@@ -203,6 +203,13 @@ def mpc2system(mpc: dict, system) -> bool:
|
|
203
203
|
gcost_idx = 0
|
204
204
|
gen_idx = np.arange(mpc['gen'].shape[0]) + 1
|
205
205
|
mpc_cost = mpc['gencost']
|
206
|
+
if mpc_cost[0, 0] == 1:
|
207
|
+
logger.warning("Type 1 gencost detected. "
|
208
|
+
"This is not supported in AMS. "
|
209
|
+
"Default type 2 cost parameters will be used as a fallback."
|
210
|
+
"It is recommended to manually convert the gencost data to type 2.")
|
211
|
+
mpc_cost = np.repeat(np.array([[2, 0, 0, 3, 0, 0, 0]]),
|
212
|
+
mpc_cost.shape[0], axis=0)
|
206
213
|
for data, gen in zip(mpc_cost, gen_idx):
|
207
214
|
# NOTE: only type 2 costs are supported for now
|
208
215
|
# type startup shutdown n c2 c1 c0
|
@@ -18,7 +18,7 @@ ams_file_classes = list([
|
|
18
18
|
('reserve', ['SFR', 'SR', 'NSR', 'VSGR']),
|
19
19
|
('cost', ['GCost', 'SFRCost', 'SRCost', 'NSRCost', 'VSGCost']),
|
20
20
|
('cost', ['DCost']),
|
21
|
-
('timeslot', ['
|
21
|
+
('timeslot', ['EDTSlot', 'UCTSlot']),
|
22
22
|
])
|
23
23
|
|
24
24
|
file_classes = ams_file_classes
|
@@ -100,6 +100,7 @@ class SRCost(ModelData, Model):
|
|
100
100
|
def __init__(self, system, config):
|
101
101
|
ModelData.__init__(self)
|
102
102
|
Model.__init__(self, system, config)
|
103
|
+
self.group = 'Cost'
|
103
104
|
self.gen = IdxParam(info="static generator index",
|
104
105
|
model='StaticGen',
|
105
106
|
mandatory=True,)
|
@@ -116,6 +117,7 @@ class NSRCost(ModelData, Model):
|
|
116
117
|
def __init__(self, system, config):
|
117
118
|
ModelData.__init__(self)
|
118
119
|
Model.__init__(self, system, config)
|
120
|
+
self.group = 'Cost'
|
119
121
|
self.gen = IdxParam(info="static generator index",
|
120
122
|
model='StaticGen',
|
121
123
|
mandatory=True,)
|
@@ -188,7 +188,7 @@ class StaticGen(GroupBase):
|
|
188
188
|
super().__init__()
|
189
189
|
self.common_params.extend(('bus', 'Sn', 'Vn', 'p0', 'q0', 'ra', 'xs', 'subidx',
|
190
190
|
'pmax', 'pmin', 'pg0', 'ctrl', 'R10', 'td1', 'td2',
|
191
|
-
'zone'))
|
191
|
+
'area', 'zone'))
|
192
192
|
self.common_vars.extend(('p', 'q'))
|
193
193
|
|
194
194
|
|
@@ -211,7 +211,7 @@ class StaticLoad(GroupBase):
|
|
211
211
|
|
212
212
|
def __init__(self):
|
213
213
|
super().__init__()
|
214
|
-
self.common_params.extend(('bus', 'p0', 'q0', 'ctrl', 'zone'))
|
214
|
+
self.common_params.extend(('bus', 'p0', 'q0', 'ctrl', 'area', 'zone'))
|
215
215
|
|
216
216
|
|
217
217
|
class StaticShunt(GroupBase):
|
@@ -18,8 +18,8 @@ class Line(LineData, Model):
|
|
18
18
|
|
19
19
|
Notes
|
20
20
|
-----
|
21
|
-
|
22
|
-
|
21
|
+
1. Adding Algeb ``ud`` causes Line.algebs to encounter an AttributeError: 'NoneType'
|
22
|
+
object has no attribute 'n'. The root cause is still under investigation.
|
23
23
|
"""
|
24
24
|
|
25
25
|
def __init__(self, system=None, config=None) -> None:
|
@@ -2,7 +2,7 @@
|
|
2
2
|
RenGen scheduling model.
|
3
3
|
"""
|
4
4
|
|
5
|
-
from andes.core.param import NumParam, IdxParam
|
5
|
+
from andes.core.param import NumParam, IdxParam
|
6
6
|
from andes.core.model import ModelData
|
7
7
|
from ams.core.model import Model
|
8
8
|
|
@@ -80,10 +80,6 @@ class REGCV1(REGCData, Model):
|
|
80
80
|
REGCData.__init__(self)
|
81
81
|
Model.__init__(self, system, config)
|
82
82
|
self.group = 'VSG'
|
83
|
-
self.zone = ExtParam(model='Bus', src='zone',
|
84
|
-
indexer=self.bus, export=False,
|
85
|
-
info='Retrieved zone idx',
|
86
|
-
vtype=str, default=None)
|
87
83
|
self.M = NumParam(default=10, tex_name='M',
|
88
84
|
info='Inertia emulation',
|
89
85
|
unit='s',
|
@@ -10,8 +10,8 @@ from ams.core.model import Model
|
|
10
10
|
class ReserveData(ModelData):
|
11
11
|
def __init__(self):
|
12
12
|
super().__init__()
|
13
|
-
self.
|
14
|
-
default=None, info="
|
13
|
+
self.area = IdxParam(model='Area',
|
14
|
+
default=None, info="Area idx",)
|
15
15
|
|
16
16
|
|
17
17
|
class SFR(ReserveData, Model):
|
@@ -120,8 +120,8 @@ class PVModel(Model):
|
|
120
120
|
err_tol=r"\epsilon_{tol}"
|
121
121
|
)
|
122
122
|
|
123
|
-
self.
|
124
|
-
info='Retrieved
|
123
|
+
self.area = ExtParam(model='Bus', src='area', indexer=self.bus, export=False,
|
124
|
+
info='Retrieved area idx', vtype=str, default=None,
|
125
125
|
)
|
126
126
|
|
127
127
|
self.ud = Algeb(info='commitment decision',
|
@@ -53,8 +53,8 @@ class PQ(PQData, Model):
|
|
53
53
|
q2z=r"\gamma_{q2z}",
|
54
54
|
)
|
55
55
|
|
56
|
-
self.
|
57
|
-
info='Retrieved
|
56
|
+
self.area = ExtParam(model='Bus', src='area', indexer=self.bus, export=False,
|
57
|
+
info='Retrieved area idx', vtype=str, default=None,
|
58
58
|
)
|
59
59
|
self.ctrl = NumParam(default=1,
|
60
60
|
info="load controllability",
|
@@ -22,14 +22,14 @@ class DCOPF(DCPFBase):
|
|
22
22
|
Notes
|
23
23
|
-----
|
24
24
|
1. The nodal price is calculated as ``pi`` in ``pic``.
|
25
|
-
|
26
|
-
|
25
|
+
2. Devices online status of ``StaticGen``, ``StaticLoad``, and ``Shunt`` are considered in the connectivity
|
26
|
+
matrices ``Cft``, ``Cg``, ``Cl``, and ``Csh``.
|
27
27
|
|
28
28
|
References
|
29
29
|
----------
|
30
|
-
1. R. D. Zimmerman, C. E. Murillo-Sanchez, and R. J. Thomas, “MATPOWER: Steady-State
|
31
|
-
|
32
|
-
|
30
|
+
1. R. D. Zimmerman, C. E. Murillo-Sanchez, and R. J. Thomas, “MATPOWER: Steady-State
|
31
|
+
Operations, Planning, and Analysis Tools for Power Systems Research and Education,” IEEE
|
32
|
+
Trans. Power Syst., vol. 26, no. 1, pp. 12-19, Feb. 2011
|
33
33
|
"""
|
34
34
|
|
35
35
|
def __init__(self, system, config):
|
@@ -152,7 +152,7 @@ class DCOPF(DCPFBase):
|
|
152
152
|
|
153
153
|
def dc2ac(self, kloss=1.0, **kwargs):
|
154
154
|
"""
|
155
|
-
Convert the
|
155
|
+
Convert the results using ACOPF.
|
156
156
|
|
157
157
|
Parameters
|
158
158
|
----------
|
@@ -25,8 +25,8 @@ class DCOPF2(DCOPF):
|
|
25
25
|
Notes
|
26
26
|
-----
|
27
27
|
1. This routine requires PTDF matrix.
|
28
|
-
|
29
|
-
|
28
|
+
2. Nodal price ``pi`` is calculated with three parts.
|
29
|
+
3. Bus angle ``aBus`` is calculated after solving the problem.
|
30
30
|
"""
|
31
31
|
|
32
32
|
def __init__(self, system, config):
|
@@ -16,11 +16,11 @@ class DOPF(DCOPF):
|
|
16
16
|
|
17
17
|
UNDER DEVELOPMENT!
|
18
18
|
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
19
|
+
References
|
20
|
+
-----------------
|
21
|
+
1. L. Bai, J. Wang, C. Wang, C. Chen, and F. Li, “Distribution Locational Marginal Pricing (DLMP)
|
22
|
+
for Congestion Management and Voltage Support,” IEEE Trans. Power Syst., vol. 33, no. 4,
|
23
|
+
pp. 4061-4073, Jul. 2018, doi: 10.1109/TPWRS.2017.2767632.
|
24
24
|
"""
|
25
25
|
|
26
26
|
def __init__(self, system, config):
|
@@ -115,11 +115,11 @@ class DOPFVIS(DOPF):
|
|
115
115
|
|
116
116
|
UNDER DEVELOPMENT!
|
117
117
|
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
118
|
+
References
|
119
|
+
-----------------
|
120
|
+
1. L. Bai, J. Wang, C. Wang, C. Chen, and F. Li, “Distribution Locational Marginal Pricing (DLMP)
|
121
|
+
for Congestion Management and Voltage Support,” IEEE Trans. Power Syst., vol. 33, no. 4,
|
122
|
+
pp. 4061-4073, Jul. 2018, doi: 10.1109/TPWRS.2017.2767632.
|
123
123
|
"""
|
124
124
|
|
125
125
|
def __init__(self, system, config):
|
@@ -109,9 +109,7 @@ class MPBase:
|
|
109
109
|
class ED(RTED, MPBase, SRBase):
|
110
110
|
"""
|
111
111
|
DC-based multi-period economic dispatch (ED).
|
112
|
-
|
113
|
-
1 [Hour] by default.
|
114
|
-
|
112
|
+
Dispatch interval ``config.t`` ($T_{cfg}$) is introduced, 1 [Hour] by default.
|
115
113
|
ED extends DCOPF as follows:
|
116
114
|
|
117
115
|
- Vars ``pg``, ``pru``, ``prd`` are extended to 2D
|
@@ -121,10 +119,10 @@ class ED(RTED, MPBase, SRBase):
|
|
121
119
|
Notes
|
122
120
|
-----
|
123
121
|
1. Formulations has been adjusted with interval ``config.t``
|
124
|
-
|
125
122
|
2. The tie-line flow is not implemented in this model.
|
126
|
-
|
127
|
-
|
123
|
+
3. ``EDTSlot.ug`` is used instead of ``StaticGen.u`` for generator commitment.
|
124
|
+
4. Following reserves are balanced for each "Area": RegUp reserve ``rbu``,
|
125
|
+
RegDn reserve ``rbd``, and Spinning reserve ``rsr``.
|
128
126
|
"""
|
129
127
|
|
130
128
|
def __init__(self, system, config):
|
@@ -12,7 +12,7 @@ from andes.utils.misc import elapsed
|
|
12
12
|
from ams.core.param import RParam
|
13
13
|
from ams.routines.routine import RoutineBase
|
14
14
|
from ams.opt import Var, Expression, Objective
|
15
|
-
from ams.interface import
|
15
|
+
from ams.interface import to_andes_pflow, sync_adsys
|
16
16
|
|
17
17
|
logger = logging.getLogger(__name__)
|
18
18
|
|
@@ -28,10 +28,9 @@ class PFlow(RoutineBase):
|
|
28
28
|
|
29
29
|
References
|
30
30
|
----------
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
https://docs.andes.app/en/latest/_examples/ex1.html
|
31
|
+
1. M. L. Crow, Computational methods for electric power systems. 2015.
|
32
|
+
2. ANDES Documentation - Simulation and Plot.
|
33
|
+
https://docs.andes.app/en/latest/_examples/ex1.html
|
35
34
|
"""
|
36
35
|
|
37
36
|
def __init__(self, system, config):
|
@@ -102,10 +101,10 @@ class PFlow(RoutineBase):
|
|
102
101
|
|
103
102
|
kwargs go to andes.system.System().
|
104
103
|
"""
|
105
|
-
self._adsys =
|
106
|
-
|
107
|
-
|
108
|
-
|
104
|
+
self._adsys = to_andes_pflow(self.system,
|
105
|
+
no_output=self.system.files.no_output,
|
106
|
+
config=self.config.as_dict(),
|
107
|
+
**kwargs)
|
109
108
|
self._adsys.setup()
|
110
109
|
self.om.init()
|
111
110
|
self.initialized = True
|
@@ -132,7 +131,7 @@ class PFlow(RoutineBase):
|
|
132
131
|
self.exec_time = float(s.split(" ")[0])
|
133
132
|
|
134
133
|
self.unpack()
|
135
|
-
return
|
134
|
+
return self.converged
|
136
135
|
|
137
136
|
def _post_solve(self):
|
138
137
|
"""
|
@@ -20,22 +20,22 @@ class RTEDBase:
|
|
20
20
|
"""
|
21
21
|
|
22
22
|
def __init__(self):
|
23
|
-
# ---
|
24
|
-
self.zg = RParam(info='Gen
|
23
|
+
# --- area ---
|
24
|
+
self.zg = RParam(info='Gen area',
|
25
25
|
name='zg', tex_name='z_{one,g}',
|
26
|
-
model='StaticGen', src='
|
26
|
+
model='StaticGen', src='area',
|
27
27
|
no_parse=True)
|
28
|
-
self.zd = RParam(info='Load
|
28
|
+
self.zd = RParam(info='Load area',
|
29
29
|
name='zd', tex_name='z_{one,d}',
|
30
|
-
model='StaticLoad', src='
|
30
|
+
model='StaticLoad', src='area',
|
31
31
|
no_parse=True)
|
32
|
-
self.gs = ZonalSum(u=self.zg, zone='
|
32
|
+
self.gs = ZonalSum(u=self.zg, zone='Area',
|
33
33
|
name='gs', tex_name=r'S_{g}',
|
34
|
-
info='Sum Gen vars vector in shape of
|
34
|
+
info='Sum Gen vars vector in shape of area',
|
35
35
|
no_parse=True, sparse=True)
|
36
|
-
self.ds = ZonalSum(u=self.zd, zone='
|
36
|
+
self.ds = ZonalSum(u=self.zd, zone='Area',
|
37
37
|
name='ds', tex_name=r'S_{d}',
|
38
|
-
info='Sum pd vector in shape of
|
38
|
+
info='Sum pd vector in shape of area',
|
39
39
|
no_parse=True,)
|
40
40
|
self.pdz = NumOpDual(u=self.ds, u2=self.pd,
|
41
41
|
fun=np.multiply,
|
@@ -110,10 +110,9 @@ class SFRBase:
|
|
110
110
|
class RTED(DCOPF, RTEDBase, SFRBase):
|
111
111
|
"""
|
112
112
|
DC-based real-time economic dispatch (RTED).
|
113
|
+
|
113
114
|
RTED extends DCOPF with:
|
114
115
|
|
115
|
-
- Mapping dicts to interface with ANDES
|
116
|
-
- Function ``dc2ac`` to do the AC conversion
|
117
116
|
- Vars for SFR reserve: ``pru`` and ``prd``
|
118
117
|
- Param for linear SFR cost: ``cru`` and ``crd``
|
119
118
|
- Param for SFR requirement: ``du`` and ``dd``
|
@@ -127,8 +126,9 @@ class RTED(DCOPF, RTEDBase, SFRBase):
|
|
127
126
|
Notes
|
128
127
|
-----
|
129
128
|
1. Formulations has been adjusted with interval ``config.t``, 5/60 [Hour] by default.
|
130
|
-
|
131
|
-
|
129
|
+
2. The tie-line flow related constraints are ommited in this formulation.
|
130
|
+
3. The power balance is solved for the entire system.
|
131
|
+
4. The SFR is solved for each area.
|
132
132
|
"""
|
133
133
|
|
134
134
|
def __init__(self, system, config):
|
@@ -176,14 +176,6 @@ class RTED(DCOPF, RTEDBase, SFRBase):
|
|
176
176
|
self.obj.e_str = cost
|
177
177
|
|
178
178
|
def dc2ac(self, kloss=1.0, **kwargs):
|
179
|
-
"""
|
180
|
-
Convert the RTED results with ACOPF.
|
181
|
-
|
182
|
-
Parameters
|
183
|
-
----------
|
184
|
-
kloss : float, optional
|
185
|
-
The loss factor for the conversion. Defaults to 1.2.
|
186
|
-
"""
|
187
179
|
exec_time = self.exec_time
|
188
180
|
if self.exec_time == 0 or self.exit_code != 0:
|
189
181
|
logger.warning(f'{self.class_name} is not executed successfully, quit conversion.')
|
@@ -467,9 +459,9 @@ class VISBase:
|
|
467
459
|
model='VSG', src='D',
|
468
460
|
nonneg=True,)
|
469
461
|
|
470
|
-
self.gvsg = ZonalSum(u=self.zvsg, zone='
|
462
|
+
self.gvsg = ZonalSum(u=self.zvsg, zone='Area',
|
471
463
|
name='gvsg', tex_name=r'S_{g}',
|
472
|
-
info='Sum VSG vars vector in shape of
|
464
|
+
info='Sum VSG vars vector in shape of area',
|
473
465
|
no_parse=True)
|
474
466
|
self.Mub = Constraint(name='Mub', is_eq=False,
|
475
467
|
info='M upper bound',
|
@@ -494,12 +486,11 @@ class RTEDVIS(RTED, VISBase):
|
|
494
486
|
This class implements real-time economic dispatch with virtual inertia scheduling.
|
495
487
|
Please ensure that the parameters `dvm` and `dvd` are set according to the system base.
|
496
488
|
|
497
|
-
|
498
|
-
|
499
|
-
|
500
|
-
|
501
|
-
|
502
|
-
Sustainable Energy, doi: 10.1109/TSTE.2023.3319307.
|
489
|
+
References
|
490
|
+
-----------------
|
491
|
+
1. B. She, F. Li, H. Cui, J. Wang, Q. Zhang and R. Bo, "Virtual Inertia Scheduling (VIS) for
|
492
|
+
Real-Time Economic Dispatch of IBR-Penetrated Power Systems," in IEEE Transactions on
|
493
|
+
Sustainable Energy, vol. 15, no. 2, pp. 938-951, April 2024, doi: 10.1109/TSTE.2023.3319307.
|
503
494
|
"""
|
504
495
|
|
505
496
|
def __init__(self, system, config):
|
@@ -70,17 +70,15 @@ class UC(DCOPF, RTEDBase, MPBase, SRBase, NSRBase):
|
|
70
70
|
Notes
|
71
71
|
-----
|
72
72
|
1. Formulations has been adjusted with interval ``config.t``
|
73
|
-
|
74
|
-
3. The tie-line flow has not been implemented in formulations.
|
73
|
+
2. The tie-line flow has not been implemented in formulations.
|
75
74
|
|
76
75
|
References
|
77
76
|
----------
|
78
77
|
1. Huang, Y., Pardalos, P. M., & Zheng, Q. P. (2017). Electrical power unit commitment: deterministic and
|
79
|
-
|
80
|
-
|
78
|
+
two-stage stochastic programming models and algorithms. Springer.
|
81
79
|
2. D. A. Tejada-Arango, S. Lumbreras, P. Sánchez-Martín and A. Ramos, "Which Unit-Commitment Formulation
|
82
|
-
|
83
|
-
|
80
|
+
is Best? A Comparison Framework," in IEEE Transactions on Power Systems, vol. 35, no. 4, pp. 2926-2936,
|
81
|
+
July 2020, doi: 10.1109/TPWRS.2019.2962024.
|
84
82
|
"""
|
85
83
|
|
86
84
|
def __init__(self, system, config):
|
@@ -290,7 +288,7 @@ class UC(DCOPF, RTEDBase, MPBase, SRBase, NSRBase):
|
|
290
288
|
gen['idx'] = self.system.PV.idx.v
|
291
289
|
gen['pmax'] = self.system.PV.get(src='pmax', attr='v', idx=gen['idx'])
|
292
290
|
gen['bus'] = self.system.PV.get(src='bus', attr='v', idx=gen['idx'])
|
293
|
-
gen['
|
291
|
+
gen['area'] = self.system.PV.get(src='area', attr='v', idx=gen['idx'])
|
294
292
|
gcost_idx = self.system.GCost.find_idx(keys='gen', values=gen['idx'])
|
295
293
|
gen['c2'] = self.system.GCost.get(src='c2', attr='v', idx=gcost_idx)
|
296
294
|
gen['c1'] = self.system.GCost.get(src='c1', attr='v', idx=gcost_idx)
|
@@ -35,7 +35,7 @@ _prefix = r" - --------------> | " # NOQA
|
|
35
35
|
_max_length = 80 # NOQA
|
36
36
|
|
37
37
|
# NOTE: copyright
|
38
|
-
copyright_msg = 'Copyright (C) 2023-
|
38
|
+
copyright_msg = 'Copyright (C) 2023-2025 Jinning Wang'
|
39
39
|
|
40
40
|
# NOTE: copied from CVXPY documentation, last checked on 2024/10/30, v1.5
|
41
41
|
mip_solvers = ['CBC', 'COPT', 'GLPK_MI', 'CPLEX', 'GUROBI',
|
@@ -410,18 +410,18 @@ class System(andes_System):
|
|
410
410
|
|
411
411
|
# --- model parameters range check ---
|
412
412
|
# TODO: there might be other parameters check?
|
413
|
-
|
414
|
-
|
415
|
-
|
416
|
-
|
417
|
-
if np.any(
|
418
|
-
|
419
|
-
|
420
|
-
if
|
421
|
-
|
422
|
-
msg = f"Zero
|
423
|
-
msg += f"adjusted to {default_rate}."
|
413
|
+
adjusted_params = []
|
414
|
+
param_to_check = ['rate_a', 'rate_b', 'rate_c', 'amax', 'amin']
|
415
|
+
for pname in param_to_check:
|
416
|
+
param = self.Line.params[pname]
|
417
|
+
if np.any(param.v == 0):
|
418
|
+
adjusted_params.append(pname)
|
419
|
+
param.v[param.v == 0] = param.default
|
420
|
+
if adjusted_params:
|
421
|
+
adjusted_params_str = ', '.join(adjusted_params)
|
422
|
+
msg = f"Zero Line parameters detected, adjusted to default values: {adjusted_params_str}."
|
424
423
|
logger.info(msg)
|
424
|
+
|
425
425
|
# === no device addition or removal after this point ===
|
426
426
|
self.calc_pu_coeff() # calculate parameters in system per units
|
427
427
|
|