ltbams 0.9.13__tar.gz → 1.0.1__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 (205) hide show
  1. {ltbams-0.9.13 → ltbams-1.0.1}/LICENSE +1 -1
  2. {ltbams-0.9.13/ltbams.egg-info → ltbams-1.0.1}/PKG-INFO +58 -43
  3. {ltbams-0.9.13 → ltbams-1.0.1}/README.md +55 -22
  4. {ltbams-0.9.13 → ltbams-1.0.1}/ams/__init__.py +0 -1
  5. {ltbams-0.9.13 → ltbams-1.0.1}/ams/_version.py +3 -3
  6. {ltbams-0.9.13 → ltbams-1.0.1}/ams/cases/5bus/pjm5bus_demo.xlsx +0 -0
  7. {ltbams-0.9.13 → ltbams-1.0.1}/ams/cases/5bus/pjm5bus_jumper.xlsx +0 -0
  8. {ltbams-0.9.13 → ltbams-1.0.1}/ams/cases/5bus/pjm5bus_uced.json +1 -1
  9. {ltbams-0.9.13 → ltbams-1.0.1}/ams/cases/5bus/pjm5bus_uced.xlsx +0 -0
  10. {ltbams-0.9.13 → ltbams-1.0.1}/ams/cases/5bus/pjm5bus_uced_esd1.xlsx +0 -0
  11. {ltbams-0.9.13 → ltbams-1.0.1}/ams/cases/5bus/pjm5bus_uced_ev.xlsx +0 -0
  12. ltbams-1.0.1/ams/cases/ieee14/ieee14_conn.xlsx +0 -0
  13. {ltbams-0.9.13 → ltbams-1.0.1}/ams/cases/ieee14/ieee14_uced.xlsx +0 -0
  14. {ltbams-0.9.13 → ltbams-1.0.1}/ams/cases/ieee39/ieee39.xlsx +0 -0
  15. {ltbams-0.9.13 → ltbams-1.0.1}/ams/cases/ieee39/ieee39_uced.xlsx +0 -0
  16. {ltbams-0.9.13 → ltbams-1.0.1}/ams/cases/ieee39/ieee39_uced_esd1.xlsx +0 -0
  17. {ltbams-0.9.13 → ltbams-1.0.1}/ams/cases/ieee39/ieee39_uced_pvd1.xlsx +0 -0
  18. {ltbams-0.9.13 → ltbams-1.0.1}/ams/cases/ieee39/ieee39_uced_vis.xlsx +0 -0
  19. {ltbams-0.9.13 → ltbams-1.0.1}/ams/cases/npcc/npcc_uced.xlsx +0 -0
  20. {ltbams-0.9.13 → ltbams-1.0.1}/ams/cases/wecc/wecc_uced.xlsx +0 -0
  21. {ltbams-0.9.13 → ltbams-1.0.1}/ams/core/matprocessor.py +1 -1
  22. {ltbams-0.9.13 → ltbams-1.0.1}/ams/core/model.py +43 -13
  23. {ltbams-0.9.13 → ltbams-1.0.1}/ams/core/param.py +49 -4
  24. {ltbams-0.9.13 → ltbams-1.0.1}/ams/core/service.py +9 -9
  25. {ltbams-0.9.13 → ltbams-1.0.1}/ams/interface.py +9 -7
  26. {ltbams-0.9.13 → ltbams-1.0.1}/ams/io/matpower.py +3 -3
  27. {ltbams-0.9.13 → ltbams-1.0.1}/ams/models/__init__.py +1 -1
  28. {ltbams-0.9.13 → ltbams-1.0.1}/ams/models/bus.py +2 -2
  29. {ltbams-0.9.13 → ltbams-1.0.1}/ams/models/group.py +4 -17
  30. {ltbams-0.9.13 → ltbams-1.0.1}/ams/models/timeslot.py +2 -2
  31. ltbams-0.9.13/ams/models/region.py → ltbams-1.0.1/ams/models/zone.py +7 -10
  32. {ltbams-0.9.13 → ltbams-1.0.1}/ams/opt/__init__.py +1 -1
  33. {ltbams-0.9.13 → ltbams-1.0.1}/ams/opt/constraint.py +6 -3
  34. {ltbams-0.9.13 → ltbams-1.0.1}/ams/opt/exprcalc.py +1 -13
  35. {ltbams-0.9.13 → ltbams-1.0.1}/ams/opt/expression.py +1 -13
  36. {ltbams-0.9.13 → ltbams-1.0.1}/ams/opt/omodel.py +1 -1
  37. ltbams-0.9.13/ams/opt/optbase.py → ltbams-1.0.1/ams/opt/optzbase.py +37 -0
  38. {ltbams-0.9.13 → ltbams-1.0.1}/ams/opt/var.py +1 -13
  39. {ltbams-0.9.13 → ltbams-1.0.1}/ams/report.py +3 -3
  40. {ltbams-0.9.13 → ltbams-1.0.1}/ams/routines/acopf.py +1 -1
  41. {ltbams-0.9.13 → ltbams-1.0.1}/ams/routines/dcopf.py +1 -1
  42. {ltbams-0.9.13 → ltbams-1.0.1}/ams/routines/dcpf.py +3 -3
  43. {ltbams-0.9.13 → ltbams-1.0.1}/ams/routines/dcpf0.py +3 -3
  44. {ltbams-0.9.13 → ltbams-1.0.1}/ams/routines/ed.py +2 -0
  45. {ltbams-0.9.13 → ltbams-1.0.1}/ams/routines/pflow.py +5 -5
  46. {ltbams-0.9.13 → ltbams-1.0.1}/ams/routines/pflow0.py +1 -1
  47. {ltbams-0.9.13 → ltbams-1.0.1}/ams/routines/routine.py +4 -4
  48. {ltbams-0.9.13 → ltbams-1.0.1}/ams/routines/rted.py +7 -63
  49. {ltbams-0.9.13 → ltbams-1.0.1}/ams/shared.py +29 -0
  50. {ltbams-0.9.13 → ltbams-1.0.1}/ams/system.py +42 -12
  51. ltbams-1.0.1/ams/utils/__init__.py +3 -0
  52. ltbams-0.9.13/ams/utils/__init__.py → ltbams-1.0.1/ams/utils/misc.py +21 -3
  53. ltbams-1.0.1/docs/source/images/dcopf_time.png +0 -0
  54. {ltbams-0.9.13 → ltbams-1.0.1}/docs/source/index.rst +4 -5
  55. {ltbams-0.9.13 → ltbams-1.0.1}/docs/source/modeling/routine.rst +1 -1
  56. {ltbams-0.9.13 → ltbams-1.0.1}/docs/source/release-notes.rst +18 -0
  57. {ltbams-0.9.13 → ltbams-1.0.1/ltbams.egg-info}/PKG-INFO +58 -43
  58. {ltbams-0.9.13 → ltbams-1.0.1}/ltbams.egg-info/SOURCES.txt +4 -4
  59. {ltbams-0.9.13 → ltbams-1.0.1}/ltbams.egg-info/entry_points.txt +0 -1
  60. ltbams-1.0.1/ltbams.egg-info/requires.txt +46 -0
  61. ltbams-1.0.1/ltbams.egg-info/top_level.txt +4 -0
  62. {ltbams-0.9.13 → ltbams-1.0.1}/pyproject.toml +6 -5
  63. {ltbams-0.9.13 → ltbams-1.0.1}/requirements-extra.txt +1 -3
  64. {ltbams-0.9.13 → ltbams-1.0.1}/requirements.txt +2 -2
  65. {ltbams-0.9.13 → ltbams-1.0.1}/setup.py +3 -3
  66. {ltbams-0.9.13 → ltbams-1.0.1}/tests/test_case.py +1 -1
  67. {ltbams-0.9.13 → ltbams-1.0.1}/tests/test_group.py +8 -1
  68. {ltbams-0.9.13 → ltbams-1.0.1}/tests/test_interface.py +2 -2
  69. {ltbams-0.9.13 → ltbams-1.0.1}/tests/test_matp.py +1 -1
  70. ltbams-1.0.1/tests/test_model.py +54 -0
  71. {ltbams-0.9.13 → ltbams-1.0.1}/tests/test_report.py +11 -5
  72. {ltbams-0.9.13 → ltbams-1.0.1}/tests/test_rtn_dcopf.py +2 -2
  73. {ltbams-0.9.13 → ltbams-1.0.1}/tests/test_rtn_ed.py +13 -9
  74. {ltbams-0.9.13 → ltbams-1.0.1}/tests/test_rtn_rted.py +13 -13
  75. {ltbams-0.9.13 → ltbams-1.0.1}/tests/test_rtn_uc.py +25 -25
  76. {ltbams-0.9.13 → ltbams-1.0.1}/tests/test_service.py +2 -2
  77. ltbams-0.9.13/ams/benchmarks.py +0 -302
  78. ltbams-0.9.13/docs/source/images/dcopf_time.png +0 -0
  79. ltbams-0.9.13/ltbams.egg-info/requires.txt +0 -94
  80. ltbams-0.9.13/ltbams.egg-info/top_level.txt +0 -2
  81. ltbams-0.9.13/tests/test_benchmarks.py +0 -149
  82. ltbams-0.9.13/tests/test_model.py +0 -45
  83. {ltbams-0.9.13 → ltbams-1.0.1}/CONTRIBUTING.rst +0 -0
  84. {ltbams-0.9.13 → ltbams-1.0.1}/MANIFEST.in +0 -0
  85. {ltbams-0.9.13 → ltbams-1.0.1}/ams/__main__.py +0 -0
  86. {ltbams-0.9.13 → ltbams-1.0.1}/ams/cases/ieee123/ieee123.xlsx +0 -0
  87. {ltbams-0.9.13 → ltbams-1.0.1}/ams/cases/ieee123/ieee123_regcv1.xlsx +0 -0
  88. {ltbams-0.9.13 → ltbams-1.0.1}/ams/cases/ieee14/ieee14.json +0 -0
  89. {ltbams-0.9.13 → ltbams-1.0.1}/ams/cases/ieee14/ieee14.raw +0 -0
  90. {ltbams-0.9.13 → ltbams-1.0.1}/ams/cases/matpower/benchmark.json +0 -0
  91. {ltbams-0.9.13 → ltbams-1.0.1}/ams/cases/matpower/case118.m +0 -0
  92. {ltbams-0.9.13 → ltbams-1.0.1}/ams/cases/matpower/case14.m +0 -0
  93. {ltbams-0.9.13 → ltbams-1.0.1}/ams/cases/matpower/case300.m +0 -0
  94. {ltbams-0.9.13 → ltbams-1.0.1}/ams/cases/matpower/case39.m +0 -0
  95. {ltbams-0.9.13 → ltbams-1.0.1}/ams/cases/matpower/case5.m +0 -0
  96. {ltbams-0.9.13 → ltbams-1.0.1}/ams/cases/matpower/case_ACTIVSg2000.m +0 -0
  97. {ltbams-0.9.13 → ltbams-1.0.1}/ams/cases/npcc/npcc.m +0 -0
  98. {ltbams-0.9.13 → ltbams-1.0.1}/ams/cases/pglib/pglib_opf_case39_epri__api.m +0 -0
  99. {ltbams-0.9.13 → ltbams-1.0.1}/ams/cases/wecc/wecc.m +0 -0
  100. {ltbams-0.9.13 → ltbams-1.0.1}/ams/cli.py +0 -0
  101. {ltbams-0.9.13 → ltbams-1.0.1}/ams/core/__init__.py +0 -0
  102. {ltbams-0.9.13 → ltbams-1.0.1}/ams/core/documenter.py +0 -0
  103. {ltbams-0.9.13 → ltbams-1.0.1}/ams/core/symprocessor.py +0 -0
  104. {ltbams-0.9.13 → ltbams-1.0.1}/ams/core/var.py +0 -0
  105. {ltbams-0.9.13 → ltbams-1.0.1}/ams/extension/__init__.py +0 -0
  106. {ltbams-0.9.13 → ltbams-1.0.1}/ams/extension/eva.py +0 -0
  107. {ltbams-0.9.13 → ltbams-1.0.1}/ams/io/__init__.py +0 -0
  108. {ltbams-0.9.13 → ltbams-1.0.1}/ams/io/json.py +0 -0
  109. {ltbams-0.9.13 → ltbams-1.0.1}/ams/io/psse.py +0 -0
  110. {ltbams-0.9.13 → ltbams-1.0.1}/ams/io/pypower.py +0 -0
  111. {ltbams-0.9.13 → ltbams-1.0.1}/ams/io/xlsx.py +0 -0
  112. {ltbams-0.9.13 → ltbams-1.0.1}/ams/main.py +0 -0
  113. {ltbams-0.9.13 → ltbams-1.0.1}/ams/models/area.py +0 -0
  114. {ltbams-0.9.13 → ltbams-1.0.1}/ams/models/cost.py +0 -0
  115. {ltbams-0.9.13 → ltbams-1.0.1}/ams/models/distributed/__init__.py +0 -0
  116. {ltbams-0.9.13 → ltbams-1.0.1}/ams/models/distributed/esd1.py +0 -0
  117. {ltbams-0.9.13 → ltbams-1.0.1}/ams/models/distributed/ev.py +0 -0
  118. {ltbams-0.9.13 → ltbams-1.0.1}/ams/models/distributed/pvd1.py +0 -0
  119. {ltbams-0.9.13 → ltbams-1.0.1}/ams/models/info.py +0 -0
  120. {ltbams-0.9.13 → ltbams-1.0.1}/ams/models/line.py +0 -0
  121. {ltbams-0.9.13 → ltbams-1.0.1}/ams/models/renewable/__init__.py +0 -0
  122. {ltbams-0.9.13 → ltbams-1.0.1}/ams/models/renewable/regc.py +0 -0
  123. {ltbams-0.9.13 → ltbams-1.0.1}/ams/models/reserve.py +0 -0
  124. {ltbams-0.9.13 → ltbams-1.0.1}/ams/models/shunt.py +0 -0
  125. {ltbams-0.9.13 → ltbams-1.0.1}/ams/models/static/__init__.py +0 -0
  126. {ltbams-0.9.13 → ltbams-1.0.1}/ams/models/static/gen.py +0 -0
  127. {ltbams-0.9.13 → ltbams-1.0.1}/ams/models/static/pq.py +0 -0
  128. {ltbams-0.9.13 → ltbams-1.0.1}/ams/opt/objective.py +0 -0
  129. {ltbams-0.9.13 → ltbams-1.0.1}/ams/opt/param.py +0 -0
  130. {ltbams-0.9.13 → ltbams-1.0.1}/ams/pypower/__init__.py +0 -0
  131. {ltbams-0.9.13 → ltbams-1.0.1}/ams/pypower/_compat.py +0 -0
  132. {ltbams-0.9.13 → ltbams-1.0.1}/ams/pypower/core/__init__.py +0 -0
  133. {ltbams-0.9.13 → ltbams-1.0.1}/ams/pypower/core/pips.py +0 -0
  134. {ltbams-0.9.13 → ltbams-1.0.1}/ams/pypower/core/ppoption.py +0 -0
  135. {ltbams-0.9.13 → ltbams-1.0.1}/ams/pypower/core/ppver.py +0 -0
  136. {ltbams-0.9.13 → ltbams-1.0.1}/ams/pypower/core/solver.py +0 -0
  137. {ltbams-0.9.13 → ltbams-1.0.1}/ams/pypower/eps.py +0 -0
  138. {ltbams-0.9.13 → ltbams-1.0.1}/ams/pypower/idx.py +0 -0
  139. {ltbams-0.9.13 → ltbams-1.0.1}/ams/pypower/io.py +0 -0
  140. {ltbams-0.9.13 → ltbams-1.0.1}/ams/pypower/make/__init__.py +0 -0
  141. {ltbams-0.9.13 → ltbams-1.0.1}/ams/pypower/make/matrices.py +0 -0
  142. {ltbams-0.9.13 → ltbams-1.0.1}/ams/pypower/make/pdv.py +0 -0
  143. {ltbams-0.9.13 → ltbams-1.0.1}/ams/pypower/routines/__init__.py +0 -0
  144. {ltbams-0.9.13 → ltbams-1.0.1}/ams/pypower/routines/cpf.py +0 -0
  145. {ltbams-0.9.13 → ltbams-1.0.1}/ams/pypower/routines/cpf_callbacks.py +0 -0
  146. {ltbams-0.9.13 → ltbams-1.0.1}/ams/pypower/routines/opf.py +0 -0
  147. {ltbams-0.9.13 → ltbams-1.0.1}/ams/pypower/routines/opffcns.py +0 -0
  148. {ltbams-0.9.13 → ltbams-1.0.1}/ams/pypower/routines/pflow.py +0 -0
  149. {ltbams-0.9.13 → ltbams-1.0.1}/ams/pypower/toggle.py +0 -0
  150. {ltbams-0.9.13 → ltbams-1.0.1}/ams/pypower/utils.py +0 -0
  151. {ltbams-0.9.13 → ltbams-1.0.1}/ams/routines/__init__.py +0 -0
  152. {ltbams-0.9.13 → ltbams-1.0.1}/ams/routines/cpf.py +0 -0
  153. {ltbams-0.9.13 → ltbams-1.0.1}/ams/routines/dopf.py +0 -0
  154. {ltbams-0.9.13 → ltbams-1.0.1}/ams/routines/type.py +0 -0
  155. {ltbams-0.9.13 → ltbams-1.0.1}/ams/routines/uc.py +0 -0
  156. {ltbams-0.9.13 → ltbams-1.0.1}/ams/utils/paths.py +0 -0
  157. {ltbams-0.9.13 → ltbams-1.0.1}/docs/Makefile +0 -0
  158. {ltbams-0.9.13 → ltbams-1.0.1}/docs/make.bat +0 -0
  159. {ltbams-0.9.13 → ltbams-1.0.1}/docs/source/_templates/autosummary/base.rst +0 -0
  160. {ltbams-0.9.13 → ltbams-1.0.1}/docs/source/_templates/autosummary/class.rst +0 -0
  161. {ltbams-0.9.13 → ltbams-1.0.1}/docs/source/_templates/autosummary/module.rst +0 -0
  162. {ltbams-0.9.13 → ltbams-1.0.1}/docs/source/_templates/autosummary/module_toctree.rst +0 -0
  163. {ltbams-0.9.13 → ltbams-1.0.1}/docs/source/api.rst +0 -0
  164. {ltbams-0.9.13 → ltbams-1.0.1}/docs/source/conf.py +0 -0
  165. {ltbams-0.9.13 → ltbams-1.0.1}/docs/source/examples/index.rst +0 -0
  166. {ltbams-0.9.13 → ltbams-1.0.1}/docs/source/genmodelref.py +0 -0
  167. {ltbams-0.9.13 → ltbams-1.0.1}/docs/source/genroutineref.py +0 -0
  168. {ltbams-0.9.13 → ltbams-1.0.1}/docs/source/getting_started/copyright.rst +0 -0
  169. {ltbams-0.9.13 → ltbams-1.0.1}/docs/source/getting_started/formats/index.rst +0 -0
  170. {ltbams-0.9.13 → ltbams-1.0.1}/docs/source/getting_started/formats/matpower.rst +0 -0
  171. {ltbams-0.9.13 → ltbams-1.0.1}/docs/source/getting_started/formats/psse.rst +0 -0
  172. {ltbams-0.9.13 → ltbams-1.0.1}/docs/source/getting_started/formats/pypower.rst +0 -0
  173. {ltbams-0.9.13 → ltbams-1.0.1}/docs/source/getting_started/formats/xlsx.png +0 -0
  174. {ltbams-0.9.13 → ltbams-1.0.1}/docs/source/getting_started/formats/xlsx.rst +0 -0
  175. {ltbams-0.9.13 → ltbams-1.0.1}/docs/source/getting_started/index.rst +0 -0
  176. {ltbams-0.9.13 → ltbams-1.0.1}/docs/source/getting_started/install.rst +0 -0
  177. {ltbams-0.9.13 → ltbams-1.0.1}/docs/source/getting_started/overview.rst +0 -0
  178. {ltbams-0.9.13 → ltbams-1.0.1}/docs/source/getting_started/testcase.rst +0 -0
  179. {ltbams-0.9.13 → ltbams-1.0.1}/docs/source/getting_started/verification.rst +0 -0
  180. {ltbams-0.9.13 → ltbams-1.0.1}/docs/source/images/sponsors/CURENT_Logo_NameOnTrans.png +0 -0
  181. {ltbams-0.9.13 → ltbams-1.0.1}/docs/source/images/sponsors/CURENT_Logo_Transparent.png +0 -0
  182. {ltbams-0.9.13 → ltbams-1.0.1}/docs/source/images/sponsors/CURENT_Logo_Transparent_Name.png +0 -0
  183. {ltbams-0.9.13 → ltbams-1.0.1}/docs/source/images/sponsors/doe.png +0 -0
  184. {ltbams-0.9.13 → ltbams-1.0.1}/docs/source/modeling/example.rst +0 -0
  185. {ltbams-0.9.13 → ltbams-1.0.1}/docs/source/modeling/index.rst +0 -0
  186. {ltbams-0.9.13 → ltbams-1.0.1}/docs/source/modeling/model.rst +0 -0
  187. {ltbams-0.9.13 → ltbams-1.0.1}/docs/source/modeling/system.rst +0 -0
  188. {ltbams-0.9.13 → ltbams-1.0.1}/ltbams.egg-info/dependency_links.txt +0 -0
  189. {ltbams-0.9.13 → ltbams-1.0.1}/setup.cfg +0 -0
  190. {ltbams-0.9.13 → ltbams-1.0.1}/tests/__init__.py +0 -0
  191. {ltbams-0.9.13 → ltbams-1.0.1}/tests/test_1st_system.py +0 -0
  192. {ltbams-0.9.13 → ltbams-1.0.1}/tests/test_addressing.py +0 -0
  193. {ltbams-0.9.13 → ltbams-1.0.1}/tests/test_andes_mats.py +0 -0
  194. {ltbams-0.9.13 → ltbams-1.0.1}/tests/test_cli.py +0 -0
  195. {ltbams-0.9.13 → ltbams-1.0.1}/tests/test_export_csv.py +0 -0
  196. {ltbams-0.9.13 → ltbams-1.0.1}/tests/test_io.py +0 -0
  197. {ltbams-0.9.13 → ltbams-1.0.1}/tests/test_jumper.py +0 -0
  198. {ltbams-0.9.13 → ltbams-1.0.1}/tests/test_known_good.py +0 -0
  199. {ltbams-0.9.13 → ltbams-1.0.1}/tests/test_omodel.py +0 -0
  200. {ltbams-0.9.13 → ltbams-1.0.1}/tests/test_paths.py +0 -0
  201. {ltbams-0.9.13 → ltbams-1.0.1}/tests/test_repr.py +0 -0
  202. {ltbams-0.9.13 → ltbams-1.0.1}/tests/test_routine.py +0 -0
  203. {ltbams-0.9.13 → ltbams-1.0.1}/tests/test_rtn_dcpf.py +0 -0
  204. {ltbams-0.9.13 → ltbams-1.0.1}/tests/test_rtn_pflow.py +0 -0
  205. {ltbams-0.9.13 → ltbams-1.0.1}/versioneer.py +0 -0
