ltbams 1.0.4__tar.gz → 1.0.5__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 (202) hide show
  1. {ltbams-1.0.4/ltbams.egg-info → ltbams-1.0.5}/PKG-INFO +3 -3
  2. {ltbams-1.0.4 → ltbams-1.0.5}/README.md +2 -2
  3. {ltbams-1.0.4 → ltbams-1.0.5}/ams/_version.py +3 -3
  4. {ltbams-1.0.4 → ltbams-1.0.5}/ams/opt/exprcalc.py +3 -1
  5. {ltbams-1.0.4 → ltbams-1.0.5}/ams/routines/__init__.py +1 -0
  6. {ltbams-1.0.4 → ltbams-1.0.5}/ams/routines/dcopf.py +6 -2
  7. ltbams-1.0.5/ams/routines/dcopf2.py +95 -0
  8. {ltbams-1.0.4 → ltbams-1.0.5}/ams/routines/routine.py +2 -0
  9. {ltbams-1.0.4 → ltbams-1.0.5}/docs/source/examples/index.rst +2 -1
  10. {ltbams-1.0.4 → ltbams-1.0.5}/docs/source/release-notes.rst +7 -0
  11. {ltbams-1.0.4 → ltbams-1.0.5/ltbams.egg-info}/PKG-INFO +3 -3
  12. {ltbams-1.0.4 → ltbams-1.0.5}/ltbams.egg-info/SOURCES.txt +2 -0
  13. ltbams-1.0.5/tests/test_rtn_dcopf2.py +103 -0
  14. {ltbams-1.0.4 → ltbams-1.0.5}/CONTRIBUTING.rst +0 -0
  15. {ltbams-1.0.4 → ltbams-1.0.5}/LICENSE +0 -0
  16. {ltbams-1.0.4 → ltbams-1.0.5}/MANIFEST.in +0 -0
  17. {ltbams-1.0.4 → ltbams-1.0.5}/ams/__init__.py +0 -0
  18. {ltbams-1.0.4 → ltbams-1.0.5}/ams/__main__.py +0 -0
  19. {ltbams-1.0.4 → ltbams-1.0.5}/ams/cases/5bus/pjm5bus_demo.xlsx +0 -0
  20. {ltbams-1.0.4 → ltbams-1.0.5}/ams/cases/5bus/pjm5bus_jumper.xlsx +0 -0
  21. {ltbams-1.0.4 → ltbams-1.0.5}/ams/cases/5bus/pjm5bus_uced.json +0 -0
  22. {ltbams-1.0.4 → ltbams-1.0.5}/ams/cases/5bus/pjm5bus_uced.xlsx +0 -0
  23. {ltbams-1.0.4 → ltbams-1.0.5}/ams/cases/5bus/pjm5bus_uced_esd1.xlsx +0 -0
  24. {ltbams-1.0.4 → ltbams-1.0.5}/ams/cases/5bus/pjm5bus_uced_ev.xlsx +0 -0
  25. {ltbams-1.0.4 → ltbams-1.0.5}/ams/cases/ieee123/ieee123.xlsx +0 -0
  26. {ltbams-1.0.4 → ltbams-1.0.5}/ams/cases/ieee123/ieee123_regcv1.xlsx +0 -0
  27. {ltbams-1.0.4 → ltbams-1.0.5}/ams/cases/ieee14/ieee14.json +0 -0
  28. {ltbams-1.0.4 → ltbams-1.0.5}/ams/cases/ieee14/ieee14.raw +0 -0
  29. {ltbams-1.0.4 → ltbams-1.0.5}/ams/cases/ieee14/ieee14_conn.xlsx +0 -0
  30. {ltbams-1.0.4 → ltbams-1.0.5}/ams/cases/ieee14/ieee14_uced.xlsx +0 -0
  31. {ltbams-1.0.4 → ltbams-1.0.5}/ams/cases/ieee39/ieee39.xlsx +0 -0
  32. {ltbams-1.0.4 → ltbams-1.0.5}/ams/cases/ieee39/ieee39_uced.xlsx +0 -0
  33. {ltbams-1.0.4 → ltbams-1.0.5}/ams/cases/ieee39/ieee39_uced_esd1.xlsx +0 -0
  34. {ltbams-1.0.4 → ltbams-1.0.5}/ams/cases/ieee39/ieee39_uced_pvd1.xlsx +0 -0
  35. {ltbams-1.0.4 → ltbams-1.0.5}/ams/cases/ieee39/ieee39_uced_vis.xlsx +0 -0
  36. {ltbams-1.0.4 → ltbams-1.0.5}/ams/cases/matpower/benchmark.json +0 -0
  37. {ltbams-1.0.4 → ltbams-1.0.5}/ams/cases/matpower/case118.m +0 -0
  38. {ltbams-1.0.4 → ltbams-1.0.5}/ams/cases/matpower/case14.m +0 -0
  39. {ltbams-1.0.4 → ltbams-1.0.5}/ams/cases/matpower/case300.m +0 -0
  40. {ltbams-1.0.4 → ltbams-1.0.5}/ams/cases/matpower/case39.m +0 -0
  41. {ltbams-1.0.4 → ltbams-1.0.5}/ams/cases/matpower/case5.m +0 -0
  42. {ltbams-1.0.4 → ltbams-1.0.5}/ams/cases/matpower/case_ACTIVSg2000.m +0 -0
  43. {ltbams-1.0.4 → ltbams-1.0.5}/ams/cases/npcc/npcc.m +0 -0
  44. {ltbams-1.0.4 → ltbams-1.0.5}/ams/cases/npcc/npcc_uced.xlsx +0 -0
  45. {ltbams-1.0.4 → ltbams-1.0.5}/ams/cases/pglib/pglib_opf_case39_epri__api.m +0 -0
  46. {ltbams-1.0.4 → ltbams-1.0.5}/ams/cases/wecc/wecc.m +0 -0
  47. {ltbams-1.0.4 → ltbams-1.0.5}/ams/cases/wecc/wecc_uced.xlsx +0 -0
  48. {ltbams-1.0.4 → ltbams-1.0.5}/ams/cli.py +0 -0
  49. {ltbams-1.0.4 → ltbams-1.0.5}/ams/core/__init__.py +0 -0
  50. {ltbams-1.0.4 → ltbams-1.0.5}/ams/core/documenter.py +0 -0
  51. {ltbams-1.0.4 → ltbams-1.0.5}/ams/core/matprocessor.py +0 -0
  52. {ltbams-1.0.4 → ltbams-1.0.5}/ams/core/model.py +0 -0
  53. {ltbams-1.0.4 → ltbams-1.0.5}/ams/core/param.py +0 -0
  54. {ltbams-1.0.4 → ltbams-1.0.5}/ams/core/service.py +0 -0
  55. {ltbams-1.0.4 → ltbams-1.0.5}/ams/core/symprocessor.py +0 -0
  56. {ltbams-1.0.4 → ltbams-1.0.5}/ams/core/var.py +0 -0
  57. {ltbams-1.0.4 → ltbams-1.0.5}/ams/extension/__init__.py +0 -0
  58. {ltbams-1.0.4 → ltbams-1.0.5}/ams/extension/eva.py +0 -0
  59. {ltbams-1.0.4 → ltbams-1.0.5}/ams/interface.py +0 -0
  60. {ltbams-1.0.4 → ltbams-1.0.5}/ams/io/__init__.py +0 -0
  61. {ltbams-1.0.4 → ltbams-1.0.5}/ams/io/json.py +0 -0
  62. {ltbams-1.0.4 → ltbams-1.0.5}/ams/io/matpower.py +0 -0
  63. {ltbams-1.0.4 → ltbams-1.0.5}/ams/io/psse.py +0 -0
  64. {ltbams-1.0.4 → ltbams-1.0.5}/ams/io/pypower.py +0 -0
  65. {ltbams-1.0.4 → ltbams-1.0.5}/ams/io/xlsx.py +0 -0
  66. {ltbams-1.0.4 → ltbams-1.0.5}/ams/main.py +0 -0
  67. {ltbams-1.0.4 → ltbams-1.0.5}/ams/models/__init__.py +0 -0
  68. {ltbams-1.0.4 → ltbams-1.0.5}/ams/models/area.py +0 -0
  69. {ltbams-1.0.4 → ltbams-1.0.5}/ams/models/bus.py +0 -0
  70. {ltbams-1.0.4 → ltbams-1.0.5}/ams/models/cost.py +0 -0
  71. {ltbams-1.0.4 → ltbams-1.0.5}/ams/models/distributed/__init__.py +0 -0
  72. {ltbams-1.0.4 → ltbams-1.0.5}/ams/models/distributed/esd1.py +0 -0
  73. {ltbams-1.0.4 → ltbams-1.0.5}/ams/models/distributed/ev.py +0 -0
  74. {ltbams-1.0.4 → ltbams-1.0.5}/ams/models/distributed/pvd1.py +0 -0
  75. {ltbams-1.0.4 → ltbams-1.0.5}/ams/models/group.py +0 -0
  76. {ltbams-1.0.4 → ltbams-1.0.5}/ams/models/info.py +0 -0
  77. {ltbams-1.0.4 → ltbams-1.0.5}/ams/models/line.py +0 -0
  78. {ltbams-1.0.4 → ltbams-1.0.5}/ams/models/renewable/__init__.py +0 -0
  79. {ltbams-1.0.4 → ltbams-1.0.5}/ams/models/renewable/regc.py +0 -0
  80. {ltbams-1.0.4 → ltbams-1.0.5}/ams/models/reserve.py +0 -0
  81. {ltbams-1.0.4 → ltbams-1.0.5}/ams/models/shunt.py +0 -0
  82. {ltbams-1.0.4 → ltbams-1.0.5}/ams/models/static/__init__.py +0 -0
  83. {ltbams-1.0.4 → ltbams-1.0.5}/ams/models/static/gen.py +0 -0
  84. {ltbams-1.0.4 → ltbams-1.0.5}/ams/models/static/pq.py +0 -0
  85. {ltbams-1.0.4 → ltbams-1.0.5}/ams/models/timeslot.py +0 -0
  86. {ltbams-1.0.4 → ltbams-1.0.5}/ams/models/zone.py +0 -0
  87. {ltbams-1.0.4 → ltbams-1.0.5}/ams/opt/__init__.py +0 -0
  88. {ltbams-1.0.4 → ltbams-1.0.5}/ams/opt/constraint.py +0 -0
  89. {ltbams-1.0.4 → ltbams-1.0.5}/ams/opt/expression.py +0 -0
  90. {ltbams-1.0.4 → ltbams-1.0.5}/ams/opt/objective.py +0 -0
  91. {ltbams-1.0.4 → ltbams-1.0.5}/ams/opt/omodel.py +0 -0
  92. {ltbams-1.0.4 → ltbams-1.0.5}/ams/opt/optzbase.py +0 -0
  93. {ltbams-1.0.4 → ltbams-1.0.5}/ams/opt/param.py +0 -0
  94. {ltbams-1.0.4 → ltbams-1.0.5}/ams/opt/var.py +0 -0
  95. {ltbams-1.0.4 → ltbams-1.0.5}/ams/pypower/__init__.py +0 -0
  96. {ltbams-1.0.4 → ltbams-1.0.5}/ams/pypower/_compat.py +0 -0
  97. {ltbams-1.0.4 → ltbams-1.0.5}/ams/pypower/core/__init__.py +0 -0
  98. {ltbams-1.0.4 → ltbams-1.0.5}/ams/pypower/core/pips.py +0 -0
  99. {ltbams-1.0.4 → ltbams-1.0.5}/ams/pypower/core/ppoption.py +0 -0
  100. {ltbams-1.0.4 → ltbams-1.0.5}/ams/pypower/core/ppver.py +0 -0
  101. {ltbams-1.0.4 → ltbams-1.0.5}/ams/pypower/core/solver.py +0 -0
  102. {ltbams-1.0.4 → ltbams-1.0.5}/ams/pypower/eps.py +0 -0
  103. {ltbams-1.0.4 → ltbams-1.0.5}/ams/pypower/idx.py +0 -0
  104. {ltbams-1.0.4 → ltbams-1.0.5}/ams/pypower/io.py +0 -0
  105. {ltbams-1.0.4 → ltbams-1.0.5}/ams/pypower/make/__init__.py +0 -0
  106. {ltbams-1.0.4 → ltbams-1.0.5}/ams/pypower/make/matrices.py +0 -0
  107. {ltbams-1.0.4 → ltbams-1.0.5}/ams/pypower/make/pdv.py +0 -0
  108. {ltbams-1.0.4 → ltbams-1.0.5}/ams/pypower/routines/__init__.py +0 -0
  109. {ltbams-1.0.4 → ltbams-1.0.5}/ams/pypower/routines/cpf.py +0 -0
  110. {ltbams-1.0.4 → ltbams-1.0.5}/ams/pypower/routines/cpf_callbacks.py +0 -0
  111. {ltbams-1.0.4 → ltbams-1.0.5}/ams/pypower/routines/opf.py +0 -0
  112. {ltbams-1.0.4 → ltbams-1.0.5}/ams/pypower/routines/opffcns.py +0 -0
  113. {ltbams-1.0.4 → ltbams-1.0.5}/ams/pypower/routines/pflow.py +0 -0
  114. {ltbams-1.0.4 → ltbams-1.0.5}/ams/pypower/toggle.py +0 -0
  115. {ltbams-1.0.4 → ltbams-1.0.5}/ams/pypower/utils.py +0 -0
  116. {ltbams-1.0.4 → ltbams-1.0.5}/ams/report.py +0 -0
  117. {ltbams-1.0.4 → ltbams-1.0.5}/ams/routines/acopf.py +0 -0
  118. {ltbams-1.0.4 → ltbams-1.0.5}/ams/routines/cpf.py +0 -0
  119. {ltbams-1.0.4 → ltbams-1.0.5}/ams/routines/dcpf.py +0 -0
  120. {ltbams-1.0.4 → ltbams-1.0.5}/ams/routines/dcpf0.py +0 -0
  121. {ltbams-1.0.4 → ltbams-1.0.5}/ams/routines/dopf.py +0 -0
  122. {ltbams-1.0.4 → ltbams-1.0.5}/ams/routines/ed.py +0 -0
  123. {ltbams-1.0.4 → ltbams-1.0.5}/ams/routines/pflow.py +0 -0
  124. {ltbams-1.0.4 → ltbams-1.0.5}/ams/routines/pflow0.py +0 -0
  125. {ltbams-1.0.4 → ltbams-1.0.5}/ams/routines/rted.py +0 -0
  126. {ltbams-1.0.4 → ltbams-1.0.5}/ams/routines/type.py +0 -0
  127. {ltbams-1.0.4 → ltbams-1.0.5}/ams/routines/uc.py +0 -0
  128. {ltbams-1.0.4 → ltbams-1.0.5}/ams/shared.py +0 -0
  129. {ltbams-1.0.4 → ltbams-1.0.5}/ams/system.py +0 -0
  130. {ltbams-1.0.4 → ltbams-1.0.5}/ams/utils/__init__.py +0 -0
  131. {ltbams-1.0.4 → ltbams-1.0.5}/ams/utils/misc.py +0 -0
  132. {ltbams-1.0.4 → ltbams-1.0.5}/ams/utils/paths.py +0 -0
  133. {ltbams-1.0.4 → ltbams-1.0.5}/docs/Makefile +0 -0
  134. {ltbams-1.0.4 → ltbams-1.0.5}/docs/make.bat +0 -0
  135. {ltbams-1.0.4 → ltbams-1.0.5}/docs/source/_templates/autosummary/base.rst +0 -0
  136. {ltbams-1.0.4 → ltbams-1.0.5}/docs/source/_templates/autosummary/class.rst +0 -0
  137. {ltbams-1.0.4 → ltbams-1.0.5}/docs/source/_templates/autosummary/module.rst +0 -0
  138. {ltbams-1.0.4 → ltbams-1.0.5}/docs/source/_templates/autosummary/module_toctree.rst +0 -0
  139. {ltbams-1.0.4 → ltbams-1.0.5}/docs/source/api.rst +0 -0
  140. {ltbams-1.0.4 → ltbams-1.0.5}/docs/source/conf.py +0 -0
  141. {ltbams-1.0.4 → ltbams-1.0.5}/docs/source/genmodelref.py +0 -0
  142. {ltbams-1.0.4 → ltbams-1.0.5}/docs/source/genroutineref.py +0 -0
  143. {ltbams-1.0.4 → ltbams-1.0.5}/docs/source/getting_started/copyright.rst +0 -0
  144. {ltbams-1.0.4 → ltbams-1.0.5}/docs/source/getting_started/formats/index.rst +0 -0
  145. {ltbams-1.0.4 → ltbams-1.0.5}/docs/source/getting_started/formats/matpower.rst +0 -0
  146. {ltbams-1.0.4 → ltbams-1.0.5}/docs/source/getting_started/formats/psse.rst +0 -0
  147. {ltbams-1.0.4 → ltbams-1.0.5}/docs/source/getting_started/formats/pypower.rst +0 -0
  148. {ltbams-1.0.4 → ltbams-1.0.5}/docs/source/getting_started/formats/xlsx.png +0 -0
  149. {ltbams-1.0.4 → ltbams-1.0.5}/docs/source/getting_started/formats/xlsx.rst +0 -0
  150. {ltbams-1.0.4 → ltbams-1.0.5}/docs/source/getting_started/index.rst +0 -0
  151. {ltbams-1.0.4 → ltbams-1.0.5}/docs/source/getting_started/install.rst +0 -0
  152. {ltbams-1.0.4 → ltbams-1.0.5}/docs/source/getting_started/overview.rst +0 -0
  153. {ltbams-1.0.4 → ltbams-1.0.5}/docs/source/getting_started/testcase.rst +0 -0
  154. {ltbams-1.0.4 → ltbams-1.0.5}/docs/source/getting_started/verification.rst +0 -0
  155. {ltbams-1.0.4 → ltbams-1.0.5}/docs/source/images/curent.ico +0 -0
  156. {ltbams-1.0.4 → ltbams-1.0.5}/docs/source/images/dcopf_time.png +0 -0
  157. {ltbams-1.0.4 → ltbams-1.0.5}/docs/source/images/sponsors/CURENT_Logo_NameOnTrans.png +0 -0
  158. {ltbams-1.0.4 → ltbams-1.0.5}/docs/source/images/sponsors/CURENT_Logo_Transparent.png +0 -0
  159. {ltbams-1.0.4 → ltbams-1.0.5}/docs/source/images/sponsors/CURENT_Logo_Transparent_Name.png +0 -0
  160. {ltbams-1.0.4 → ltbams-1.0.5}/docs/source/images/sponsors/doe.png +0 -0
  161. {ltbams-1.0.4 → ltbams-1.0.5}/docs/source/index.rst +0 -0
  162. {ltbams-1.0.4 → ltbams-1.0.5}/docs/source/modeling/example.rst +0 -0
  163. {ltbams-1.0.4 → ltbams-1.0.5}/docs/source/modeling/index.rst +0 -0
  164. {ltbams-1.0.4 → ltbams-1.0.5}/docs/source/modeling/model.rst +0 -0
  165. {ltbams-1.0.4 → ltbams-1.0.5}/docs/source/modeling/routine.rst +0 -0
  166. {ltbams-1.0.4 → ltbams-1.0.5}/docs/source/modeling/system.rst +0 -0
  167. {ltbams-1.0.4 → ltbams-1.0.5}/ltbams.egg-info/dependency_links.txt +0 -0
  168. {ltbams-1.0.4 → ltbams-1.0.5}/ltbams.egg-info/entry_points.txt +0 -0
  169. {ltbams-1.0.4 → ltbams-1.0.5}/ltbams.egg-info/requires.txt +0 -0
  170. {ltbams-1.0.4 → ltbams-1.0.5}/ltbams.egg-info/top_level.txt +0 -0
  171. {ltbams-1.0.4 → ltbams-1.0.5}/pyproject.toml +0 -0
  172. {ltbams-1.0.4 → ltbams-1.0.5}/requirements-dev.txt +0 -0
  173. {ltbams-1.0.4 → ltbams-1.0.5}/requirements.txt +0 -0
  174. {ltbams-1.0.4 → ltbams-1.0.5}/setup.cfg +0 -0
  175. {ltbams-1.0.4 → ltbams-1.0.5}/setup.py +0 -0
  176. {ltbams-1.0.4 → ltbams-1.0.5}/tests/__init__.py +0 -0
  177. {ltbams-1.0.4 → ltbams-1.0.5}/tests/test_1st_system.py +0 -0
  178. {ltbams-1.0.4 → ltbams-1.0.5}/tests/test_addressing.py +0 -0
  179. {ltbams-1.0.4 → ltbams-1.0.5}/tests/test_andes_mats.py +0 -0
  180. {ltbams-1.0.4 → ltbams-1.0.5}/tests/test_case.py +0 -0
  181. {ltbams-1.0.4 → ltbams-1.0.5}/tests/test_cli.py +0 -0
  182. {ltbams-1.0.4 → ltbams-1.0.5}/tests/test_export_csv.py +0 -0
  183. {ltbams-1.0.4 → ltbams-1.0.5}/tests/test_group.py +0 -0
  184. {ltbams-1.0.4 → ltbams-1.0.5}/tests/test_interface.py +0 -0
  185. {ltbams-1.0.4 → ltbams-1.0.5}/tests/test_io.py +0 -0
  186. {ltbams-1.0.4 → ltbams-1.0.5}/tests/test_jumper.py +0 -0
  187. {ltbams-1.0.4 → ltbams-1.0.5}/tests/test_known_good.py +0 -0
  188. {ltbams-1.0.4 → ltbams-1.0.5}/tests/test_matp.py +0 -0
  189. {ltbams-1.0.4 → ltbams-1.0.5}/tests/test_model.py +0 -0
  190. {ltbams-1.0.4 → ltbams-1.0.5}/tests/test_omodel.py +0 -0
  191. {ltbams-1.0.4 → ltbams-1.0.5}/tests/test_paths.py +0 -0
  192. {ltbams-1.0.4 → ltbams-1.0.5}/tests/test_report.py +0 -0
  193. {ltbams-1.0.4 → ltbams-1.0.5}/tests/test_repr.py +0 -0
  194. {ltbams-1.0.4 → ltbams-1.0.5}/tests/test_routine.py +0 -0
  195. {ltbams-1.0.4 → ltbams-1.0.5}/tests/test_rtn_dcopf.py +0 -0
  196. {ltbams-1.0.4 → ltbams-1.0.5}/tests/test_rtn_dcpf.py +0 -0
  197. {ltbams-1.0.4 → ltbams-1.0.5}/tests/test_rtn_ed.py +0 -0
  198. {ltbams-1.0.4 → ltbams-1.0.5}/tests/test_rtn_pflow.py +0 -0
  199. {ltbams-1.0.4 → ltbams-1.0.5}/tests/test_rtn_rted.py +0 -0
  200. {ltbams-1.0.4 → ltbams-1.0.5}/tests/test_rtn_uc.py +0 -0
  201. {ltbams-1.0.4 → ltbams-1.0.5}/tests/test_service.py +0 -0
  202. {ltbams-1.0.4 → ltbams-1.0.5}/versioneer.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ltbams
