ltbams 0.9.8__tar.gz → 0.9.10__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 (176) hide show
  1. {ltbams-0.9.8/ltbams.egg-info → ltbams-0.9.10}/PKG-INFO +5 -3
  2. {ltbams-0.9.8 → ltbams-0.9.10}/README.md +4 -2
  3. {ltbams-0.9.8 → ltbams-0.9.10}/ams/_version.py +3 -3
  4. {ltbams-0.9.8 → ltbams-0.9.10}/ams/cli.py +1 -1
  5. {ltbams-0.9.8 → ltbams-0.9.10}/ams/core/matprocessor.py +34 -13
  6. {ltbams-0.9.8 → ltbams-0.9.10}/ams/interop/andes.py +10 -9
  7. {ltbams-0.9.8 → ltbams-0.9.10}/ams/io/matpower.py +5 -5
  8. {ltbams-0.9.8 → ltbams-0.9.10}/ams/main.py +4 -4
  9. {ltbams-0.9.8 → ltbams-0.9.10}/ams/opt/omodel.py +11 -7
  10. {ltbams-0.9.8 → ltbams-0.9.10}/ams/pypower/core/pips.py +39 -37
  11. {ltbams-0.9.8 → ltbams-0.9.10}/ams/pypower/core/ppoption.py +3 -1
  12. {ltbams-0.9.8 → ltbams-0.9.10}/ams/pypower/core/solver.py +50 -48
  13. {ltbams-0.9.8 → ltbams-0.9.10}/ams/pypower/make/matrices.py +10 -9
  14. {ltbams-0.9.8 → ltbams-0.9.10}/ams/pypower/make/pdv.py +2 -2
  15. {ltbams-0.9.8 → ltbams-0.9.10}/ams/pypower/routines/cpf.py +18 -16
  16. {ltbams-0.9.8 → ltbams-0.9.10}/ams/pypower/routines/opf.py +8 -6
  17. {ltbams-0.9.8 → ltbams-0.9.10}/ams/pypower/routines/opffcns.py +11 -9
  18. {ltbams-0.9.8 → ltbams-0.9.10}/ams/pypower/routines/pflow.py +27 -25
  19. {ltbams-0.9.8 → ltbams-0.9.10}/ams/pypower/toggle.py +13 -12
  20. {ltbams-0.9.8 → ltbams-0.9.10}/ams/shared.py +6 -0
  21. {ltbams-0.9.8 → ltbams-0.9.10}/docs/source/conf.py +9 -0
  22. {ltbams-0.9.8 → ltbams-0.9.10}/docs/source/release-notes.rst +19 -0
  23. {ltbams-0.9.8 → ltbams-0.9.10/ltbams.egg-info}/PKG-INFO +5 -3
  24. {ltbams-0.9.8 → ltbams-0.9.10}/ltbams.egg-info/requires.txt +1 -1
  25. {ltbams-0.9.8 → ltbams-0.9.10}/requirements.txt +1 -1
  26. {ltbams-0.9.8 → ltbams-0.9.10}/tests/test_known_good.py +8 -7
  27. {ltbams-0.9.8 → ltbams-0.9.10}/tests/test_routine.py +80 -0
  28. {ltbams-0.9.8 → ltbams-0.9.10}/CONTRIBUTING.rst +0 -0
  29. {ltbams-0.9.8 → ltbams-0.9.10}/LICENSE +0 -0
  30. {ltbams-0.9.8 → ltbams-0.9.10}/MANIFEST.in +0 -0
  31. {ltbams-0.9.8 → ltbams-0.9.10}/ams/__init__.py +0 -0
  32. {ltbams-0.9.8 → ltbams-0.9.10}/ams/__main__.py +0 -0
  33. {ltbams-0.9.8 → ltbams-0.9.10}/ams/cases/5bus/pjm5bus_demo.xlsx +0 -0
  34. {ltbams-0.9.8 → ltbams-0.9.10}/ams/cases/5bus/pjm5bus_uced.json +0 -0
  35. {ltbams-0.9.8 → ltbams-0.9.10}/ams/cases/5bus/pjm5bus_uced.xlsx +0 -0
  36. {ltbams-0.9.8 → ltbams-0.9.10}/ams/cases/5bus/pjm5bus_uced_esd1.xlsx +0 -0
  37. {ltbams-0.9.8 → ltbams-0.9.10}/ams/cases/5bus/pjm5bus_uced_ev.xlsx +0 -0
  38. {ltbams-0.9.8 → ltbams-0.9.10}/ams/cases/ieee123/ieee123.xlsx +0 -0
  39. {ltbams-0.9.8 → ltbams-0.9.10}/ams/cases/ieee123/ieee123_regcv1.xlsx +0 -0
  40. {ltbams-0.9.8 → ltbams-0.9.10}/ams/cases/ieee14/ieee14.json +0 -0
  41. {ltbams-0.9.8 → ltbams-0.9.10}/ams/cases/ieee14/ieee14.raw +0 -0
  42. {ltbams-0.9.8 → ltbams-0.9.10}/ams/cases/ieee14/ieee14_uced.xlsx +0 -0
  43. {ltbams-0.9.8 → ltbams-0.9.10}/ams/cases/ieee39/ieee39.xlsx +0 -0
  44. {ltbams-0.9.8 → ltbams-0.9.10}/ams/cases/ieee39/ieee39_uced.xlsx +0 -0
  45. {ltbams-0.9.8 → ltbams-0.9.10}/ams/cases/ieee39/ieee39_uced_esd1.xlsx +0 -0
  46. {ltbams-0.9.8 → ltbams-0.9.10}/ams/cases/ieee39/ieee39_uced_pvd1.xlsx +0 -0
  47. {ltbams-0.9.8 → ltbams-0.9.10}/ams/cases/ieee39/ieee39_uced_vis.xlsx +0 -0
  48. {ltbams-0.9.8 → ltbams-0.9.10}/ams/cases/matpower/benchmark.json +0 -0
  49. {ltbams-0.9.8 → ltbams-0.9.10}/ams/cases/matpower/case118.m +0 -0
  50. {ltbams-0.9.8 → ltbams-0.9.10}/ams/cases/matpower/case14.m +0 -0
  51. {ltbams-0.9.8 → ltbams-0.9.10}/ams/cases/matpower/case300.m +0 -0
  52. {ltbams-0.9.8 → ltbams-0.9.10}/ams/cases/matpower/case39.m +0 -0
  53. {ltbams-0.9.8 → ltbams-0.9.10}/ams/cases/matpower/case5.m +0 -0
  54. {ltbams-0.9.8 → ltbams-0.9.10}/ams/cases/matpower/case_ACTIVSg2000.m +0 -0
  55. {ltbams-0.9.8 → ltbams-0.9.10}/ams/cases/npcc/npcc.m +0 -0
  56. {ltbams-0.9.8 → ltbams-0.9.10}/ams/cases/npcc/npcc_uced.xlsx +0 -0
  57. {ltbams-0.9.8 → ltbams-0.9.10}/ams/cases/pglib/pglib_opf_case39_epri__api.m +0 -0
  58. {ltbams-0.9.8 → ltbams-0.9.10}/ams/cases/wecc/wecc.m +0 -0
  59. {ltbams-0.9.8 → ltbams-0.9.10}/ams/cases/wecc/wecc_uced.xlsx +0 -0
  60. {ltbams-0.9.8 → ltbams-0.9.10}/ams/core/__init__.py +0 -0
  61. {ltbams-0.9.8 → ltbams-0.9.10}/ams/core/documenter.py +0 -0
  62. {ltbams-0.9.8 → ltbams-0.9.10}/ams/core/model.py +0 -0
  63. {ltbams-0.9.8 → ltbams-0.9.10}/ams/core/param.py +0 -0
  64. {ltbams-0.9.8 → ltbams-0.9.10}/ams/core/service.py +0 -0
  65. {ltbams-0.9.8 → ltbams-0.9.10}/ams/core/symprocessor.py +0 -0
  66. {ltbams-0.9.8 → ltbams-0.9.10}/ams/core/var.py +0 -0
  67. {ltbams-0.9.8 → ltbams-0.9.10}/ams/extension/__init__.py +0 -0
  68. {ltbams-0.9.8 → ltbams-0.9.10}/ams/extension/eva.py +0 -0
  69. {ltbams-0.9.8 → ltbams-0.9.10}/ams/interop/__init__.py +0 -0
  70. {ltbams-0.9.8 → ltbams-0.9.10}/ams/io/__init__.py +0 -0
  71. {ltbams-0.9.8 → ltbams-0.9.10}/ams/io/json.py +0 -0
  72. {ltbams-0.9.8 → ltbams-0.9.10}/ams/io/psse.py +0 -0
  73. {ltbams-0.9.8 → ltbams-0.9.10}/ams/io/pypower.py +0 -0
  74. {ltbams-0.9.8 → ltbams-0.9.10}/ams/io/xlsx.py +0 -0
  75. {ltbams-0.9.8 → ltbams-0.9.10}/ams/models/__init__.py +0 -0
  76. {ltbams-0.9.8 → ltbams-0.9.10}/ams/models/area.py +0 -0
  77. {ltbams-0.9.8 → ltbams-0.9.10}/ams/models/bus.py +0 -0
  78. {ltbams-0.9.8 → ltbams-0.9.10}/ams/models/cost.py +0 -0
  79. {ltbams-0.9.8 → ltbams-0.9.10}/ams/models/distributed/__init__.py +0 -0
  80. {ltbams-0.9.8 → ltbams-0.9.10}/ams/models/distributed/esd1.py +0 -0
  81. {ltbams-0.9.8 → ltbams-0.9.10}/ams/models/distributed/ev.py +0 -0
  82. {ltbams-0.9.8 → ltbams-0.9.10}/ams/models/distributed/pvd1.py +0 -0
  83. {ltbams-0.9.8 → ltbams-0.9.10}/ams/models/group.py +0 -0
  84. {ltbams-0.9.8 → ltbams-0.9.10}/ams/models/info.py +0 -0
  85. {ltbams-0.9.8 → ltbams-0.9.10}/ams/models/line.py +0 -0
  86. {ltbams-0.9.8 → ltbams-0.9.10}/ams/models/region.py +0 -0
  87. {ltbams-0.9.8 → ltbams-0.9.10}/ams/models/renewable/__init__.py +0 -0
  88. {ltbams-0.9.8 → ltbams-0.9.10}/ams/models/renewable/regc.py +0 -0
  89. {ltbams-0.9.8 → ltbams-0.9.10}/ams/models/reserve.py +0 -0
  90. {ltbams-0.9.8 → ltbams-0.9.10}/ams/models/shunt.py +0 -0
  91. {ltbams-0.9.8 → ltbams-0.9.10}/ams/models/static/__init__.py +0 -0
  92. {ltbams-0.9.8 → ltbams-0.9.10}/ams/models/static/gen.py +0 -0
  93. {ltbams-0.9.8 → ltbams-0.9.10}/ams/models/static/pq.py +0 -0
  94. {ltbams-0.9.8 → ltbams-0.9.10}/ams/models/timeslot.py +0 -0
  95. {ltbams-0.9.8 → ltbams-0.9.10}/ams/opt/__init__.py +0 -0
  96. {ltbams-0.9.8 → ltbams-0.9.10}/ams/pypower/__init__.py +0 -0
  97. {ltbams-0.9.8 → ltbams-0.9.10}/ams/pypower/_compat.py +0 -0
  98. {ltbams-0.9.8 → ltbams-0.9.10}/ams/pypower/core/__init__.py +0 -0
  99. {ltbams-0.9.8 → ltbams-0.9.10}/ams/pypower/core/ppver.py +0 -0
  100. {ltbams-0.9.8 → ltbams-0.9.10}/ams/pypower/eps.py +0 -0
  101. {ltbams-0.9.8 → ltbams-0.9.10}/ams/pypower/idx.py +0 -0
  102. {ltbams-0.9.8 → ltbams-0.9.10}/ams/pypower/io.py +0 -0
  103. {ltbams-0.9.8 → ltbams-0.9.10}/ams/pypower/make/__init__.py +0 -0
  104. {ltbams-0.9.8 → ltbams-0.9.10}/ams/pypower/routines/__init__.py +0 -0
  105. {ltbams-0.9.8 → ltbams-0.9.10}/ams/pypower/routines/cpf_callbacks.py +0 -0
  106. {ltbams-0.9.8 → ltbams-0.9.10}/ams/pypower/utils.py +0 -0
  107. {ltbams-0.9.8 → ltbams-0.9.10}/ams/report.py +0 -0
  108. {ltbams-0.9.8 → ltbams-0.9.10}/ams/routines/__init__.py +0 -0
  109. {ltbams-0.9.8 → ltbams-0.9.10}/ams/routines/acopf.py +0 -0
  110. {ltbams-0.9.8 → ltbams-0.9.10}/ams/routines/cpf.py +0 -0
  111. {ltbams-0.9.8 → ltbams-0.9.10}/ams/routines/dcopf.py +0 -0
  112. {ltbams-0.9.8 → ltbams-0.9.10}/ams/routines/dcpf.py +0 -0
  113. {ltbams-0.9.8 → ltbams-0.9.10}/ams/routines/dopf.py +0 -0
  114. {ltbams-0.9.8 → ltbams-0.9.10}/ams/routines/ed.py +0 -0
  115. {ltbams-0.9.8 → ltbams-0.9.10}/ams/routines/pflow.py +0 -0
  116. {ltbams-0.9.8 → ltbams-0.9.10}/ams/routines/routine.py +0 -0
  117. {ltbams-0.9.8 → ltbams-0.9.10}/ams/routines/rted.py +0 -0
  118. {ltbams-0.9.8 → ltbams-0.9.10}/ams/routines/type.py +0 -0
  119. {ltbams-0.9.8 → ltbams-0.9.10}/ams/routines/uc.py +0 -0
  120. {ltbams-0.9.8 → ltbams-0.9.10}/ams/system.py +0 -0
  121. {ltbams-0.9.8 → ltbams-0.9.10}/ams/utils/__init__.py +0 -0
  122. {ltbams-0.9.8 → ltbams-0.9.10}/ams/utils/paths.py +0 -0
  123. {ltbams-0.9.8 → ltbams-0.9.10}/docs/Makefile +0 -0
  124. {ltbams-0.9.8 → ltbams-0.9.10}/docs/make.bat +0 -0
  125. {ltbams-0.9.8 → ltbams-0.9.10}/docs/source/_templates/autosummary/base.rst +0 -0
  126. {ltbams-0.9.8 → ltbams-0.9.10}/docs/source/_templates/autosummary/class.rst +0 -0
  127. {ltbams-0.9.8 → ltbams-0.9.10}/docs/source/_templates/autosummary/module.rst +0 -0
  128. {ltbams-0.9.8 → ltbams-0.9.10}/docs/source/_templates/autosummary/module_toctree.rst +0 -0
  129. {ltbams-0.9.8 → ltbams-0.9.10}/docs/source/api.rst +0 -0
  130. {ltbams-0.9.8 → ltbams-0.9.10}/docs/source/examples/index.rst +0 -0
  131. {ltbams-0.9.8 → ltbams-0.9.10}/docs/source/getting_started/copyright.rst +0 -0
  132. {ltbams-0.9.8 → ltbams-0.9.10}/docs/source/getting_started/formats/index.rst +0 -0
  133. {ltbams-0.9.8 → ltbams-0.9.10}/docs/source/getting_started/formats/matpower.rst +0 -0
  134. {ltbams-0.9.8 → ltbams-0.9.10}/docs/source/getting_started/formats/psse.rst +0 -0
  135. {ltbams-0.9.8 → ltbams-0.9.10}/docs/source/getting_started/formats/pypower.rst +0 -0
  136. {ltbams-0.9.8 → ltbams-0.9.10}/docs/source/getting_started/formats/xlsx.png +0 -0
  137. {ltbams-0.9.8 → ltbams-0.9.10}/docs/source/getting_started/formats/xlsx.rst +0 -0
  138. {ltbams-0.9.8 → ltbams-0.9.10}/docs/source/getting_started/index.rst +0 -0
  139. {ltbams-0.9.8 → ltbams-0.9.10}/docs/source/getting_started/install.rst +0 -0
  140. {ltbams-0.9.8 → ltbams-0.9.10}/docs/source/getting_started/overview.rst +0 -0
  141. {ltbams-0.9.8 → ltbams-0.9.10}/docs/source/getting_started/testcase.rst +0 -0
  142. {ltbams-0.9.8 → ltbams-0.9.10}/docs/source/getting_started/verification.rst +0 -0
  143. {ltbams-0.9.8 → ltbams-0.9.10}/docs/source/images/dcopf_time.png +0 -0
  144. {ltbams-0.9.8 → ltbams-0.9.10}/docs/source/images/sponsors/CURENT_Logo_NameOnTrans.png +0 -0
  145. {ltbams-0.9.8 → ltbams-0.9.10}/docs/source/images/sponsors/CURENT_Logo_Transparent.png +0 -0
  146. {ltbams-0.9.8 → ltbams-0.9.10}/docs/source/images/sponsors/CURENT_Logo_Transparent_Name.png +0 -0
  147. {ltbams-0.9.8 → ltbams-0.9.10}/docs/source/images/sponsors/doe.png +0 -0
  148. {ltbams-0.9.8 → ltbams-0.9.10}/docs/source/index.rst +0 -0
  149. {ltbams-0.9.8 → ltbams-0.9.10}/docs/source/modeling/example.rst +0 -0
  150. {ltbams-0.9.8 → ltbams-0.9.10}/docs/source/modeling/index.rst +0 -0
  151. {ltbams-0.9.8 → ltbams-0.9.10}/docs/source/modeling/model.rst +0 -0
  152. {ltbams-0.9.8 → ltbams-0.9.10}/docs/source/modeling/routine.rst +0 -0
  153. {ltbams-0.9.8 → ltbams-0.9.10}/docs/source/modeling/system.rst +0 -0
  154. {ltbams-0.9.8 → ltbams-0.9.10}/ltbams.egg-info/SOURCES.txt +0 -0
  155. {ltbams-0.9.8 → ltbams-0.9.10}/ltbams.egg-info/dependency_links.txt +0 -0
  156. {ltbams-0.9.8 → ltbams-0.9.10}/ltbams.egg-info/entry_points.txt +0 -0
  157. {ltbams-0.9.8 → ltbams-0.9.10}/ltbams.egg-info/top_level.txt +0 -0
  158. {ltbams-0.9.8 → ltbams-0.9.10}/requirements-extra.txt +0 -0
  159. {ltbams-0.9.8 → ltbams-0.9.10}/setup.cfg +0 -0
  160. {ltbams-0.9.8 → ltbams-0.9.10}/setup.py +0 -0
  161. {ltbams-0.9.8 → ltbams-0.9.10}/tests/__init__.py +0 -0
  162. {ltbams-0.9.8 → ltbams-0.9.10}/tests/test_1st_system.py +0 -0
  163. {ltbams-0.9.8 → ltbams-0.9.10}/tests/test_addressing.py +0 -0
  164. {ltbams-0.9.8 → ltbams-0.9.10}/tests/test_andes.py +0 -0
  165. {ltbams-0.9.8 → ltbams-0.9.10}/tests/test_case.py +0 -0
  166. {ltbams-0.9.8 → ltbams-0.9.10}/tests/test_cli.py +0 -0
  167. {ltbams-0.9.8 → ltbams-0.9.10}/tests/test_dctypes.py +0 -0
  168. {ltbams-0.9.8 → ltbams-0.9.10}/tests/test_export_csv.py +0 -0
  169. {ltbams-0.9.8 → ltbams-0.9.10}/tests/test_group.py +0 -0
  170. {ltbams-0.9.8 → ltbams-0.9.10}/tests/test_mats.py +0 -0
  171. {ltbams-0.9.8 → ltbams-0.9.10}/tests/test_model.py +0 -0
  172. {ltbams-0.9.8 → ltbams-0.9.10}/tests/test_paths.py +0 -0
  173. {ltbams-0.9.8 → ltbams-0.9.10}/tests/test_report.py +0 -0
  174. {ltbams-0.9.8 → ltbams-0.9.10}/tests/test_repr.py +0 -0
  175. {ltbams-0.9.8 → ltbams-0.9.10}/tests/test_service.py +0 -0
  176. {ltbams-0.9.8 → ltbams-0.9.10}/versioneer.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ltbams