@@ -1,6 +1,6 @@
1
1
  AMS: Python Software for Scheduling Modeling and Co-Simulation with Dynanic
2
2
 
3
- Copyright (c) 2023-2024 Jinning Wang
3
+ Copyright (c) 2023-2025 Jinning Wang
4
4
 
5
5
  This program is free software; you can redistribute it and/or modify
6
6
  it under the terms of the GNU General Public License as published by
@@ -1,12 +1,11 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ltbams
3
- Version: 0.9.13
4
- Summary: Python software for scheduling modeling and co-simulation with dynanics.
3
+ Version: 1.0.1
4
+ Summary: Python software for scheduling modeling and co-simulation with dynamics.
5
5
  Home-page: https://github.com/CURENT/ams
6
6
  Author: Jinning Wang
7
- Author-email: jinninggm@gmail.com
8
- License: GNU Public License v3
9
- Platform: UNKNOWN
7
+ Author-email: Jinning Wang <jinninggm@gmail.com>
8
+ License: GPL-3.0-or-later
10
9
  Classifier: Development Status :: 4 - Beta
11
10
  Classifier: Natural Language :: English
12
11
  Classifier: Programming Language :: Python :: 3
@@ -14,24 +13,8 @@ Classifier: License :: OSI Approved :: GNU General Public License v3 or later (G
14
13
  Classifier: Environment :: Console
15
14
  Description-Content-Type: text/markdown
16
15
  Provides-Extra: all
17
- Provides-Extra: coverage
18
16
  Provides-Extra: dev
19
17
  Provides-Extra: doc
20
- Provides-Extra: flake8
21
- Provides-Extra: ipython
22
- Provides-Extra: myst-parser
23
- Provides-Extra: nbsphinx
24
- Provides-Extra: numpydoc
25
- Provides-Extra: pandoc
26
- Provides-Extra: pydata-sphinx-theme
27
- Provides-Extra: pyscipopt
28
- Provides-Extra: pytest
29
- Provides-Extra: pytest-cov
30
- Provides-Extra: sphinx
31
- Provides-Extra: sphinx-copybutton
32
- Provides-Extra: sphinx-panels
33
- Provides-Extra: toml
34
- License-File: LICENSE
35
18
 
36
19
  # LTB AMS
37
20
 
@@ -64,12 +47,14 @@ Python Software for Power System Scheduling Modeling and Co-Simulation with Dyna
64
47
 
65
48
  # Why AMS
66
49
 
67
- With the built-in interface with ANDES, AMS enables **Dynamics Incorporated**
68
- **Stability-Constrained Scheduling**.
50
+ AMS facilitates **Dynamics Incorporated Scheduling** and **Scheduling-Dynamics Co-Simulation**
51
+ through an integrated interface with ANDES.
69
52
 
70
- This package can be helpful for power system engineers, researchers, and students
71
- who need to conduct scheduling studies and transient stability studies at given
72
- operating points.
53
+ This package is helpful for power system engineers, researchers, and students conducting
54
+ scheduling and transient stability studies at specific operating points. It also benefits
55
+ those interested in developing new scheduling formulations and algorithms, particularly
56
+ by extending existing formulations to include new decision variables, constraints, and
57
+ objective functions.
73
58
 
74
59
  AMS is a **Modeling Framework** that provides a descriptive way to formulate
75
60
  scheduling problems. The optimization problems are then handled by **CVXPY**
@@ -78,15 +63,35 @@ and solved with third-party solvers.
78
63
  AMS produces credible scheduling results and competitive performance.
79
64
  The following results show the comparison of DCOPF between AMS and other tools.
80
65
 
81
- | Cost [\$] | AMS | MATPOWER | pandapower |
82
- |----------------:|--------------:|------------:|-----------:|
83
- | PEGASE 1354-Bus | 1,173,590.63 | 1,173,590.63 | 1,173,590.63 |
84
- | PEGASE 2869-Bus | 2,338,915.61 | 2,338,915.61 | 2,338,915.61 |
85
- | GOC 4020-Bus | 793,634.11 | 793,634.11 | 793,634.11 |
86
- | EPIGRIDS 5658-Bus| 1,195,466.12 | 1,195,466.12 | 1,195,466.12 |
87
- | EPIGRIDS 7336-Bus| 1,855,870.94 | 1,855,870.94 | 1,855,870.94 |
88
-
89
- <img src="docs/source/images/dcopf_time.png" alt="DCOPF Time" width="400" height="auto">
66
+ | Cost [\$] | AMS | pandapower | MATPOWER |
67
+ |-----------------------|--------------|--------------|--------------|
68
+ | IEEE 14-Bus | 7,642.59 | 7,642.59 | 7,642.59 |
69
+ | IEEE 39-Bus | 41,263.94 | 41,263.94 | 41,263.94 |
70
+ | PEGASE 89-Bus | 5,733.37 | 5,733.37 | 5,733.37 |
71
+ | IEEE 118-Bus | 125,947.88 | 125,947.88 | 125,947.88 |
72
+ | NPCC 140-Bus | 810,033.37 | 810,016.06 | 810,033.37 |
73
+ | WECC 179-Bus | 411,706.13 | 411,706.13 | 411,706.13 |
74
+ | IEEE 300-Bus | 706,292.32 | 706,292.32 | 706,292.32 |
75
+ | PEGASE 1354-Bus | 1,218,096.86 | 1,218,096.86 | 1,218,096.86 |
76
+ | PEGASE 2869-Bus | 2,386,235.33 | 2,386,235.33 | 2,386,235.33 |
77
+ | GOC 4020-Bus | 793,634.11 | 793,634.11 | 793,634.11 |
78
+ | EPIGRIDS 5658-Bus | 1,195,466.12 | 1,195,466.12 | 1,195,466.12 |
79
+ | EPIGRIDS 7336-Bus | 1,855,870.94 | 1,855,870.94 | 1,855,870.94 |
80
+
81
+ <div style="text-align: left;">
82
+ <img src="docs/source/images/dcopf_time.png" alt="DCOPF Time" width="480" height="auto">
83
+ <p><strong>Figure:</strong> Computation time of OPF on small-scale cases.</p>
84
+ </div>
85
+
86
+ In the bar chart, the gray bar labeled "AMS Symbolic Processing" represents the time spent
87
+ on symbolic processing, while the wheat-colored bar "AMS Numeric Evaluation" represents the
88
+ time spent on system matrices calculation and optimization model construction.
89
+ The orange bar labeled "AMS GUROBI" represents the optimization-solving time using the GUROBI solver.
90
+ Similarly, the red bar labeled "AMS MOSEK" and the pink bar labeled "AMS PIQP" represent the
91
+ time used by the solvers MOSEK and PIQP, respectively.
92
+ Regarding the baselines, the blue and green bars represent the running time of MATPOWER using
93
+ solver MIPS and pandapower using solver PIPS, respectively.
94
+ The results for AMS, pandapower, and matpower are the average time consumed over ten repeat tests.
90
95
 
91
96
  AMS is currently under active development.
92
97
  Use the following resources to get involved.
@@ -99,16 +104,11 @@ Use the following resources to get involved.
99
104
  - Submit contributions using [pull requests][GitHub pull requests]
100
105
  - Read release notes highlighted [here][release notes]
101
106
  - Try in Jupyter Notebook on [Binder][Binder]
102
- <!-- + Check out and and cite our [paper][arxiv paper] -->
107
+ - Check out the source code used for [benchmark][benchmark]
108
+ - Check out and and cite our [paper][paper]
103
109
 
104
110
  # Installation
105
111
 
106
- ***NOTE:***
107
- - Version **0.9.9** has known issues and has been yanked from PyPI
108
- - `kvxopt` is recommended to install via `conda` as sometimes ``pip`` struggles to set the correct path for compiled libraries
109
- - `cvxpy` versions **below 1.5** are incompatible with `numpy` versions **2.0 and above**
110
- - If solver `SCIP` run into import error, try to reinstall its Python interface by running `pip install pyscipopt --no-binary scip --force`
111
-
112
112
  AMS is released as ``ltbams`` on PyPI and conda-forge.
113
113
  Install from PyPI using pip:
114
114
 
@@ -128,6 +128,13 @@ Install from GitHub source:
128
128
  pip install git+https://github.com/CURENT/ams.git
129
129
  ```
130
130
 
131
+ ***NOTE:***
132
+ - Version **0.9.9** has known issues and has been yanked from PyPI
133
+ - `kvxopt` is recommended to install via `conda` as sometimes ``pip`` struggles to set the correct path for compiled libraries
134
+ - `cvxpy` versions **below 1.5** are incompatible with `numpy` versions **2.0 and above**
135
+ - If the solver `SCIP` encounters an import error caused by a missing `libscip.9.1.dylib`, try reinstalling its Python interface by running `pip install pyscipopt --no-binary scip --force`
136
+ - Version **1.0.0** is only available on PyPI
137
+
131
138
  # Example Usage
132
139
 
133
140
  ```python
@@ -149,6 +156,13 @@ sa
149
156
  >>> <andes.system.System at 0x14bd98190>
150
157
  ```
151
158
 
159
+ # Citing AMS
160
+ If you use AMS for research or consulting, please cite the following paper in your publication that uses AMS:
161
+
162
+ ```
163
+ J. Wang et al., "Dynamics-incorporated Modeling Framework for Stability Constrained Scheduling Under High-penetration of Renewable Energy," in IEEE Transactions on Sustainable Energy, doi: 10.1109/TSTE.2025.3528027.
164
+ ```
165
+
152
166
  # Sponsors and Contributors
153
167
  AMS is the scheduling simulation engine for the CURENT Largescale Testbed (LTB).
154
168
  More information about CURENT LTB can be found at the [LTB Repository][LTB Repository].
@@ -184,4 +198,5 @@ Some commercial solvers provide academic licenses, such as COPT, GUROBI, CPLEX,
184
198
  [verification]: https://github.com/CURENT/ams/tree/master/examples/verification
185
199
  [Binder]: https://mybinder.org/v2/gh/curent/ams/master
186
200
  [LTB Repository]: https://github.com/CURENT
187
-
201
+ [benchmark]: https://github.com/CURENT/demo/tree/master/demo/ams_benchmark
202
+ [paper]: https://ieeexplore.ieee.org/document/9169830
@@ -29,12 +29,14 @@ Python Software for Power System Scheduling Modeling and Co-Simulation with Dyna
29
29
 
30
30
  # Why AMS
31
31
 
32
- With the built-in interface with ANDES, AMS enables **Dynamics Incorporated**
33
- **Stability-Constrained Scheduling**.
32
+ AMS facilitates **Dynamics Incorporated Scheduling** and **Scheduling-Dynamics Co-Simulation**
33
+ through an integrated interface with ANDES.
34
34
 
35
- This package can be helpful for power system engineers, researchers, and students
36
- who need to conduct scheduling studies and transient stability studies at given
37
- operating points.
35
+ This package is helpful for power system engineers, researchers, and students conducting
36
+ scheduling and transient stability studies at specific operating points. It also benefits
37
+ those interested in developing new scheduling formulations and algorithms, particularly
38
+ by extending existing formulations to include new decision variables, constraints, and
39
+ objective functions.
38
40
 
39
41
  AMS is a **Modeling Framework** that provides a descriptive way to formulate
40
42
  scheduling problems. The optimization problems are then handled by **CVXPY**
@@ -43,15 +45,35 @@ and solved with third-party solvers.
43
45
  AMS produces credible scheduling results and competitive performance.
44
46
  The following results show the comparison of DCOPF between AMS and other tools.
45
47
 
46
- | Cost [\$] | AMS | MATPOWER | pandapower |
47
- |----------------:|--------------:|------------:|-----------:|
48
- | PEGASE 1354-Bus | 1,173,590.63 | 1,173,590.63 | 1,173,590.63 |
49
- | PEGASE 2869-Bus | 2,338,915.61 | 2,338,915.61 | 2,338,915.61 |
50
- | GOC 4020-Bus | 793,634.11 | 793,634.11 | 793,634.11 |
51
- | EPIGRIDS 5658-Bus| 1,195,466.12 | 1,195,466.12 | 1,195,466.12 |
52
- | EPIGRIDS 7336-Bus| 1,855,870.94 | 1,855,870.94 | 1,855,870.94 |
53
-
54
- <img src="docs/source/images/dcopf_time.png" alt="DCOPF Time" width="400" height="auto">
48
+ | Cost [\$] | AMS | pandapower | MATPOWER |
49
+ |-----------------------|--------------|--------------|--------------|
50
+ | IEEE 14-Bus | 7,642.59 | 7,642.59 | 7,642.59 |
51
+ | IEEE 39-Bus | 41,263.94 | 41,263.94 | 41,263.94 |
52
+ | PEGASE 89-Bus | 5,733.37 | 5,733.37 | 5,733.37 |
53
+ | IEEE 118-Bus | 125,947.88 | 125,947.88 | 125,947.88 |
54
+ | NPCC 140-Bus | 810,033.37 | 810,016.06 | 810,033.37 |
55
+ | WECC 179-Bus | 411,706.13 | 411,706.13 | 411,706.13 |
56
+ | IEEE 300-Bus | 706,292.32 | 706,292.32 | 706,292.32 |
57
+ | PEGASE 1354-Bus | 1,218,096.86 | 1,218,096.86 | 1,218,096.86 |
58
+ | PEGASE 2869-Bus | 2,386,235.33 | 2,386,235.33 | 2,386,235.33 |
59
+ | GOC 4020-Bus | 793,634.11 | 793,634.11 | 793,634.11 |
60
+ | EPIGRIDS 5658-Bus | 1,195,466.12 | 1,195,466.12 | 1,195,466.12 |
61
+ | EPIGRIDS 7336-Bus | 1,855,870.94 | 1,855,870.94 | 1,855,870.94 |
62
+
63
+ <div style="text-align: left;">
64
+ <img src="docs/source/images/dcopf_time.png" alt="DCOPF Time" width="480" height="auto">
65
+ <p><strong>Figure:</strong> Computation time of OPF on small-scale cases.</p>
66
+ </div>
67
+
68
+ In the bar chart, the gray bar labeled "AMS Symbolic Processing" represents the time spent
69
+ on symbolic processing, while the wheat-colored bar "AMS Numeric Evaluation" represents the
70
+ time spent on system matrices calculation and optimization model construction.
71
+ The orange bar labeled "AMS GUROBI" represents the optimization-solving time using the GUROBI solver.
72
+ Similarly, the red bar labeled "AMS MOSEK" and the pink bar labeled "AMS PIQP" represent the
73
+ time used by the solvers MOSEK and PIQP, respectively.
74
+ Regarding the baselines, the blue and green bars represent the running time of MATPOWER using
75
+ solver MIPS and pandapower using solver PIPS, respectively.
76
+ The results for AMS, pandapower, and matpower are the average time consumed over ten repeat tests.
55
77
 
56
78
  AMS is currently under active development.
57
79
  Use the following resources to get involved.
@@ -64,16 +86,11 @@ Use the following resources to get involved.
64
86
  - Submit contributions using [pull requests][GitHub pull requests]
65
87
  - Read release notes highlighted [here][release notes]
66
88
  - Try in Jupyter Notebook on [Binder][Binder]
67
- <!-- + Check out and and cite our [paper][arxiv paper] -->
89
+ - Check out the source code used for [benchmark][benchmark]
90
+ - Check out and and cite our [paper][paper]
68
91
 
69
92
  # Installation
70
93
 
71
- ***NOTE:***
72
- - Version **0.9.9** has known issues and has been yanked from PyPI
73
- - `kvxopt` is recommended to install via `conda` as sometimes ``pip`` struggles to set the correct path for compiled libraries
74
- - `cvxpy` versions **below 1.5** are incompatible with `numpy` versions **2.0 and above**
75
- - If solver `SCIP` run into import error, try to reinstall its Python interface by running `pip install pyscipopt --no-binary scip --force`
76
-
77
94
  AMS is released as ``ltbams`` on PyPI and conda-forge.
78
95
  Install from PyPI using pip:
79
96
 
@@ -93,6 +110,13 @@ Install from GitHub source:
93
110
  pip install git+https://github.com/CURENT/ams.git
94
111
  ```
95
112
 
113
+ ***NOTE:***
114
+ - Version **0.9.9** has known issues and has been yanked from PyPI
115
+ - `kvxopt` is recommended to install via `conda` as sometimes ``pip`` struggles to set the correct path for compiled libraries
116
+ - `cvxpy` versions **below 1.5** are incompatible with `numpy` versions **2.0 and above**
117
+ - If the solver `SCIP` encounters an import error caused by a missing `libscip.9.1.dylib`, try reinstalling its Python interface by running `pip install pyscipopt --no-binary scip --force`
118
+ - Version **1.0.0** is only available on PyPI
119
+
96
120
  # Example Usage
97
121
 
98
122
  ```python
@@ -114,6 +138,13 @@ sa
114
138
  >>> <andes.system.System at 0x14bd98190>
115
139
  ```
116
140
 
141
+ # Citing AMS
142
+ If you use AMS for research or consulting, please cite the following paper in your publication that uses AMS:
143
+
144
+ ```
145
+ J. Wang et al., "Dynamics-incorporated Modeling Framework for Stability Constrained Scheduling Under High-penetration of Renewable Energy," in IEEE Transactions on Sustainable Energy, doi: 10.1109/TSTE.2025.3528027.
146
+ ```
147
+
117
148
  # Sponsors and Contributors
118
149
  AMS is the scheduling simulation engine for the CURENT Largescale Testbed (LTB).
119
150
  More information about CURENT LTB can be found at the [LTB Repository][LTB Repository].
@@ -148,4 +179,6 @@ Some commercial solvers provide academic licenses, such as COPT, GUROBI, CPLEX,
148
179
  [examples]: https://github.com/CURENT/ams/tree/master/examples
149
180
  [verification]: https://github.com/CURENT/ams/tree/master/examples/verification
150
181
  [Binder]: https://mybinder.org/v2/gh/curent/ams/master
151
- [LTB Repository]: https://github.com/CURENT
182
+ [LTB Repository]: https://github.com/CURENT
183
+ [benchmark]: https://github.com/CURENT/demo/tree/master/demo/ams_benchmark
184
+ [paper]: https://ieeexplore.ieee.org/document/9169830
@@ -2,7 +2,6 @@ from . import _version
2
2
  __version__ = _version.get_versions()['version']
3
3
 
4
4
  from ams import opt # NOQA
5
- from ams import benchmarks # NOQA
6
5
 
7
6
  from ams.main import config_logger, load, run # NOQA
8
7
  from ams.system import System # NOQA
@@ -8,11 +8,11 @@ import json
8
8
 
9
9
  version_json = '''
10
10
  {
11
- "date": "2024-12-05T16:49:45-0500",
11
+ "date": "2025-01-26T22:29:13-0500",
12
12
  "dirty": false,
13
13
  "error": null,
14
- "full-revisionid": "db9279e8765429827062032b803c756025c018b2",
15
- "version": "0.9.13"
14
+ "full-revisionid": "26601dec804476dfd457ef35d3eb164c8cede2d0",
15
+ "version": "1.0.1"
16
16
  }
17
17
  ''' # END VERSION_JSON
18
18
 
@@ -514,7 +514,7 @@
514
514
  "name": 3
515
515
  }