3
- Version: 1.0.4
3
+ Version: 1.0.5
4
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
@@ -37,7 +37,7 @@ Python Software for Power System Scheduling Modeling and Co-Simulation with Dyna
37
37
  [![Project Status: Active – The project has reached a stable, usable state and is being actively developed.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active)
38
38
  [![codecov](https://codecov.io/gh/CURENT/ams/graph/badge.svg?token=RZI5GLLBQH)](https://codecov.io/gh/CURENT/ams)
39
39
 
40
- ![GitHub Tag](https://img.shields.io/github/v/tag/CURENT/ams)
40
+ [![GitHub Tag](https://img.shields.io/github/v/tag/CURENT/ams)](https://github.com/CURENT/ams/tags)
41
41
  ![GitHub commits since latest release (branch)](https://img.shields.io/github/commits-since/curent/ams/latest/develop)
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/)
@@ -152,7 +152,7 @@ pip install git+https://github.com/CURENT/ams.git
152
152
  - `cvxpy` is distributed with the open source solvers CLARABEL, OSQP, and SCS, but MIP-capable solvers need separate installation
153
153
  - `cvxpy` versions **below 1.5** are incompatible with `numpy` versions **2.0 and above**
154
154
  - 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`
155
- - `kvxopt` is recommended to install via `conda` as sometimes ``pip`` struggles to set the correct path for compiled libraries
155
+ - `kvxopt` is recommended to install via `conda` as sometimes ``pip`` struggles to set the correct path for compiled libraries, more detailes can be found in this closed issue [Bug with dependency kvxopt 1.3.2.0](https://github.com/CURENT/andes/issues/508)
156
156
  - Versions **1.0.0** and **1.0.1** are only available on PyPI
157
157
  - Version **0.9.9** has known issues and has been yanked from PyPI
158
158
 
@@ -9,7 +9,7 @@ Python Software for Power System Scheduling Modeling and Co-Simulation with Dyna
9
9
  [![Project Status: Active – The project has reached a stable, usable state and is being actively developed.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active)
10
10
  [![codecov](https://codecov.io/gh/CURENT/ams/graph/badge.svg?token=RZI5GLLBQH)](https://codecov.io/gh/CURENT/ams)
11
11
 
12
- ![GitHub Tag](https://img.shields.io/github/v/tag/CURENT/ams)
12
+ [![GitHub Tag](https://img.shields.io/github/v/tag/CURENT/ams)](https://github.com/CURENT/ams/tags)
13
13
  ![GitHub commits since latest release (branch)](https://img.shields.io/github/commits-since/curent/ams/latest/develop)
14
14
  [![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/)
15
15
  [![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/)
@@ -124,7 +124,7 @@ pip install git+https://github.com/CURENT/ams.git
124
124
  - `cvxpy` is distributed with the open source solvers CLARABEL, OSQP, and SCS, but MIP-capable solvers need separate installation
125
125
  - `cvxpy` versions **below 1.5** are incompatible with `numpy` versions **2.0 and above**
126
126
  - 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`
127
- - `kvxopt` is recommended to install via `conda` as sometimes ``pip`` struggles to set the correct path for compiled libraries
127
+ - `kvxopt` is recommended to install via `conda` as sometimes ``pip`` struggles to set the correct path for compiled libraries, more detailes can be found in this closed issue [Bug with dependency kvxopt 1.3.2.0](https://github.com/CURENT/andes/issues/508)
128
128
  - Versions **1.0.0** and **1.0.1** are only available on PyPI
129
129
  - Version **0.9.9** has known issues and has been yanked from PyPI
130
130
 
@@ -8,11 +8,11 @@ import json
8
8
 
9
9
  version_json = '''
10
10
  {
11
- "date": "2025-04-05T23:02:48-0400",
11
+ "date": "2025-04-09T22:08:11-0400",
12
12
  "dirty": false,
13
13
  "error": null,
14
- "full-revisionid": "af7a4e10ba2e35c4180562cf62f69ba5523c6725",
15
- "version": "1.0.4"
14
+ "full-revisionid": "115b1575b21ff871fe878121b3ca1cb6020b1a93",
15
+ "version": "1.0.5"
16
16
  }
17
17
  ''' # END VERSION_JSON
18
18
 
@@ -8,6 +8,8 @@ import re
8
8
 
9
9
  import numpy as np
10
10
 
11
+ from ams.shared import sps # NOQA
12
+
11
13
  import cvxpy as cp
12
14
 
13
15
  from ams.utils import pretty_long_message
@@ -68,7 +70,7 @@ class ExpressionCalc(OptzBase):
68
70
  msg = f" - Expression <{self.name}>: {self.code}"
69
71
  logger.debug(pretty_long_message(msg, _prefix, max_length=_max_length))
70
72
  try:
71
- local_vars = {'self': self, 'np': np, 'cp': cp}
73
+ local_vars = {'self': self, 'np': np, 'cp': cp, 'sps': sps}
72
74
  self.optz = self._evaluate_expression(self.code, local_vars=local_vars)
73
75
  except Exception as e:
74
76
  raise Exception(f"Error in evaluating ExpressionCalc <{self.name}>.\n{e}")
@@ -11,6 +11,7 @@ all_routines = OrderedDict([
11
11
  ('cpf', ['CPF']),
12
12
  ('acopf', ['ACOPF']),
13
13
  ('dcopf', ['DCOPF']),
14
+ ('dcopf2', ['DCOPF2']),
14
15
  ('ed', ['ED', 'EDDG', 'EDES']),
15
16
  ('rted', ['RTED', 'RTEDDG', 'RTEDES', 'RTEDVIS']),
16
17
  ('uc', ['UC', 'UCDG', 'UCES']),
@@ -19,7 +19,11 @@ class DCOPF(DCPFBase):
19
19
  """
20
20
  DC optimal power flow (DCOPF).
21
21
 
22
- The nodal price is calculated as ``pi`` in ``pic``.
22
+ Notes
23
+ -----
24
+ 1. The nodal price is calculated as ``pi`` in ``pic``.
25
+ 1. Devices online status of `StaticGen`, `StaticLoad`, and `Shunt` are considered in the connectivity
26
+ matrices `Cft`, `Cg`, `Cl`, and `Csh`.
23
27
 
24
28
  References
25
29
  ----------
@@ -153,7 +157,7 @@ class DCOPF(DCPFBase):
153
157
  Parameters
154
158
  ----------
155
159
  kloss : float, optional
156
- The loss factor for the conversion. Defaults to 1.2.
160
+ The loss factor for the conversion. Defaults to 1.0.
157
161
  """
158
162
  exec_time = self.exec_time
159
163
  if self.exec_time == 0 or self.exit_code != 0:
@@ -0,0 +1,95 @@
1
+ """
2
+ DCOPF routines.
3
+ """
4
+ import logging
5
+
6
+ import numpy as np
7
+ from ams.core.param import RParam
8
+ from ams.core.service import NumOp
9
+
10
+ from ams.routines.dcopf import DCOPF
11
+ from ams.opt import ExpressionCalc
12
+
13
+ from ams.shared import sps
14
+
15
+
16
+ logger = logging.getLogger(__name__)
17
+
18
+
19
+ class DCOPF2(DCOPF):
20
+ """
21
+ DC optimal power flow (DCOPF) using PTDF.
22
+ For large cases, it is recommended to build the PTDF first, especially when incremental
23
+ build is necessary.
24
+
25
+ Notes
26
+ -----
27
+ 1. This routine requires PTDF matrix.
28
+ 1. Nodal price ``pi`` is calculated with three parts.
29
+ 1. Bus angle ``aBus`` is calculated after solving the problem.
30
+ """
31
+
32
+ def __init__(self, system, config):
33
+ DCOPF.__init__(self, system, config)
34
+ self.info = 'DCOPF using PTDF'
35
+ self.type = 'DCED'
36
+
37
+ # NOTE: in this way, we still follow the implementation that devices
38
+ # connectivity status is considered in connection matrix
39
+ self.ued = NumOp(u=self.Cl,
40
+ name='ued', tex_name=r'u_{e,d}',
41
+ info='Effective load connection status',
42
+ fun=np.sum, args=dict(axis=0),
43
+ no_parse=True)
44
+ self.uesh = NumOp(u=self.Csh,
45
+ name='uesh', tex_name=r'u_{e,sh}',
46
+ info='Effective shunt connection status',
47
+ fun=np.sum, args=dict(axis=0),
48
+ no_parse=True)
49
+
50
+ self.PTDF = RParam(info='PTDF',
51
+ name='PTDF', tex_name=r'P_{TDF}',
52
+ model='mats', src='PTDF',
53
+ no_parse=True, sparse=True)
54
+
55
+ # --- rewrite Expression plf: line flow---
56
+ self.plf.e_str = 'PTDF @ (Cg@pg - Cl@pd - Csh@gsh - Pbusinj)'
57
+
58
+ # --- rewrite nodal price ---
59
+ self.Cft = RParam(info='Line connection matrix',
60
+ name='Cft', tex_name=r'C_{ft}',
61
+ model='mats', src='Cft',
62
+ no_parse=True, sparse=True,)
63
+ self.pilb = ExpressionCalc(info='Congestion price, dual of <plflb>',
64
+ name='pilb',
65
+ model='Line', src=None,
66
+ e_str='plflb.dual_variables[0]')
67
+ self.piub = ExpressionCalc(info='Congestion price, dual of <plfub>',
68
+ name='piub',
69
+ model='Line', src=None,
70
+ e_str='plfub.dual_variables[0]')
71
+ self.pib = ExpressionCalc(info='Energy price, dual of <pb>',
72
+ name='pib',
73
+ model='Bus', src=None,
74
+ e_str='pb.dual_variables[0]')
75
+ pi = 'pb.dual_variables[0] + Cft@(plfub.dual_variables[0] - plflb.dual_variables[0])'
76
+ self.pi.e_str = pi
77
+
78
+ def _post_solve(self):
79
+ """Calculate aBus"""
80
+ super()._post_solve()
81
+ sys = self.system
82
+ Pbus = sys.mats.Cg._v @ self.pg.v
83
+ Pbus -= sys.mats.Cl._v @ self.pd.v
84
+ Pbus -= sys.mats.Csh._v @ self.gsh.v
85
+ Pbus -= self.Pbusinj.v
86
+ aBus = sps.linalg.spsolve(sys.mats.Bbus._v, Pbus)
87
+ slack0_uid = sys.Bus.idx2uid(sys.Slack.bus.v[0])
88
+ self.aBus.v = aBus - aBus[slack0_uid]
89
+ return super()._post_solve()
90
+
91
+ def init(self, **kwargs):
92
+ if self.system.mats.PTDF._v is None:
93
+ logger.warning('PTDF is not available, build it now')
94
+ self.system.mats.build_ptdf()
95
+ return super().init(**kwargs)
@@ -585,6 +585,8 @@ class RoutineBase:
585
585
  True to rebuild the system matrices. Set to False to speed up the process
586
586
  if no system matrices are changed.
587
587
  """
588
+ if not self.initialized:
589
+ return self.init()
588
590
  t0, _ = elapsed()
589
591
  re_finalize = False
590
592
  # sanitize input
@@ -31,4 +31,5 @@ folder of the repository
31
31
 
32
32
  ../_examples/demo/demo_ESD1.ipynb
33
33
  ../_examples/demo/demo_AGC.ipynb
34
- ../_examples/demo/demo_debug.ipynb
34
+ ../_examples/demo/demo_debug.ipynb
35
+ ../_examples/demo/demo_mat.ipynb
@@ -9,6 +9,13 @@ The APIs before v3.0.0 are in beta and may change without prior notice.
9
9
  v1.0
10
10
  ==========
11
11
 
12
+ v1.0.5 (2024-04-09)
13
+ --------------------
14
+
15
+ - Include sensitivity matrices calculation demo in documentation
16
+ - Add ``DCOPF2``, a PTDF-based DCOPF routine
17
+ - Fix bug when update routine parameters before it is initialized
18
+
12
19
  v1.0.4 (2024-04-05)
13
20
  --------------------
14
21
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ltbams
3
- Version: 1.0.4
3
+ Version: 1.0.5
4
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
@@ -37,7 +37,7 @@ Python Software for Power System Scheduling Modeling and Co-Simulation with Dyna
37
37
  [![Project Status: Active – The project has reached a stable, usable state and is being actively developed.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active)
38
38
  [![codecov](https://codecov.io/gh/CURENT/ams/graph/badge.svg?token=RZI5GLLBQH)](https://codecov.io/gh/CURENT/ams)
39
39
 
40
- ![GitHub Tag](https://img.shields.io/github/v/tag/CURENT/ams)
40
+ [![GitHub Tag](https://img.shields.io/github/v/tag/CURENT/ams)](https://github.com/CURENT/ams/tags)
41
41
  ![GitHub commits since latest release (branch)](https://img.shields.io/github/commits-since/curent/ams/latest/develop)
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/)
@@ -152,7 +152,7 @@ pip install git+https://github.com/CURENT/ams.git
152
152
  - `cvxpy` is distributed with the open source solvers CLARABEL, OSQP, and SCS, but MIP-capable solvers need separate installation
153
153
  - `cvxpy` versions **below 1.5** are incompatible with `numpy` versions **2.0 and above**
154
154
  - 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`
155
- - `kvxopt` is recommended to install via `conda` as sometimes ``pip`` struggles to set the correct path for compiled libraries
155
+ - `kvxopt` is recommended to install via `conda` as sometimes ``pip`` struggles to set the correct path for compiled libraries, more detailes can be found in this closed issue [Bug with dependency kvxopt 1.3.2.0](https://github.com/CURENT/andes/issues/508)
156
156
  - Versions **1.0.0** and **1.0.1** are only available on PyPI
157
157
  - Version **0.9.9** has known issues and has been yanked from PyPI
158
158
 
@@ -116,6 +116,7 @@ ams/routines/__init__.py
116
116
  ams/routines/acopf.py
117
117
  ams/routines/cpf.py
118
118
  ams/routines/dcopf.py
119
+ ams/routines/dcopf2.py
119
120
  ams/routines/dcpf.py
120
121
  ams/routines/dcpf0.py
121
122
  ams/routines/dopf.py
@@ -191,6 +192,7 @@ tests/test_report.py
191
192
  tests/test_repr.py
192
193
  tests/test_routine.py
193
194
  tests/test_rtn_dcopf.py
195
+ tests/test_rtn_dcopf2.py
194
196
  tests/test_rtn_dcpf.py
195
197
  tests/test_rtn_ed.py
196
198
  tests/test_rtn_pflow.py
@@ -0,0 +1,103 @@
1
+ import unittest
2
+ import numpy as np
3
+
4
+ import ams
5
+
6
+
7
+ class TestDCOPF2(unittest.TestCase):
8
+ """
9
+ Test routine `DCOPF2`.
10
+ """
11
+
12
+ def setUp(self) -> None:
13
+ self.ss = ams.load(ams.get_case("5bus/pjm5bus_demo.xlsx"),
14
+ setup=True, default_config=True, no_output=True)
15
+ # decrease load first
16
+ self.ss.PQ.set(src='p0', attr='v', idx=['PQ_1', 'PQ_2'], value=[0.3, 0.3])
17
+ # build PTDF
18
+ self.ss.mats.build_ptdf()
19
+
20
+ def test_init(self):
21
+ """
22
+ Test initialization.
23
+ """
24
+ self.ss.DCOPF2.init()
25
+ self.assertTrue(self.ss.DCOPF2.initialized, "DCOPF2 initialization failed!")
26
+
27
+ def test_trip_gen(self):
28
+ """
29
+ Test generator tripping.
30
+ """
31
+ stg = 'PV_1'
32
+ self.ss.StaticGen.set(src='u', idx=stg, attr='v', value=0)
33
+
34
+ self.ss.DCOPF2.update()
35
+ self.ss.DCOPF2.run(solver='CLARABEL')
36
+ self.assertTrue(self.ss.DCOPF2.converged, "DCOPF2 did not converge under generator trip!")
37
+ self.assertAlmostEqual(self.ss.DCOPF2.get(src='pg', attr='v', idx=stg),
38
+ 0, places=6,
39
+ msg="Generator trip does not take effect!")
40
+
41
+ self.ss.StaticGen.set(src='u', idx=stg, attr='v', value=1) # reset
42
+
43
+ def test_trip_line(self):
44
+ """
45
+ Test line tripping.
46
+ """
47
+ self.ss.Line.set(src='u', attr='v', idx='Line_3', value=0)
48
+
49
+ self.ss.DCOPF2.update()
50
+ self.ss.DCOPF2.run(solver='CLARABEL')
51
+ self.assertTrue(self.ss.DCOPF2.converged, "DCOPF2 did not converge under line trip!")
52
+ self.assertAlmostEqual(self.ss.DCOPF2.get(src='plf', attr='v', idx='Line_3'),
53
+ 0, places=6,
54
+ msg="Line trip does not take effect!")
55
+
56
+ self.ss.Line.alter(src='u', idx='Line_3', value=1) # reset
57
+
58
+ def test_set_load(self):
59
+ """
60
+ Test setting and tripping load.
61
+ """
62
+ # --- run DCOPF2 ---
63
+ self.ss.DCOPF2.run(solver='CLARABEL')
64
+ pgs = self.ss.DCOPF2.pg.v.sum()
65
+
66
+ # --- set load ---
67
+ self.ss.PQ.set(src='p0', attr='v', idx='PQ_1', value=0.1)
68
+ self.ss.DCOPF2.update()
69
+
70
+ self.ss.DCOPF2.run(solver='CLARABEL')
71
+ pgs_pqt = self.ss.DCOPF2.pg.v.sum()
72
+ self.assertLess(pgs_pqt, pgs, "Load set does not take effect!")
73
+
74
+ # --- trip load ---
75
+ self.ss.PQ.set(src='u', attr='v', idx='PQ_2', value=0)
76
+ self.ss.DCOPF2.update()
77
+
78
+ self.ss.DCOPF2.run(solver='CLARABEL')
79
+ pgs_pqt2 = self.ss.DCOPF2.pg.v.sum()
80
+ self.assertLess(pgs_pqt2, pgs_pqt, "Load trip does not take effect!")
81
+
82
+ def test_dc2ac(self):
83
+ """
84
+ Test `DCOPF2.dc2ac()` method.
85
+ """
86
+ self.ss.DCOPF2.run(solver='CLARABEL')
87
+ self.ss.DCOPF2.dc2ac()
88
+ self.assertTrue(self.ss.DCOPF2.converted, "AC conversion failed!")
89
+ self.assertTrue(self.ss.DCOPF2.exec_time > 0, "Execution time is not greater than 0.")
90
+
91
+ stg_idx = self.ss.StaticGen.get_all_idxes()
92
+ pg_dcopf = self.ss.DCOPF2.get(src='pg', attr='v', idx=stg_idx)
93
+ pg_acopf = self.ss.ACOPF.get(src='pg', attr='v', idx=stg_idx)
94
+ np.testing.assert_almost_equal(pg_dcopf, pg_acopf, decimal=3)
95
+
96
+ bus_idx = self.ss.Bus.get_all_idxes()
97
+ v_dcopf = self.ss.DCOPF2.get(src='vBus', attr='v', idx=bus_idx)
98
+ v_acopf = self.ss.ACOPF.get(src='vBus', attr='v', idx=bus_idx)
99
+ np.testing.assert_almost_equal(v_dcopf, v_acopf, decimal=3)
100
+
101
+ a_dcopf = self.ss.DCOPF2.get(src='aBus', attr='v', idx=bus_idx)
102
+ a_acopf = self.ss.ACOPF.get(src='aBus', attr='v', idx=bus_idx)
103
+ np.testing.assert_almost_equal(a_dcopf, a_acopf, decimal=3)
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes