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.
Files changed (175) hide show
  1. {ltbams-0.9.6 → ltbams-0.9.7}/LICENSE +2 -2
  2. {ltbams-0.9.6/ltbams.egg-info → ltbams-0.9.7}/PKG-INFO +5 -5
  3. {ltbams-0.9.6 → ltbams-0.9.7}/README.md +3 -3
  4. {ltbams-0.9.6 → ltbams-0.9.7}/ams/__init__.py +2 -1
  5. {ltbams-0.9.6 → ltbams-0.9.7}/ams/_version.py +3 -3
  6. ltbams-0.9.7/ams/cases/5bus/pjm5bus_uced_ev.xlsx +0 -0
  7. {ltbams-0.9.6 → ltbams-0.9.7}/ams/core/matprocessor.py +69 -48
  8. {ltbams-0.9.6 → ltbams-0.9.7}/ams/core/model.py +1 -1
  9. {ltbams-0.9.6 → ltbams-0.9.7}/ams/core/service.py +1 -1
  10. ltbams-0.9.7/ams/extension/__init__.py +5 -0
  11. ltbams-0.9.7/ams/extension/eva.py +401 -0
  12. {ltbams-0.9.6 → ltbams-0.9.7}/ams/interop/andes.py +1 -1
  13. {ltbams-0.9.6 → ltbams-0.9.7}/ams/io/matpower.py +31 -23
  14. {ltbams-0.9.6 → ltbams-0.9.7}/ams/models/__init__.py +2 -2
  15. {ltbams-0.9.6 → ltbams-0.9.7}/ams/models/bus.py +7 -0
  16. {ltbams-0.9.6 → ltbams-0.9.7}/ams/models/distributed/__init__.py +1 -0
  17. {ltbams-0.9.6 → ltbams-0.9.7}/ams/models/distributed/esd1.py +1 -1
  18. ltbams-0.9.7/ams/models/distributed/ev.py +60 -0
  19. {ltbams-0.9.6 → ltbams-0.9.7}/ams/models/distributed/pvd1.py +1 -1
  20. {ltbams-0.9.6 → ltbams-0.9.7}/ams/models/group.py +1 -1
  21. {ltbams-0.9.6 → ltbams-0.9.7}/ams/models/renewable/regc.py +4 -4
  22. {ltbams-0.9.6 → ltbams-0.9.7}/ams/models/static/gen.py +1 -1
  23. {ltbams-0.9.6 → ltbams-0.9.7}/ams/models/timeslot.py +1 -1
  24. {ltbams-0.9.6 → ltbams-0.9.7}/ams/pypower/routines/pflow.py +3 -5
  25. {ltbams-0.9.6 → ltbams-0.9.7}/ams/routines/__init__.py +1 -1
  26. {ltbams-0.9.6 → ltbams-0.9.7}/ams/routines/acopf.py +1 -2
  27. {ltbams-0.9.6 → ltbams-0.9.7}/ams/routines/dcpf.py +10 -6
  28. {ltbams-0.9.6 → ltbams-0.9.7}/ams/routines/ed.py +7 -7
  29. {ltbams-0.9.6 → ltbams-0.9.7}/ams/routines/pflow.py +2 -2
  30. {ltbams-0.9.6 → ltbams-0.9.7}/ams/routines/routine.py +1 -1
  31. {ltbams-0.9.6 → ltbams-0.9.7}/ams/routines/rted.py +1 -1
  32. {ltbams-0.9.6 → ltbams-0.9.7}/ams/routines/uc.py +2 -2
  33. {ltbams-0.9.6 → ltbams-0.9.7}/ams/system.py +8 -1
  34. {ltbams-0.9.6 → ltbams-0.9.7}/docs/source/conf.py +1 -1
  35. {ltbams-0.9.6 → ltbams-0.9.7}/docs/source/getting_started/formats/pypower.rst +1 -1
  36. {ltbams-0.9.6 → ltbams-0.9.7}/docs/source/getting_started/index.rst +1 -1
  37. {ltbams-0.9.6 → ltbams-0.9.7}/docs/source/getting_started/overview.rst +1 -1
  38. {ltbams-0.9.6 → ltbams-0.9.7}/docs/source/index.rst +4 -4
  39. {ltbams-0.9.6 → ltbams-0.9.7}/docs/source/modeling/example.rst +1 -1
  40. {ltbams-0.9.6 → ltbams-0.9.7}/docs/source/modeling/routine.rst +5 -5
  41. {ltbams-0.9.6 → ltbams-0.9.7}/docs/source/release-notes.rst +59 -2
  42. {ltbams-0.9.6 → ltbams-0.9.7/ltbams.egg-info}/PKG-INFO +5 -5
  43. {ltbams-0.9.6 → ltbams-0.9.7}/ltbams.egg-info/SOURCES.txt +4 -0
  44. {ltbams-0.9.6 → ltbams-0.9.7}/ltbams.egg-info/requires.txt +1 -1
  45. {ltbams-0.9.6 → ltbams-0.9.7}/requirements.txt +1 -1
  46. {ltbams-0.9.6 → ltbams-0.9.7}/setup.py +1 -1
  47. {ltbams-0.9.6 → ltbams-0.9.7}/tests/test_mats.py +54 -57
  48. {ltbams-0.9.6 → ltbams-0.9.7}/tests/test_routine.py +5 -0
  49. {ltbams-0.9.6 → ltbams-0.9.7}/CONTRIBUTING.rst +0 -0
  50. {ltbams-0.9.6 → ltbams-0.9.7}/MANIFEST.in +0 -0
  51. {ltbams-0.9.6 → ltbams-0.9.7}/ams/__main__.py +0 -0
  52. {ltbams-0.9.6 → ltbams-0.9.7}/ams/cases/5bus/pjm5bus_demo.xlsx +0 -0
  53. {ltbams-0.9.6 → ltbams-0.9.7}/ams/cases/5bus/pjm5bus_uced.json +0 -0
  54. {ltbams-0.9.6 → ltbams-0.9.7}/ams/cases/5bus/pjm5bus_uced.xlsx +0 -0
  55. {ltbams-0.9.6 → ltbams-0.9.7}/ams/cases/5bus/pjm5bus_uced_esd1.xlsx +0 -0
  56. {ltbams-0.9.6 → ltbams-0.9.7}/ams/cases/ieee123/ieee123.xlsx +0 -0
  57. {ltbams-0.9.6 → ltbams-0.9.7}/ams/cases/ieee123/ieee123_regcv1.xlsx +0 -0
  58. {ltbams-0.9.6 → ltbams-0.9.7}/ams/cases/ieee14/ieee14.json +0 -0
  59. {ltbams-0.9.6 → ltbams-0.9.7}/ams/cases/ieee14/ieee14.raw +0 -0
  60. {ltbams-0.9.6 → ltbams-0.9.7}/ams/cases/ieee14/ieee14_uced.xlsx +0 -0
  61. {ltbams-0.9.6 → ltbams-0.9.7}/ams/cases/ieee39/ieee39.xlsx +0 -0
  62. {ltbams-0.9.6 → ltbams-0.9.7}/ams/cases/ieee39/ieee39_uced.xlsx +0 -0
  63. {ltbams-0.9.6 → ltbams-0.9.7}/ams/cases/ieee39/ieee39_uced_esd1.xlsx +0 -0
  64. {ltbams-0.9.6 → ltbams-0.9.7}/ams/cases/ieee39/ieee39_uced_pvd1.xlsx +0 -0
  65. {ltbams-0.9.6 → ltbams-0.9.7}/ams/cases/ieee39/ieee39_uced_vis.xlsx +0 -0
  66. {ltbams-0.9.6 → ltbams-0.9.7}/ams/cases/matpower/case118.m +0 -0
  67. {ltbams-0.9.6 → ltbams-0.9.7}/ams/cases/matpower/case14.m +0 -0
  68. {ltbams-0.9.6 → ltbams-0.9.7}/ams/cases/matpower/case300.m +0 -0
  69. {ltbams-0.9.6 → ltbams-0.9.7}/ams/cases/matpower/case39.m +0 -0
  70. {ltbams-0.9.6 → ltbams-0.9.7}/ams/cases/matpower/case5.m +0 -0
  71. {ltbams-0.9.6 → ltbams-0.9.7}/ams/cases/matpower/case_ACTIVSg2000.m +0 -0
  72. {ltbams-0.9.6 → ltbams-0.9.7}/ams/cases/npcc/npcc.m +0 -0
  73. {ltbams-0.9.6 → ltbams-0.9.7}/ams/cases/npcc/npcc_uced.xlsx +0 -0
  74. {ltbams-0.9.6 → ltbams-0.9.7}/ams/cases/pglib/pglib_opf_case39_epri__api.m +0 -0
  75. {ltbams-0.9.6 → ltbams-0.9.7}/ams/cases/wecc/wecc.m +0 -0
  76. {ltbams-0.9.6 → ltbams-0.9.7}/ams/cases/wecc/wecc_uced.xlsx +0 -0
  77. {ltbams-0.9.6 → ltbams-0.9.7}/ams/cli.py +0 -0
  78. {ltbams-0.9.6 → ltbams-0.9.7}/ams/core/__init__.py +0 -0
  79. {ltbams-0.9.6 → ltbams-0.9.7}/ams/core/documenter.py +0 -0
  80. {ltbams-0.9.6 → ltbams-0.9.7}/ams/core/param.py +0 -0
  81. {ltbams-0.9.6 → ltbams-0.9.7}/ams/core/symprocessor.py +0 -0
  82. {ltbams-0.9.6 → ltbams-0.9.7}/ams/core/var.py +0 -0
  83. {ltbams-0.9.6 → ltbams-0.9.7}/ams/interop/__init__.py +0 -0
  84. {ltbams-0.9.6 → ltbams-0.9.7}/ams/io/__init__.py +0 -0
  85. {ltbams-0.9.6 → ltbams-0.9.7}/ams/io/json.py +0 -0
  86. {ltbams-0.9.6 → ltbams-0.9.7}/ams/io/psse.py +0 -0
  87. {ltbams-0.9.6 → ltbams-0.9.7}/ams/io/pypower.py +0 -0
  88. {ltbams-0.9.6 → ltbams-0.9.7}/ams/io/xlsx.py +0 -0
  89. {ltbams-0.9.6 → ltbams-0.9.7}/ams/main.py +0 -0
  90. {ltbams-0.9.6 → ltbams-0.9.7}/ams/models/area.py +0 -0
  91. {ltbams-0.9.6 → ltbams-0.9.7}/ams/models/cost.py +0 -0
  92. {ltbams-0.9.6 → ltbams-0.9.7}/ams/models/info.py +0 -0
  93. {ltbams-0.9.6 → ltbams-0.9.7}/ams/models/line.py +0 -0
  94. {ltbams-0.9.6 → ltbams-0.9.7}/ams/models/region.py +0 -0
  95. {ltbams-0.9.6 → ltbams-0.9.7}/ams/models/renewable/__init__.py +0 -0
  96. {ltbams-0.9.6 → ltbams-0.9.7}/ams/models/reserve.py +0 -0
  97. {ltbams-0.9.6 → ltbams-0.9.7}/ams/models/shunt.py +0 -0
  98. {ltbams-0.9.6 → ltbams-0.9.7}/ams/models/static/__init__.py +0 -0
  99. {ltbams-0.9.6 → ltbams-0.9.7}/ams/models/static/pq.py +0 -0
  100. {ltbams-0.9.6 → ltbams-0.9.7}/ams/opt/__init__.py +0 -0
  101. {ltbams-0.9.6 → ltbams-0.9.7}/ams/opt/omodel.py +0 -0
  102. {ltbams-0.9.6 → ltbams-0.9.7}/ams/pypower/__init__.py +0 -0
  103. {ltbams-0.9.6 → ltbams-0.9.7}/ams/pypower/_compat.py +0 -0
  104. {ltbams-0.9.6 → ltbams-0.9.7}/ams/pypower/core/__init__.py +0 -0
  105. {ltbams-0.9.6 → ltbams-0.9.7}/ams/pypower/core/pips.py +0 -0
  106. {ltbams-0.9.6 → ltbams-0.9.7}/ams/pypower/core/ppoption.py +0 -0
  107. {ltbams-0.9.6 → ltbams-0.9.7}/ams/pypower/core/ppver.py +0 -0
  108. {ltbams-0.9.6 → ltbams-0.9.7}/ams/pypower/core/solver.py +0 -0
  109. {ltbams-0.9.6 → ltbams-0.9.7}/ams/pypower/eps.py +0 -0
  110. {ltbams-0.9.6 → ltbams-0.9.7}/ams/pypower/idx.py +0 -0
  111. {ltbams-0.9.6 → ltbams-0.9.7}/ams/pypower/io.py +0 -0
  112. {ltbams-0.9.6 → ltbams-0.9.7}/ams/pypower/make/__init__.py +0 -0
  113. {ltbams-0.9.6 → ltbams-0.9.7}/ams/pypower/make/matrices.py +0 -0
  114. {ltbams-0.9.6 → ltbams-0.9.7}/ams/pypower/make/pdv.py +0 -0
  115. {ltbams-0.9.6 → ltbams-0.9.7}/ams/pypower/routines/__init__.py +0 -0
  116. {ltbams-0.9.6 → ltbams-0.9.7}/ams/pypower/routines/cpf.py +0 -0
  117. {ltbams-0.9.6 → ltbams-0.9.7}/ams/pypower/routines/cpf_callbacks.py +0 -0
  118. {ltbams-0.9.6 → ltbams-0.9.7}/ams/pypower/routines/opf.py +0 -0
  119. {ltbams-0.9.6 → ltbams-0.9.7}/ams/pypower/routines/opffcns.py +0 -0
  120. {ltbams-0.9.6 → ltbams-0.9.7}/ams/pypower/toggle.py +0 -0
  121. {ltbams-0.9.6 → ltbams-0.9.7}/ams/pypower/utils.py +0 -0
  122. {ltbams-0.9.6 → ltbams-0.9.7}/ams/report.py +0 -0
  123. {ltbams-0.9.6 → ltbams-0.9.7}/ams/routines/cpf.py +0 -0
  124. {ltbams-0.9.6 → ltbams-0.9.7}/ams/routines/dcopf.py +0 -0
  125. {ltbams-0.9.6 → ltbams-0.9.7}/ams/routines/dopf.py +0 -0
  126. {ltbams-0.9.6 → ltbams-0.9.7}/ams/routines/type.py +0 -0
  127. {ltbams-0.9.6 → ltbams-0.9.7}/ams/shared.py +0 -0
  128. {ltbams-0.9.6 → ltbams-0.9.7}/ams/utils/__init__.py +0 -0
  129. {ltbams-0.9.6 → ltbams-0.9.7}/ams/utils/paths.py +0 -0
  130. {ltbams-0.9.6 → ltbams-0.9.7}/docs/Makefile +0 -0
  131. {ltbams-0.9.6 → ltbams-0.9.7}/docs/make.bat +0 -0
  132. {ltbams-0.9.6 → ltbams-0.9.7}/docs/source/_templates/autosummary/base.rst +0 -0
  133. {ltbams-0.9.6 → ltbams-0.9.7}/docs/source/_templates/autosummary/class.rst +0 -0
  134. {ltbams-0.9.6 → ltbams-0.9.7}/docs/source/_templates/autosummary/module.rst +0 -0
  135. {ltbams-0.9.6 → ltbams-0.9.7}/docs/source/_templates/autosummary/module_toctree.rst +0 -0
  136. {ltbams-0.9.6 → ltbams-0.9.7}/docs/source/api.rst +0 -0
  137. {ltbams-0.9.6 → ltbams-0.9.7}/docs/source/examples/index.rst +0 -0
  138. {ltbams-0.9.6 → ltbams-0.9.7}/docs/source/getting_started/copyright.rst +0 -0
  139. {ltbams-0.9.6 → ltbams-0.9.7}/docs/source/getting_started/formats/index.rst +0 -0
  140. {ltbams-0.9.6 → ltbams-0.9.7}/docs/source/getting_started/formats/matpower.rst +0 -0
  141. {ltbams-0.9.6 → ltbams-0.9.7}/docs/source/getting_started/formats/psse.rst +0 -0
  142. {ltbams-0.9.6 → ltbams-0.9.7}/docs/source/getting_started/formats/xlsx.png +0 -0
  143. {ltbams-0.9.6 → ltbams-0.9.7}/docs/source/getting_started/formats/xlsx.rst +0 -0
  144. {ltbams-0.9.6 → ltbams-0.9.7}/docs/source/getting_started/install.rst +0 -0
  145. {ltbams-0.9.6 → ltbams-0.9.7}/docs/source/getting_started/testcase.rst +0 -0
  146. {ltbams-0.9.6 → ltbams-0.9.7}/docs/source/getting_started/verification.rst +0 -0
  147. {ltbams-0.9.6 → ltbams-0.9.7}/docs/source/images/dcopf_time.png +0 -0
  148. {ltbams-0.9.6 → ltbams-0.9.7}/docs/source/images/sponsors/CURENT_Logo_NameOnTrans.png +0 -0
  149. {ltbams-0.9.6 → ltbams-0.9.7}/docs/source/images/sponsors/CURENT_Logo_Transparent.png +0 -0
  150. {ltbams-0.9.6 → ltbams-0.9.7}/docs/source/images/sponsors/CURENT_Logo_Transparent_Name.png +0 -0
  151. {ltbams-0.9.6 → ltbams-0.9.7}/docs/source/images/sponsors/doe.png +0 -0
  152. {ltbams-0.9.6 → ltbams-0.9.7}/docs/source/modeling/index.rst +0 -0
  153. {ltbams-0.9.6 → ltbams-0.9.7}/docs/source/modeling/model.rst +0 -0
  154. {ltbams-0.9.6 → ltbams-0.9.7}/docs/source/modeling/system.rst +0 -0
  155. {ltbams-0.9.6 → ltbams-0.9.7}/ltbams.egg-info/dependency_links.txt +0 -0
  156. {ltbams-0.9.6 → ltbams-0.9.7}/ltbams.egg-info/entry_points.txt +0 -0
  157. {ltbams-0.9.6 → ltbams-0.9.7}/ltbams.egg-info/top_level.txt +0 -0
  158. {ltbams-0.9.6 → ltbams-0.9.7}/requirements-extra.txt +0 -0
  159. {ltbams-0.9.6 → ltbams-0.9.7}/setup.cfg +0 -0
  160. {ltbams-0.9.6 → ltbams-0.9.7}/tests/__init__.py +0 -0
  161. {ltbams-0.9.6 → ltbams-0.9.7}/tests/test_1st_system.py +0 -0
  162. {ltbams-0.9.6 → ltbams-0.9.7}/tests/test_addressing.py +0 -0
  163. {ltbams-0.9.6 → ltbams-0.9.7}/tests/test_andes.py +0 -0
  164. {ltbams-0.9.6 → ltbams-0.9.7}/tests/test_case.py +0 -0
  165. {ltbams-0.9.6 → ltbams-0.9.7}/tests/test_cli.py +0 -0
  166. {ltbams-0.9.6 → ltbams-0.9.7}/tests/test_dctypes.py +0 -0
  167. {ltbams-0.9.6 → ltbams-0.9.7}/tests/test_export_csv.py +0 -0
  168. {ltbams-0.9.6 → ltbams-0.9.7}/tests/test_group.py +0 -0
  169. {ltbams-0.9.6 → ltbams-0.9.7}/tests/test_known_good.py +0 -0
  170. {ltbams-0.9.6 → ltbams-0.9.7}/tests/test_model.py +0 -0
  171. {ltbams-0.9.6 → ltbams-0.9.7}/tests/test_paths.py +0 -0
  172. {ltbams-0.9.6 → ltbams-0.9.7}/tests/test_report.py +0 -0
  173. {ltbams-0.9.6 → ltbams-0.9.7}/tests/test_repr.py +0 -0
  174. {ltbams-0.9.6 → ltbams-0.9.7}/tests/test_service.py +0 -0
  175. {ltbams-0.9.6 → ltbams-0.9.7}/versioneer.py +0 -0