516
516
  ],
517
- "Region": [
517
+ "Zone": [
518
518
  {
519
519
  "idx": "ZONE_1",
520
520
  "u": 1.0,
@@ -262,7 +262,7 @@ class MatProcessor:
262
262
  ng = system.StaticGen.n
263
263
 
264
264
  # bus indices: idx -> uid
265
- idx_gen = system.StaticGen.get_idx()
265
+ idx_gen = system.StaticGen.get_all_idxes()
266
266
  u_gen = system.StaticGen.get(src='u', attr='v', idx=idx_gen)
267
267
  on_gen = np.flatnonzero(u_gen) # uid of online generators
268
268
  on_gen_idx = [idx_gen[i] for i in on_gen] # idx of online generators
@@ -15,6 +15,8 @@ from andes.utils.func import list_flatten
15
15
  from ams.core.documenter import Documenter
16
16
  from ams.core.var import Algeb
17
17
 
18
+ from ams.utils.misc import deprec_get_idx
19
+
18
20
  logger = logging.getLogger(__name__)
19
21
 
20
22
 
@@ -51,10 +53,6 @@ class Model:
51
53
  )))
52
54
  self.docum = Documenter(self)
53
55
 
54
- # TODO: duplicate from ANDES, disable for now
55
- # self.syms = SymProcessor(self) # symbolic processor instance
56
- # self.docum = Documenter(self)
57
-
58
56
  def _all_vars(self):
59
57
  """
60
58
  An OrderedDict of States, ExtStates, Algebs, ExtAlgebs
@@ -212,17 +210,17 @@ class Model:
212
210
  self.__dict__[src].__dict__[attr][uid] = value
213
211
  return True
214
212
 
215
- def alter(self, src, idx, value):
213
+ def alter(self, src, idx, value, attr='v'):
216
214
  """
217
215
  Alter values of input parameters or constant service.
218
216
 
219
217
  If the method operates on an input parameter, the new data should be in
220
- the same base as that in the input file. This function will convert the
221
- new value to per unit in the system base.
218
+ the same base as that in the input file. This function will convert
219
+ ``value`` to per unit in the system base whenever necessary.
222
220
 
223
- The values for storing the input data, i.e., the ``vin`` field of the
224
- parameter, will be overwritten, thus the update will be reflected in the
225
- dumped case file.
221
+ The values for storing the input data, i.e., the parameter's ``vin``
222
+ field, will be overwritten. As a result, altered values will be
223
+ reflected in the dumped case file.
226
224
 
227
225
  Parameters
228
226
  ----------
@@ -232,14 +230,31 @@ class Model:
232
230
  The device to alter
233
231
  value : float
234
232
  The desired value
233
+ attr : str
234
+ The attribute to alter, default is 'v'.
235
+
236
+ Notes
237
+ -----
238
+ New in version 0.9.14: Added the signature `attr` to alter specific attributes.
239
+ This feature is useful when you need to manipulate parameter values in the system
240
+ base and ensure that these changes are reflected in the dumped case file.
235
241
  """
242
+
236
243
  instance = self.__dict__[src]
237
244
 
238
245
  if hasattr(instance, 'vin') and (instance.vin is not None):
239
- self.set(src, idx, 'vin', value)
240
- instance.v[:] = instance.vin * instance.pu_coeff
241
- else:
246
+ uid = self.idx2uid(idx)
247
+ if attr == 'vin':
248
+ self.set(src, idx, 'vin', value / instance.pu_coeff[uid])
249
+ self.set(src, idx, 'v', value=value)
250
+ else:
251
+ self.set(src, idx, 'vin', value)
252
+ self.set(src, idx, 'v', value * instance.pu_coeff[uid])
253
+ elif not hasattr(instance, 'vin') and attr == 'vin':
254
+ logger.warning(f"{self.class_name}.{src} has no `vin` attribute, changing `v`.")
242
255
  self.set(src, idx, 'v', value)
256
+ else:
257
+ self.set(src, idx, attr=attr, value=value)
243
258
 
244
259
  def idx2uid(self, idx):
245
260
  """
@@ -286,6 +301,7 @@ class Model:
286
301
  """
287
302
  return self.docum.get(max_width=max_width, export=export)
288
303
 
304
+ @deprec_get_idx
289
305
  def get_idx(self):
290
306
  """
291
307
  Return the index of the model instance.
@@ -294,6 +310,20 @@ class Model:
294
310
  """
295
311
  return self.idx.v
296
312
 
313
+ def get_all_idxes(self):
314
+ """
315
+ Return all the indexes of this model.
316
+
317
+ .. note::
318
+ New in version 1.0.0. Add to follow the group method ``get_all_idxes``.
319
+
320
+ Returns
321
+ -------
322
+ list
323
+ A list of indexes.
324
+ """
325
+ return self.idx.v
326
+
297
327
  def __repr__(self):
298
328
  dev_text = 'device' if self.n == 1 else 'devices'
299
329
 
@@ -12,6 +12,8 @@ from scipy.sparse import issparse
12
12
 
13
13
  from ams.opt import Param
14
14
 
15
+ from ams.utils.misc import deprec_get_idx
16
+
15
17
  logger = logging.getLogger(__name__)
16
18
 
17
19
 
@@ -168,7 +170,7 @@ class RParam(Param):
168
170
  out = self._v
169
171
  elif self.is_group:
170
172
  out = self.owner.get(src=self.src, attr='v',
171
- idx=self.owner.get_idx())
173
+ idx=self.owner.get_all_idxes())
172
174
  else:
173
175
  src_param = getattr(self.owner, self.src)
174
176
  out = getattr(src_param, 'v')
@@ -180,7 +182,7 @@ class RParam(Param):
180
182
  msg += 'likely a modeling error.'
181
183
  raise AttributeError(msg)
182
184
  try:
183
- sorted_idx = self.owner.find_idx(keys=self.indexer, values=imodel.get_idx())
185
+ sorted_idx = self.owner.find_idx(keys=self.indexer, values=imodel.get_all_idxes())
184
186
  except AttributeError:
185
187
  sorted_idx = self.owner.idx.v
186
188
  except Exception as e:
@@ -237,6 +239,7 @@ class RParam(Param):
237
239
  postfix = '' if self.src is None else f'.{self.src}'
238
240
  return f'{self.__class__.__name__}: {owner}' + postfix
239
241
 
242
+ @deprec_get_idx
240
243
  def get_idx(self):
241
244
  """