3
- Version: 0.9.8
3
+ Version: 0.9.10
4
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
@@ -41,7 +41,6 @@ Python Software for Power System Scheduling Modeling and Co-Simulation with Dyna
41
41
  ![Repo Size](https://img.shields.io/github/repo-size/CURENT/ams)
42
42
  [![GitHub last commit (master)](https://img.shields.io/github/last-commit/CURENT/ams/master?label=last%20commit%20to%20master)](https://github.com/CURENT/ams/commits/master/)
43
43
  [![GitHub last commit (develop)](https://img.shields.io/github/last-commit/CURENT/ams/develop?label=last%20commit%20to%20develop)](https://github.com/CURENT/ams/commits/develop/)
44
- [![HitCount](https://hits.dwyl.com/CURENT/ams.svg)](https://hits.dwyl.com/CURENT/ams)
45
44
  [![libraries](https://img.shields.io/librariesio/release/pypi/ltbams)](https://libraries.io/pypi/ltbams)
46
45
  [![Structure](https://img.shields.io/badge/code_base-visualize-blue)](https://mango-dune-07a8b7110.1.azurestaticapps.net/?repo=CURENT%2Fams)
47
46
 
@@ -92,7 +91,10 @@ Use the following resources to get involved.
92
91
 
93
92
  # Installation
94
93
 
95
- ***NOTE:*** ``kvxopt`` is recommended to install via ``conda`` as sometimes ``pip`` struggles to set the correct path for compiled libraries.
94
+ ***NOTE:***
95
+ - Version **0.9.9** has known issues. Please avoid using this version
96
+ - `kvxopt` is recommended to install via `conda` as sometimes ``pip`` struggles to set the correct path for compiled libraries
97
+ - `cvxpy` versions **below 1.5** are incompatible with `numpy` versions **2.0 and above**
96
98
 
97
99
  AMS is released as ``ltbams`` on PyPI and conda-forge.
98
100
  Install from PyPI using pip:
@@ -8,7 +8,6 @@ Python Software for Power System Scheduling Modeling and Co-Simulation with Dyna
8
8
  ![Repo Size](https://img.shields.io/github/repo-size/CURENT/ams)
9
9
  [![GitHub last commit (master)](https://img.shields.io/github/last-commit/CURENT/ams/master?label=last%20commit%20to%20master)](https://github.com/CURENT/ams/commits/master/)
10
10
  [![GitHub last commit (develop)](https://img.shields.io/github/last-commit/CURENT/ams/develop?label=last%20commit%20to%20develop)](https://github.com/CURENT/ams/commits/develop/)
11
- [![HitCount](https://hits.dwyl.com/CURENT/ams.svg)](https://hits.dwyl.com/CURENT/ams)
12
11
  [![libraries](https://img.shields.io/librariesio/release/pypi/ltbams)](https://libraries.io/pypi/ltbams)
13
12
  [![Structure](https://img.shields.io/badge/code_base-visualize-blue)](https://mango-dune-07a8b7110.1.azurestaticapps.net/?repo=CURENT%2Fams)
14
13
 
@@ -59,7 +58,10 @@ Use the following resources to get involved.
59
58
 
60
59
  # Installation
61
60
 
62
- ***NOTE:*** ``kvxopt`` is recommended to install via ``conda`` as sometimes ``pip`` struggles to set the correct path for compiled libraries.
61
+ ***NOTE:***
62
+ - Version **0.9.9** has known issues. Please avoid using this version
63
+ - `kvxopt` is recommended to install via `conda` as sometimes ``pip`` struggles to set the correct path for compiled libraries
64
+ - `cvxpy` versions **below 1.5** are incompatible with `numpy` versions **2.0 and above**
63
65
 
64
66
  AMS is released as ``ltbams`` on PyPI and conda-forge.
65
67
  Install from PyPI using pip:
@@ -8,11 +8,11 @@ import json
8
8
 
9
9
  version_json = '''
10
10
  {
11
- "date": "2024-06-18T14:45:25-0400",
11
+ "date": "2024-09-03T22:41:38-0400",
12
12
  "dirty": false,
13
13
  "error": null,
14
- "full-revisionid": "63b55b4b38c980ba34cd7a2fa97dcffb2e4563d9",
15
- "version": "0.9.8"
14
+ "full-revisionid": "8bc9504a8281c16236c73decd8e7365b682c706c",
15
+ "version": "0.9.10"
16
16
  }
17
17
  ''' # END VERSION_JSON
18
18
 
@@ -111,7 +111,7 @@ def preamble():
111
111
 
112
112
  def main():
113
113
  """
114
- Entry point of the ANDES command-line interface.
114
+ Entry point of the AMS command-line interface.
115
115
  """
116
116
 
117
117
  parser = create_parser()
@@ -437,22 +437,37 @@ class MatProcessor:
437
437
  return b
438
438
 
439
439
  def build_ptdf(self, line=None, no_store=False,
440
- incremental=False, step=1000, no_tqdm=False):
440
+ incremental=False, step=1000, no_tqdm=False,
441
+ permc_spec=None, use_umfpack=True):
441
442
  """
442
- Build the Power Transfer Distribution Factor (PTDF) matrix and store
443
- it in the MParam `PTDF` by default.
443
+ Build the Power Transfer Distribution Factor (PTDF) matrix and optionally store it in `MParam.PTDF`.
444
444
 
445
- `PTDF[m, n]` means the increased line flow on line `m` when there is
446
- 1 p.u. power injection at bus `n`. It is very similar to Generation
447
- Shift Factor (GSF).
445
+ PTDF[m, n] represents the increased line flow on line `m` for a 1 p.u. power injection at bus `n`.
446
+ It is similar to the Generation Shift Factor (GSF).
448
447
 
449
- Note that there is discrepency between the PTDF-based line flow and
450
- DCOPF calcualted line flow. The gap is ignorable for small cases.
448
+ Note: There may be minor discrepancies between PTDF-based line flow and DCOPF-calculated line flow.
451
449
 
452
- It requires DC Bbus and Bf.
450
+ For large cases, use `incremental=True` to calculate the sparse PTDF in chunks, which will be stored
451
+ as a `scipy.sparse.lil_matrix`. In this mode, the PTDF is calculated in chunks, and a progress bar
452
+ will be shown unless `no_tqdm=True`.
453
453
 
454
- For large cases where memory is a concern, use `incremental=True` to
455
- calculate the sparse PTDF in chunks in the format of scipy.sparse.lil_matrix.
454
+ Parameters
455
+ ----------
456
+ line : int, str, list, optional
457
+ Line indices for which the PTDF is calculated. If specified, the PTDF will not be stored in `MParam`.
458
+ no_store : bool, optional
459
+ If False, store the PTDF in `MatProcessor.PTDF._v`. Default is False.
460
+ incremental : bool, optional
461
+ If True, calculate the sparse PTDF in chunks to save memory. Default is False.
462
+ step : int, optional
463
+ Step size for incremental calculation. Default is 1000.
464
+ no_tqdm : bool, optional
465
+ If True, disable the progress bar. Default is False.
466
+ permc_spec : str, optional
467
+ Column permutation strategy for sparsity preservation. Default is 'COLAMD'.
468
+ use_umfpack : bool, optional
469
+ If True, use UMFPACK as the solver. Effective only when (`incremental=True`)
470
+ & (`line` contains a single line or `step` is 1). Default is True.
456
471
 
457
472
  Parameters
458
473
  ----------
@@ -468,6 +483,10 @@ class MatProcessor:
468
483
  Step for incremental calculation.
469
484
  no_tqdm : bool, optional
470
485
  If True, the progress bar will be disabled.
486
+ permc_spec : str, optional
487
+ How to permute the columns of the matrix for sparsity preservation. (default: 'COLAMD')
488
+ use_umfpack : bool, optional
489
+ If True, use UMFPACK as the solver. (default: True)
471
490
 
472
491
  Returns
473
492
  -------
@@ -530,8 +549,10 @@ class MatProcessor:
530
549
  # NOTE: for PTDF, we are building rows by rows
531
550
  for start in range(0, nline, step):
532
551
  end = min(start + step, nline)
533
- sol = sps.linalg.spsolve(Bbus[np.ix_(noslack, noref)].T,
534
- Bf[np.ix_(luid[start:end], noref)].T).T
552
+ sol = sps.linalg.spsolve(A=Bbus[np.ix_(noslack, noref)].T,
553
+ b=Bf[np.ix_(luid[start:end], noref)].T,
554
+ permc_spec=permc_spec,
555
+ use_umfpack=use_umfpack).T
535
556
  H[start:end, noslack] = sol
536
557
 
537
558
  # show progress in percentage
@@ -11,6 +11,7 @@ from andes.utils.misc import elapsed
11
11
  from andes.system import System as andes_System
12
12
 
13
13
  from ams.io import input_formats
14
+ from ams.shared import nan
14
15
 
15
16
  logger = logging.getLogger(__name__)
16
17
 
@@ -260,7 +261,7 @@ def parse_addfile(adsys, amsys, addfile):
260
261
  except KeyError: # set the most frequent string as the model name
261
262
  split_list = []
262
263
  for item in df[idxn].values:
263
- if item is None or np.nan:
264
+ if item is None or nan:
264
265
  continue
265
266
  try:
266
267
  split_list.append(item.split('_'))
@@ -295,7 +296,7 @@ def parse_addfile(adsys, amsys, addfile):
295
296
  # add dynamic models
296
297
  for name, df in df_models.items():
297
298
  # drop rows that all nan
298
- df.replace(['', ' '], np.NaN, inplace=True) # replace empty string with nan
299
+ df.replace(['', ' '], nan, inplace=True) # replace empty string with nan
299
300
  df.dropna(axis=0, how='all', inplace=True)
300
301
  # if the dynamic model also exists in AMS, use AMS parameters for overlap
301
302
  if (name in amsys.models.keys()) and amsys.models[name].n > 0:
@@ -684,15 +685,15 @@ class Dynamic:
684
685
  cond_ads_stg_u = (mname_ads in ['StaticGen', 'PV', 'Sclak']) and (pname_ads == 'u')
685
686
  if cond_ads_stg_u and (self.is_tds):
686
687
  # --- SynGen ---
687
- u_sg = sa.SynGen.get(idx=link['syg_idx'].replace(np.NaN, None).to_list(),
688
+ u_sg = sa.SynGen.get(idx=link['syg_idx'].replace(nan, None).to_list(),
688
689
  src='u', attr='v',
689
690
  allow_none=True, default=0,)
690
691
  # --- DG ---
691
- u_dg = sa.DG.get(idx=link['dg_idx'].replace(np.NaN, None).to_list(),
692
+ u_dg = sa.DG.get(idx=link['dg_idx'].replace(nan, None).to_list(),
692
693
  src='u', attr='v',
693
694
  allow_none=True, default=0,)
694
695
  # --- RenGen ---
695
- u_rg = sa.RenGen.get(idx=link['rg_idx'].replace(np.NaN, None).to_list(),
696
+ u_rg = sa.RenGen.get(idx=link['rg_idx'].replace(nan, None).to_list(),
696
697
  src='u', attr='v',
697
698
  allow_none=True, default=0,)
698
699
  # --- output ---
@@ -722,19 +723,19 @@ class Dynamic:
722
723
  cond_ads_stg_p = (mname_ads in ['StaticGen', 'PV', 'Sclak']) and (pname_ads == 'p')
723
724
  if cond_ads_stg_p and (self.is_tds):
724
725
  # --- SynGen ---
725
- p_sg = sa.SynGen.get(idx=link['syg_idx'].replace(np.NaN, None).to_list(),
726
+ p_sg = sa.SynGen.get(idx=link['syg_idx'].replace(nan, None).to_list(),
726
727
  src='Pe', attr='v',
727
728
  allow_none=True, default=0,)
728
729
  # --- DG ---
729
- Ie_dg = sa.DG.get(idx=link['dg_idx'].replace(np.NaN, None).to_list(),
730
+ Ie_dg = sa.DG.get(idx=link['dg_idx'].replace(nan, None).to_list(),
730
731
  src='Ipout_y', attr='v',
731
732
  allow_none=True, default=0,)
732
- v_dg = sa.DG.get(idx=link['dg_idx'].replace(np.NaN, None).to_list(),
733
+ v_dg = sa.DG.get(idx=link['dg_idx'].replace(nan, None).to_list(),
733
734
  src='v', attr='v',
734
735
  allow_none=True, default=0,)
735
736
  p_dg = Ie_dg * v_dg
736
737
  # --- RenGen ---
737
- p_rg = sa.RenGen.get(idx=link['rg_idx'].replace(np.NaN, None).to_list(),
738
+ p_rg = sa.RenGen.get(idx=link['rg_idx'].replace(nan, None).to_list(),
738
739
  src='Pe', attr='v',
739
740
  allow_none=True, default=0,)
740
741
  # --- output ---
@@ -226,7 +226,7 @@ def mpc2system(mpc: dict, system) -> bool:
226
226
  system.add('GCost', gen=int(gen),
227
227
  u=1, type=gctype,
228
228
  idx=gcost_idx,
229
- name=f'GCost {gcost_idx}',
229
+ name=None,
230
230
  csu=startup, csd=shutdown,
231
231
  c2=c2, c1=c1, c0=c0
232
232
  )
@@ -235,7 +235,7 @@ def mpc2system(mpc: dict, system) -> bool:
235
235
  zone_id = np.unique(system.Bus.zone.v).astype(int)
236
236
  for zone in zone_id:
237
237
  zone_idx = f'ZONE_{zone}'
238
- system.add('Region', idx=zone_idx, name=zone_idx)
238
+ system.add('Region', idx=zone_idx, name=None)
239
239
  bus_zone = system.Bus.zone.v
240
240
  bus_zone = [f'ZONE_{int(zone)}' for zone in bus_zone]
241
241
  system.Bus.zone.v = bus_zone
@@ -291,9 +291,11 @@ def system2mpc(system) -> dict:
291
291
  gen=np.zeros((system.PV.n + system.Slack.n, 21), dtype=np.float64),
292
292
  branch=np.zeros((system.Line.n, 17), dtype=np.float64),
293
293
  gencost=np.zeros((system.GCost.n, 7), dtype=np.float64),
294
- bus_name=np.zeros((system.Bus.n, ), dtype=object),
295
294
  )
296
295
 
296
+ if system.Bus.name.v is not None:
297
+ mpc['bus_name'] = system.Bus.name.v
298
+
297
299
  base_mva = system.config.mva
298
300
 
299
301
  # --- bus ---
@@ -401,6 +403,4 @@ def system2mpc(system) -> dict:
401
403
  else:
402
404
  mpc.pop('gencost')
403
405
 
404
- mpc['bus_name'] = np.array(system.Bus.name.v)
405
-
406
406
  return mpc
@@ -308,7 +308,7 @@ def run(filename, input_path='', verbose=20, mp_verbose=30,
308
308
  ncpu=NCPUS_PHYSICAL, pool=False,
309
309
  cli=False, shell=False, **kwargs):
310
310
  """
311
- Entry point to run ANDES routines.
311
+ Entry point to run AMS routines.
312
312
 
313
313
  Parameters
314
314
  ----------
@@ -511,7 +511,7 @@ def demo(**kwargs):
511
511
 
512
512
  def versioninfo():
513
513
  """
514
- Print version info for ANDES and dependencies.
514
+ Print version info for AMS and dependencies.
515
515
  """
516
516
 
517
517
  import numpy as np
@@ -563,7 +563,7 @@ def print_license():
563
563
 
564
564
  def edit_conf(edit_config: Optional[Union[str, bool]] = ''):
565
565
  """
566
- Edit the Andes config file which occurs first in the search path.
566
+ Edit the AMS config file which occurs first in the search path.
567
567
 
568
568
  Parameters
569
569
  ----------
@@ -647,7 +647,7 @@ def save_conf(config_path=None, overwrite=None, **kwargs):
647
647
  # TODO: list AMS output files here
648
648
  def remove_output(recursive=False):
649
649
  """
650
- Remove the outputs generated by Andes, including power flow reports
650
+ Remove the outputs generated by AMS, including power flow reports
651
651
  ``_out.txt``, time-domain list ``_out.lst`` and data ``_out.dat``,
652
652
  eigenvalue analysis report ``_eig.txt``.
653
653
 
@@ -412,8 +412,10 @@ class Var(OptzBase):
412
412
 
413
413
  @v.setter
414
414
  def v(self, value):
415
- # FIXME: is this safe?
416
- self._v = value
415
+ if self.optz is None:
416
+ logger.info(f"Variable <{self.name}> is not initialized yet.")
417
+ else:
418
+ self.optz.value = value
417
419
 
418
420
  def get_idx(self):
419
421
  if self.is_group:
@@ -595,6 +597,10 @@ class Constraint(OptzBase):
595
597
  else:
596
598
  return self.optz._expr.value
597
599
 
600
+ @v.setter
601
+ def v(self, value):
602
+ raise AttributeError("Cannot set the value of the constraint.")
603
+
598
604
 
599
605
  class Objective(OptzBase):
600
606
  """
@@ -634,7 +640,6 @@ class Objective(OptzBase):
634
640
  OptzBase.__init__(self, name=name, info=info, unit=unit)
635
641
  self.e_str = e_str
636
642
  self.sense = sense
637
- self._v = 0
638
643
  self.code = None
639
644
 
640
645
  @property
@@ -673,13 +678,12 @@ class Objective(OptzBase):
673
678
  """
674
679
  if self.optz is None:
675
680
  return None
676
- out = self.om.obj.value
677
- out = self._v if out is None else out
678
- return out
681
+ else:
682
+ return self.optz.value
679
683
 
680
684
  @v.setter
681
685
  def v(self, value):
682
- self._v = value
686
+ raise AttributeError("Cannot set the value of the objective function.")
683
687
 
684
688
  def parse(self, no_code=True):
685
689
  """
@@ -1,22 +1,24 @@
1
1
  """
2
2
  Python Interior Point Solver (PIPS).
3
3
  """
4
- import logging # NOQA
4
+ import logging
5
5
 
6
- import numpy as np # NOQA
7
- from numpy import flatnonzero as find # NOQA
6
+ import numpy as np
7
+ from numpy import flatnonzero as find
8
8
 
9
- import scipy.sparse as sp # NOQA
10
- from scipy.sparse import csr_matrix as c_sparse # NOQA
9
+ import scipy.sparse as sp
10
+ from scipy.sparse import csr_matrix as c_sparse
11
11
 
12
- from andes.shared import deg2rad, rad2deg # NOQA
12
+ from andes.shared import deg2rad, rad2deg
13
13
 
14
- from ams.pypower.eps import EPS # NOQA
15
- from ams.pypower.idx import IDX # NOQA
16
- from ams.pypower.utils import sub2ind # NOQA
17
- from ams.pypower.make import makeYbus # NOQA
14
+ from ams.shared import inf
15
+
16
+ from ams.pypower.eps import EPS
17
+ from ams.pypower.idx import IDX
18
+ from ams.pypower.utils import sub2ind
19
+ from ams.pypower.make import makeYbus
18
20
  from ams.pypower.routines.opffcns import (opf_costfcn, opf_consfcn,
19
- opf_hessfcn,) # NOQA
21
+ opf_hessfcn,)
20
22
 
21
23
 
22
24
  logger = logging.getLogger(__name__)
@@ -205,13 +207,13 @@ def pips(f_fcn, x0=None, A=None, l=None, u=None, xmin=None, xmax=None,
205
207
 
206
208
  # default argument values
207
209
  if l is None or len(l) == 0:
208
- l = -np.Inf * np.ones(nA)
210
+ l = -inf * np.ones(nA)
209
211
  if u is None or len(u) == 0:
210
- u = np.Inf * np.ones(nA)
212
+ u = inf * np.ones(nA)
211
213
  if xmin is None or len(xmin) == 0:
212
- xmin = -np.Inf * np.ones(x0.shape[0])
214
+ xmin = -inf * np.ones(x0.shape[0])
213
215
  if xmax is None or len(xmax) == 0:
214
- xmax = np.Inf * np.ones(x0.shape[0])
216
+ xmax = inf * np.ones(x0.shape[0])
215
217
  if gh_fcn is None:
216
218
  nonlinear = False
217
219
  gn = np.array([])
@@ -343,15 +345,15 @@ def pips(f_fcn, x0=None, A=None, l=None, u=None, xmin=None, xmax=None,
343
345
 
344
346
  maxh = np.zeros(1) if len(h) == 0 else max(h)
345
347
 
346
- gnorm = np.linalg.norm(g, np.Inf) if len(g) else 0.0
347
- lam_norm = np.linalg.norm(lam, np.Inf) if len(lam) else 0.0
348
- mu_norm = np.linalg.norm(mu, np.Inf) if len(mu) else 0.0
349
- znorm = np.linalg.norm(z, np.Inf) if len(z) else 0.0
348
+ gnorm = np.linalg.norm(g, inf) if len(g) else 0.0
349
+ lam_norm = np.linalg.norm(lam, inf) if len(lam) else 0.0
350
+ mu_norm = np.linalg.norm(mu, inf) if len(mu) else 0.0
351
+ znorm = np.linalg.norm(z, inf) if len(z) else 0.0
350
352
  feascond = \
351
- max([gnorm, maxh]) / (1 + max([np.linalg.norm(x, np.Inf), znorm]))
353
+ max([gnorm, maxh]) / (1 + max([np.linalg.norm(x, inf), znorm]))
352
354
  gradcond = \
353
- np.linalg.norm(Lx, np.Inf) / (1 + max([lam_norm, mu_norm]))
354
- compcond = np.dot(z, mu) / (1 + np.linalg.norm(x, np.Inf))
355
+ np.linalg.norm(Lx, inf) / (1 + max([lam_norm, mu_norm]))
356
+ compcond = np.dot(z, mu) / (1 + np.linalg.norm(x, inf))
355
357
  costcond = np.abs(f - f0) / (1 + np.abs(f0))
356
358
 
357
359
  # save history
@@ -467,14 +469,14 @@ def pips(f_fcn, x0=None, A=None, l=None, u=None, xmin=None, xmax=None,
467
469
 
468
470
  maxh1 = np.zeros(1) if len(h1) == 0 else max(h1)
469
471
 
470
- g1norm = np.linalg.norm(g1, np.Inf) if len(g1) else 0.0
471
- lam1_norm = np.linalg.norm(lam, np.Inf) if len(lam) else 0.0
472
- mu1_norm = np.linalg.norm(mu, np.Inf) if len(mu) else 0.0
473
- z1norm = np.linalg.norm(z, np.Inf) if len(z) else 0.0
472
+ g1norm = np.linalg.norm(g1, inf) if len(g1) else 0.0
473
+ lam1_norm = np.linalg.norm(lam, inf) if len(lam) else 0.0
474
+ mu1_norm = np.linalg.norm(mu, inf) if len(mu) else 0.0
475
+ z1norm = np.linalg.norm(z, inf) if len(z) else 0.0
474
476
 
475
477
  feascond1 = max([g1norm, maxh1]) / \
476
- (1 + max([np.linalg.norm(x1, np.Inf), z1norm]))
477
- gradcond1 = np.linalg.norm(Lx1, np.Inf) / (1 + max([lam1_norm, mu1_norm]))
478
+ (1 + max([np.linalg.norm(x1, inf), z1norm]))
479
+ gradcond1 = np.linalg.norm(Lx1, inf) / (1 + max([lam1_norm, mu1_norm]))
478
480
 
479
481
  if (feascond1 > feascond) and (gradcond1 > gradcond):
480
482
  sc = True
@@ -560,15 +562,15 @@ def pips(f_fcn, x0=None, A=None, l=None, u=None, xmin=None, xmax=None,
560
562
  else:
561
563
  maxh = max(h)
562
564
 
563
- gnorm = np.linalg.norm(g, np.Inf) if len(g) else 0.0
564
- lam_norm = np.linalg.norm(lam, np.Inf) if len(lam) else 0.0
565
- mu_norm = np.linalg.norm(mu, np.Inf) if len(mu) else 0.0
566
- znorm = np.linalg.norm(z, np.Inf) if len(z) else 0.0
565
+ gnorm = np.linalg.norm(g, inf) if len(g) else 0.0
566
+ lam_norm = np.linalg.norm(lam, inf) if len(lam) else 0.0
567
+ mu_norm = np.linalg.norm(mu, inf) if len(mu) else 0.0
568
+ znorm = np.linalg.norm(z, inf) if len(z) else 0.0
567
569
  feascond = \
568
- max([gnorm, maxh]) / (1 + max([np.linalg.norm(x, np.Inf), znorm]))
570
+ max([gnorm, maxh]) / (1 + max([np.linalg.norm(x, inf), znorm]))
569
571
  gradcond = \
570
- np.linalg.norm(Lx, np.Inf) / (1 + max([lam_norm, mu_norm]))
571
- compcond = np.dot(z, mu) / (1 + np.linalg.norm(x, np.Inf))
572
+ np.linalg.norm(Lx, inf) / (1 + max([lam_norm, mu_norm]))
573
+ compcond = np.dot(z, mu) / (1 + np.linalg.norm(x, inf))
572
574
  costcond = float(np.abs(f - f0) / (1 + np.abs(f0)))
573
575
 
574
576
  hist.append({'feascond': feascond, 'gradcond': gradcond,
@@ -775,8 +777,8 @@ def pipsopf_solver(om, ppopt, out_opt=None):
775
777
 
776
778
  # try to select an interior initial point
777
779
  ll, uu = xmin.copy(), xmax.copy()
778
- ll[xmin == -np.Inf] = -1e10 # replace Inf with numerical proxies
779
- uu[xmax == np.Inf] = 1e10
780
+ ll[xmin == -inf] = -1e10 # replace Inf with numerical proxies
781
+ uu[xmax == inf] = 1e10
780
782
  x0 = (ll + uu) / 2
781
783
  Varefs = bus[bus[:, IDX.bus.BUS_TYPE] == IDX.bus.REF, IDX.bus.VA] * deg2rad
782
784
  # angles set to first reference angle
@@ -7,6 +7,8 @@
7
7
 
8
8
  import numpy as np
9
9
 
10
+ from ams.shared import inf
11
+
10
12
 
11
13
  PF_OPTIONS = [
12
14
  ('pf_alg', 1, '''power flow algorithm:
@@ -184,7 +186,7 @@ GUROBI_OPTIONS = [
184
186
  3 - concurrent (LP only)
185
187
  4 - deterministic concurrent (LP only)
186
188
  '''),
187
- ('grb_timelimit', np.Inf, 'maximum time allowed for solver (TimeLimit)'),
189
+ ('grb_timelimit', inf, 'maximum time allowed for solver (TimeLimit)'),
188
190
  ('grb_threads', 0, '(auto) maximum number of threads to use (Threads)'),
189
191
  ('grb_opt', 0, 'See gurobi_options() for details')
190
192
  ]