@@ -1,4 +1,4 @@
1
- AMS: Python Software for Dispatch Modeling and Co-Simulation with Dynanic
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 dispatch modeling and co-simulation with dynanic
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.6
4
- Summary: Python software for dispatch modeling and co-simulation with dynanic.
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 Dispatch Modeling and Co-Simulation with Dynanic, serving as the market simulator for the [CURENT Largescale Testbed][LTB Repository].
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
  [![License: GPL-3.0](https://img.shields.io/badge/License-GPL--3.0-blue.svg)](https://github.com/CURENT/ams/blob/master/LICENSE)
39
39
  ![platforms](https://anaconda.org/conda-forge/ltbams/badges/platforms.svg)
@@ -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 dispatch results and competitive performance.
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 dispatch simulation engine for the CURENT Largescale Testbed (LTB).
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 Dispatch Modeling and Co-Simulation with Dynanic, serving as the market simulator for the [CURENT Largescale Testbed][LTB Repository].
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
  [![License: GPL-3.0](https://img.shields.io/badge/License-GPL--3.0-blue.svg)](https://github.com/CURENT/ams/blob/master/LICENSE)
6
6
  ![platforms](https://anaconda.org/conda-forge/ltbams/badges/platforms.svg)
@@ -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 dispatch results and competitive performance.
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 dispatch simulation engine for the CURENT Largescale Testbed (LTB).
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-04-21T17:14:28-0400",
11
+ "date": "2024-05-24T15:44:01-0400",
12
12
  "dirty": false,
13
13
  "error": null,
14
- "full-revisionid": "fcc7e579c8f7453fae3ddebbd0eedbe4e463c1c9",
15
- "version": "0.9.6"
14
+ "full-revisionid": "bc97bef7420651060bce99b80588ccb4d23a322b",
15
+ "version": "0.9.7"
16
16
  }
17
17
  ''' # END VERSION_JSON
18
18
 
@@ -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, Bf = self.Bbus.v, self.Bf.v
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((nl, nb))
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
- return self.PTDF._v
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
- system = self.system
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 = self.PTDF._v * self.Cft._v
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
- self.LODF._v = LODF
472
- return self.LODF._v
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
- `OTDF_k[m, n]` means the PTDF[m, n] with line `k` outage.
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
- It requires ... ...
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
- Outage line idx to build the OTDF. If not provided, use the
486
- first line `System.Line.idx.v[0]`.
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
- system = self.system
494
-
495
- if line is None:
496
- line = system.Line.idx.v[0]
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
- # common variables
507
- nb = system.Bus.n
508
- nl = system.Line.n
509
-
510
- # initialize OTDF matrix
511
- OTDF = np.zeros((nl, nb))
512
-
513
- line_lodf = self.LODF._v[:, line_uid] # LODF for the outage line
514
- line_ptdf = self.PTDF._v[line_uid, :] # PTDF for the outage line
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
- return OTDF
538
+ otdf = ptdf + lodf[:, luid] @ ptdf[luid, :]
539
+ return otdf.astype(dtype)
@@ -20,7 +20,7 @@ logger = logging.getLogger(__name__)
20
20
 
21
21
  class Model:
22
22
  """
23
- Base class for power system dispatch models.
23
+ Base class for power system scheduling models.
24
24
 
25
25
  This class is revised from ``andes.core.model.Model``.
26
26
  """
@@ -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 # dispatch interval
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)
@@ -0,0 +1,5 @@
1
+ """
2
+ Extension module.
3
+ """
4
+
5
+ from ams.extension import eva # NOQA