242
245
  Get the index of the parameter.
@@ -252,7 +255,49 @@ class RParam(Param):
252
255
  """
253
256
  if self.indexer is None:
254
257
  if self.is_group:
255
- return self.owner.get_idx()
258
+ return self.owner.get_all_idxes()
259
+ elif self.owner is None:
260
+ logger.info(f'Param <{self.name}> has no owner.')
261
+ return None
262
+ elif hasattr(self.owner, 'idx'):
263
+ return self.owner.idx.v
264
+ else:
265
+ logger.info(f'Param <{self.name}> owner <{self.owner.class_name}> has no idx.')
266
+ return None
267
+ else:
268
+ try:
269
+ imodel = getattr(self.rtn.system, self.imodel)
270
+ except AttributeError:
271
+ msg = f'Indexer source model <{self.imodel}> not found, '
272
+ msg += 'likely a modeling error.'
273
+ raise AttributeError(msg)
274
+ try:
275
+ sorted_idx = self.owner.find_idx(keys=self.indexer, values=imodel.get_all_idxes())
276
+ except AttributeError:
277
+ msg = f'Indexer <{self.indexer}> not found in <{self.imodel}>, '
278
+ msg += 'likely a modeling error.'
279
+ raise AttributeError(msg)
280
+ return sorted_idx
281
+
282
+ def get_all_idxes(self):
283
+ """
284
+ Get all the indexes of the parameter.
285
+
286
+ .. note::
287
+ New in version 1.0.0.
288
+
289
+ Returns
290
+ -------
291
+ idx : list
292
+ Index of the parameter.
293
+
294
+ Notes
295
+ -----
296
+ - The value will sort by the indexer if indexed.
297
+ """
298
+ if self.indexer is None:
299
+ if self.is_group:
300
+ return self.owner.get_all_idxes()
256
301
  elif self.owner is None:
257
302
  logger.info(f'Param <{self.name}> has no owner.')
258
303
  return None
@@ -269,7 +314,7 @@ class RParam(Param):
269
314
  msg += 'likely a modeling error.'
270
315
  raise AttributeError(msg)
271
316
  try:
272
- sorted_idx = self.owner.find_idx(keys=self.indexer, values=imodel.get_idx())
317
+ sorted_idx = self.owner.find_idx(keys=self.indexer, values=imodel.get_all_idxes())
273
318
  except AttributeError:
274
319
  msg = f'Indexer <{self.indexer}> not found in <{self.imodel}>, '
275
320
  msg += 'likely a modeling error.'
@@ -217,11 +217,11 @@ class LoadScale(ROperationService):
217
217
  @property
218
218
  def v(self):
219
219
  sys = self.rtn.system
220
- u_idx = self.u.get_idx()
220
+ u_idx = self.u.get_all_idxes()
221
221
  ue = self.u.owner.get(src='u', attr='v', idx=u_idx)
222
222
  u_bus = self.u.owner.get(src='bus', attr='v', idx=u_idx)
223
223
  u_zone = sys.Bus.get(src='zone', attr='v', idx=u_bus)
224
- u_yloc = np.array(sys.Region.idx2uid(u_zone))
224
+ u_yloc = np.array(sys.Zone.idx2uid(u_zone))
225
225
  p0s = np.multiply(self.sd.v[:, u_yloc].transpose(),
226
226
  (ue * self.u.v)[:, np.newaxis])
227
227
  if self.sparse:
@@ -587,12 +587,12 @@ class NumHstack(NumOp):
587
587
  class ZonalSum(NumOp):
588
588
  """
589
589
  Build zonal sum matrix for a vector in the shape of collection model,
590
- ``Area`` or ``Region``.
590
+ ``Area`` or ``Zone``.
591
591
  The value array is in the shape of (nr, nc), where nr is the length of
592
592
  rid instance idx, and nc is the length of the cid value.
593
593
 
594
594
  In an IEEE-14 Bus system, we have the zonal definition by the
595
- ``Region`` model. Suppose in it we have two regions, "ZONE1" and
595
+ ``Zone`` model. Suppose in it we have two regions, "ZONE1" and
596
596
  "ZONE2".
597
597
 
598
598
  Follwing it, we have a zonal SFR requirement model ``SFR`` that
@@ -606,7 +606,7 @@ class ZonalSum(NumOp):
606
606
  In the `RTED` model, we have the Vars ``pru`` and ``prd`` in the
607
607
  shape of generators.
608
608
 
609
- Then, the Region model has idx ['ZONE1', 'ZONE2'], and the ``gsm`` value
609
+ Then, the Zone model has idx ['ZONE1', 'ZONE2'], and the ``gsm`` value
610
610
  will be [[1, 1, 0, 0, 1], [0, 0, 1, 1, 0]].
611
611
 
612
612
  Finally, the zonal reserve requirements can be formulated as
@@ -621,7 +621,7 @@ class ZonalSum(NumOp):
621
621
  u : Callable
622
622
  Input.
623
623
  zone : str
624
- Zonal model name, e.g., "Area" or "Region".
624
+ Zonal model name, e.g., "Area" or "Zone".
625
625
  name : str
626
626
  Instance name.
627
627
  tex_name : str
@@ -671,7 +671,7 @@ class ZonalSum(NumOp):
671
671
  try:
672
672
  ridx = zone_mdl.idx.v
673
673
  except AttributeError:
674
- ridx = zone_mdl.get_idx()
674
+ ridx = zone_mdl.get_all_idxes()
675
675
 
676
676
  row, col = np.meshgrid(self.u.v, ridx)
677
677
  # consistency check
@@ -759,7 +759,7 @@ class VarSelect(NumOp):
759
759
  group = model = None
760
760
  if indexer.model in self.rtn.system.groups.keys():
761
761
  group = self.rtn.system.groups[indexer.model]
762
- group_idx = group.get_idx()
762
+ group_idx = group.get_all_idxes()
763
763
  try:
764
764
  ref = group.get(src=indexer.src, attr='v', idx=group_idx)
765
765
  except AttributeError:
@@ -774,7 +774,7 @@ class VarSelect(NumOp):
774
774
  raise AttributeError(f'Indexer source model {indexer.model} has no ref.')
775
775
 
776
776
  try:
777
- uidx = self.u.get_idx()
777
+ uidx = self.u.get_all_idxes()
778
778
  except AttributeError:
779
779
  raise AttributeError(f'Input {self.u.name} has no idx, likey a modeling error.')
780
780