ltbams 1.0.9__py3-none-any.whl → 1.0.10__py3-none-any.whl
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.
- ams/__init__.py +0 -1
- ams/_version.py +3 -3
- ams/cases/5bus/pjm5bus_demo.json +1324 -0
- ams/core/__init__.py +1 -0
- ams/core/common.py +30 -0
- ams/core/model.py +1 -1
- ams/core/symprocessor.py +1 -1
- ams/extension/eva.py +1 -1
- ams/interface.py +40 -24
- ams/io/matpower.py +31 -17
- ams/io/psse.py +278 -1
- ams/main.py +2 -2
- ams/models/group.py +2 -1
- ams/models/static/pq.py +7 -3
- ams/opt/param.py +1 -2
- ams/routines/__init__.py +2 -3
- ams/routines/acopf.py +5 -108
- ams/routines/dcopf.py +8 -0
- ams/routines/dcpf.py +1 -1
- ams/routines/ed.py +4 -2
- ams/routines/grbopt.py +150 -0
- ams/routines/pflow.py +2 -2
- ams/routines/pypower.py +631 -0
- ams/routines/routine.py +4 -10
- ams/routines/uc.py +2 -2
- ams/shared.py +26 -43
- ams/system.py +118 -2
- docs/source/api.rst +2 -0
- docs/source/getting_started/install.rst +9 -6
- docs/source/images/dcopf_time.png +0 -0
- docs/source/images/educ_pie.png +0 -0
- docs/source/release-notes.rst +21 -47
- {ltbams-1.0.9.dist-info → ltbams-1.0.10.dist-info}/METADATA +87 -47
- {ltbams-1.0.9.dist-info → ltbams-1.0.10.dist-info}/RECORD +54 -71
- {ltbams-1.0.9.dist-info → ltbams-1.0.10.dist-info}/WHEEL +1 -1
- tests/test_1st_system.py +1 -1
- tests/test_case.py +14 -14
- tests/test_export_csv.py +1 -1
- tests/test_interface.py +24 -2
- tests/test_io.py +50 -0
- tests/test_omodel.py +1 -1
- tests/test_report.py +6 -6
- tests/test_routine.py +2 -2
- tests/test_rtn_acopf.py +75 -0
- tests/test_rtn_dcopf.py +1 -1
- tests/test_rtn_dcopf2.py +1 -1
- tests/test_rtn_ed.py +9 -9
- tests/test_rtn_opf.py +142 -0
- tests/test_rtn_pflow.py +0 -72
- tests/test_rtn_pypower.py +315 -0
- tests/test_rtn_rted.py +8 -8
- tests/test_rtn_uc.py +18 -18
- ams/pypower/__init__.py +0 -8
- ams/pypower/_compat.py +0 -9
- ams/pypower/core/__init__.py +0 -8
- ams/pypower/core/pips.py +0 -894
- ams/pypower/core/ppoption.py +0 -244
- ams/pypower/core/ppver.py +0 -18
- ams/pypower/core/solver.py +0 -2451
- ams/pypower/eps.py +0 -6
- ams/pypower/idx.py +0 -174
- ams/pypower/io.py +0 -604
- ams/pypower/make/__init__.py +0 -11
- ams/pypower/make/matrices.py +0 -665
- ams/pypower/make/pdv.py +0 -506
- ams/pypower/routines/__init__.py +0 -7
- ams/pypower/routines/cpf.py +0 -513
- ams/pypower/routines/cpf_callbacks.py +0 -114
- ams/pypower/routines/opf.py +0 -1803
- ams/pypower/routines/opffcns.py +0 -1946
- ams/pypower/routines/pflow.py +0 -852
- ams/pypower/toggle.py +0 -1098
- ams/pypower/utils.py +0 -293
- ams/routines/cpf.py +0 -65
- ams/routines/dcpf0.py +0 -196
- ams/routines/pflow0.py +0 -113
- tests/test_rtn_dcpf.py +0 -77
- {ltbams-1.0.9.dist-info → ltbams-1.0.10.dist-info}/entry_points.txt +0 -0
- {ltbams-1.0.9.dist-info → ltbams-1.0.10.dist-info}/top_level.txt +0 -0
@@ -1,12 +1,13 @@
|
|
1
|
-
ams/__init__.py,sha256=
|
1
|
+
ams/__init__.py,sha256=q-9-f0YCg6aaTW19VCkY6VosfvRA2ObI9mF1f_3016Y,313
|
2
2
|
ams/__main__.py,sha256=EB4GfGiKgvnQ_psNr0QwPoziYvjmGvQ2yVsBwQtfrLw,170
|
3
|
-
ams/_version.py,sha256=
|
3
|
+
ams/_version.py,sha256=kccksMimNEDK-8pkw0RnSVrUE7NGH1_HlY85CE4sJgQ,498
|
4
4
|
ams/cli.py,sha256=EyNFXn565gFCppTxpyTZviBdPgUuKtgAPZ4WE6xewRk,6164
|
5
|
-
ams/interface.py,sha256
|
6
|
-
ams/main.py,sha256=
|
5
|
+
ams/interface.py,sha256=-I5dRdHQPxyHBDCp02eYuqyW1aleHwn_nGgTxFYAG1I,45248
|
6
|
+
ams/main.py,sha256=lIqC16TO0pye75Wv8l_6EemNtm15iyMdvu8YQFkdd_4,23599
|
7
7
|
ams/report.py,sha256=ewcffopOzT5o45eJNmcV8pxeQqPIjKbarGN33-yHGA8,10961
|
8
|
-
ams/shared.py,sha256=
|
9
|
-
ams/system.py,sha256=
|
8
|
+
ams/shared.py,sha256=4sY2U0sghs_S2V6C7Z0OyQ6WZRfpCXk2_Cf_Mg24Vr4,3900
|
9
|
+
ams/system.py,sha256=kASxxtA6rQ2mCBdwGXd_M3FRTH8xSXE99h8UCPrMnfU,29773
|
10
|
+
ams/cases/5bus/pjm5bus_demo.json,sha256=IpxO2vzB9-9Kg9xjOXREKeXEz9wjFE7cuQbcUu8VORA,23152
|
10
11
|
ams/cases/5bus/pjm5bus_demo.xlsx,sha256=OWIUprkg8_aQ_bTCaEFMl7Bhfa1R20zxAHXRQtXBix0,32607
|
11
12
|
ams/cases/5bus/pjm5bus_ev.xlsx,sha256=vR8dJv5jIxib1pgcMonhzvraoqZVJWhBSJdVXDL0qsI,19498
|
12
13
|
ams/cases/5bus/pjm5bus_jumper.xlsx,sha256=47QAol1RGz_aGvhV2emq9XCy_Db9Zca15_OMVAdFVR0,19332
|
@@ -34,27 +35,28 @@ ams/cases/npcc/npcc_uced.xlsx,sha256=zuaZEOBwdOHwK5hFgQSXownyH-MfKDZQ-iVFeaFVSyg
|
|
34
35
|
ams/cases/pglib/pglib_opf_case39_epri__api.m,sha256=DKUNon8FgIYKJWOK5ZyQ0fLP0zowNRrf4vmPN-UxU3M,16351
|
35
36
|
ams/cases/wecc/wecc.m,sha256=8Wqal6H5r1wNxLLQBCXo2V3v3JZY5IJDEkyrEGCrCWE,30498
|
36
37
|
ams/cases/wecc/wecc_uced.xlsx,sha256=R3tZgxEqz_ctKcjA1wwFecxn-QZXutvf7NzgnCg_078,94767
|
37
|
-
ams/core/__init__.py,sha256=
|
38
|
+
ams/core/__init__.py,sha256=lIvrAvYf2yrHWqYi0rVuJgJt8KNA8nTmN2iuZ125z9Q,123
|
39
|
+
ams/core/common.py,sha256=934J7xq5JvC14yKp2Z4hWKUFJFhxzAnxB_8_99CChY0,704
|
38
40
|
ams/core/documenter.py,sha256=FNkpiP65iO809B4Bgmp5C1QeJTQHi-sS9vTP7Wd9D8Q,23131
|
39
41
|
ams/core/matprocessor.py,sha256=3eEij-ul8Rx25ZwNbv66YEOKyUXB-fYO-ZQs5BpqmIU,26610
|
40
|
-
ams/core/model.py,sha256=
|
42
|
+
ams/core/model.py,sha256=LNZtzyf2A7Tz3pn9IDs35JYaHSkQRqhqZicTpZGSqsc,10926
|
41
43
|
ams/core/param.py,sha256=LPH48xUHyqWqODD6IsiamUtkJDDSgGCEMAo6vroFoHE,11130
|
42
44
|
ams/core/service.py,sha256=Q4aeaYFWycIEH7I8DSO8Itah2CJxc3oAW46dtKCQEyA,28041
|
43
|
-
ams/core/symprocessor.py,sha256=
|
45
|
+
ams/core/symprocessor.py,sha256=qGzztGqe15-nrq1ZdrjslEH-375vjvB3O8fi7nau5Hw,8419
|
44
46
|
ams/core/var.py,sha256=f48pzir4miBsB5sh6PwUsFe0LdNNEM-d3VufcjbUU0w,1591
|
45
47
|
ams/extension/__init__.py,sha256=5IFTNirDL0uDaUsg05_oociVT9VCy2rhPx1ad4LGveM,65
|
46
|
-
ams/extension/eva.py,sha256=
|
48
|
+
ams/extension/eva.py,sha256=4_q4ME0WrQIcd205SBTjv0-rMRZZIdQ07QJuEHwLIC8,16340
|
47
49
|
ams/io/__init__.py,sha256=GIfF7X44olHaySL8EzOBU1eXUnunr1owzzdPfPvvHZU,3802
|
48
50
|
ams/io/json.py,sha256=IurwcZDuKczSbRTpcbQZiIi0ARCrMK6kJ0E3wS8ENy8,2585
|
49
|
-
ams/io/matpower.py,sha256=
|
50
|
-
ams/io/psse.py,sha256=
|
51
|
+
ams/io/matpower.py,sha256=IK6NwVUAM0FAv2rFF1hBoSTowfXD8l6YXrKiPch9hW8,26166
|
52
|
+
ams/io/psse.py,sha256=qvKP9CP-70UejUsffPu4ibtyF1JXO0Sz0-evT4fDPXg,13631
|
51
53
|
ams/io/pypower.py,sha256=Fe0sxzC5DZegtYksTixadXk_LcfJ1GNetWu9EuHCkG8,2790
|
52
54
|
ams/io/xlsx.py,sha256=7ATW1seyxsGn7d5p5IuSRFHcoCHVVjMu3E7mP1Mc74U,2460
|
53
55
|
ams/models/__init__.py,sha256=EGkViLkVX_We9FAGuEkgfleMNmPw_vGp2Nq1OQimL7U,691
|
54
56
|
ams/models/area.py,sha256=AKYU6aJQKsVWRZdvMO7yic-8wZ1GumSTQXgDg5L0THw,899
|
55
57
|
ams/models/bus.py,sha256=U0vSegkm-9fqPQS9KMJQU6gpIMX_1GK5O_dvRc8-0P0,1585
|
56
58
|
ams/models/cost.py,sha256=rmGNj9ztMbqA-OIJj8fNNBh8bdYJSY9hk10vffgxc6k,5916
|
57
|
-
ams/models/group.py,sha256
|
59
|
+
ams/models/group.py,sha256=qVYhyMJQHIDikcxxY-mAOOVZOE1_Bp9Av4dP6AtQ4hs,5780
|
58
60
|
ams/models/info.py,sha256=Oh0Xo5J4ZHBsNIkMOzIwv_DegsX1inyuv3Q5CpCfyQw,788
|
59
61
|
ams/models/line.py,sha256=ju5h1BcW4kgVWm_lgl8zWhSYqlsUjbdoUwzz2t0Vx1s,2770
|
60
62
|
ams/models/reserve.py,sha256=3BjWCyKrPL4CwTvmzRxk25H8Nkxh-Rz0Ne17I9Y2TUA,2816
|
@@ -69,7 +71,7 @@ ams/models/renewable/__init__.py,sha256=7dZyRXbvBAHbLJeJssJ1hsOHj9Bgeg77kB5gcX_m
|
|
69
71
|
ams/models/renewable/regc.py,sha256=3J9alIGUn_GkibQ3-dKTylAOpNPzd5zpancPc79q9T4,3448
|
70
72
|
ams/models/static/__init__.py,sha256=lh5yR5Xb2unS4ndng-cLU1TAeoidu2s6VAVFLc3HUDU,96
|
71
73
|
ams/models/static/gen.py,sha256=QXklOYlnU7QHWy-WFJwhxuNItUPqFsLJIjAO4sGMUbg,7087
|
72
|
-
ams/models/static/pq.py,sha256=
|
74
|
+
ams/models/static/pq.py,sha256=SCwAqhqvKy_PFHp6VYO_zgv3v6gI5pK3KvT3RNX-nvA,2782
|
73
75
|
ams/opt/__init__.py,sha256=INsl8yxtOzTKqV9pzVxlL6RSGDRaUDwxpZMY1QROrF4,459
|
74
76
|
ams/opt/constraint.py,sha256=ERT9zwjQyGkvDo465Yd0wBexlIhjVmw0MyWq4BWnWoI,5534
|
75
77
|
ams/opt/exprcalc.py,sha256=oVtjNHzdWvYHV-8PdRehAxjledsQxpxatdNgMLeWS5o,3935
|
@@ -77,55 +79,33 @@ ams/opt/expression.py,sha256=WrWnYliB61uHA_wQjtYgtAXdpgSN1pNqQmWvzHWSsdE,5569
|
|
77
79
|
ams/opt/objective.py,sha256=W0dQfW5dHNdWEc2DQtWYNGMuhMY6Pu-HTD0n7-izDZA,5519
|
78
80
|
ams/opt/omodel.py,sha256=hEtfKoSNssSxHgUDdep79pifNTsywytDTjgGgne7nKM,12750
|
79
81
|
ams/opt/optzbase.py,sha256=KEYRPhfTCw1E5EUmjpDXSF1kdyqzdR9Yg10Z2VNJahw,5615
|
80
|
-
ams/opt/param.py,sha256=
|
82
|
+
ams/opt/param.py,sha256=G0KkWo1SqLiecZ7gLPzsbG5_WBORSVZ2GJ20ekdYJoQ,5121
|
81
83
|
ams/opt/var.py,sha256=cpDiELo37E7IoTDlVn_NbkuFNQ88oey23YOF6Gpg6zM,7707
|
82
|
-
ams/
|
83
|
-
ams/
|
84
|
-
ams/
|
85
|
-
ams/pypower/idx.py,sha256=YGEkHdrGDOmF_wHsQzRfDp8blaymJuWb1xErUyCYgD4,8176
|
86
|
-
ams/pypower/io.py,sha256=KlXKyErbt2i_UzFJDI4obWbUddQXM3sD4fEtl2ePp7k,26368
|
87
|
-
ams/pypower/toggle.py,sha256=7o4vS0fcQXL_Ha8iiMXxnsqAPPPnypnhPcGQ-NXmbO0,50088
|
88
|
-
ams/pypower/utils.py,sha256=UOkNNJNs_zHVqcxFUlNG6QiBpqPnDlgSGqhnEXPukvs,8779
|
89
|
-
ams/pypower/core/__init__.py,sha256=J4mOfUN6heywauKP99R-Ois2vem5tF6cMS3gsGHSfy8,277
|
90
|
-
ams/pypower/core/pips.py,sha256=YD2b3dttyEDhk5Ki9z_KxP3DLg-fJQ-PFovXifLjoxc,32645
|
91
|
-
ams/pypower/core/ppoption.py,sha256=pyWqiXtkKNAQNlqxqbUZ3gUoXpthXjafGpJd1vvlVoc,8231
|
92
|
-
ams/pypower/core/ppver.py,sha256=J_NX8YfgINQT6FiBG6UxQztfk08lGOOtLk6fce8RVE0,304
|
93
|
-
ams/pypower/core/solver.py,sha256=x1Qv_j_Ol7cTJXYh2KNCvP3R9t0HwD3FM_yvT-Vb1W8,84912
|
94
|
-
ams/pypower/make/__init__.py,sha256=z-BBqZG4SUzrCAvwwgY5EBf2zsnpS74NWOGGyg_U2ck,494
|
95
|
-
ams/pypower/make/matrices.py,sha256=7gFnY_5FdVDFy9XBFVFgPsPFc-XPsPjYJ2y7vkp1uOM,23713
|
96
|
-
ams/pypower/make/pdv.py,sha256=0gxiUyh6uoVvv91-td_AZ6-QLBDyD7-km-qkMTWxAiE,18633
|
97
|
-
ams/pypower/routines/__init__.py,sha256=D3gkMZBjo6TzGLyMPNjM1TvTSY-9XIlgqUqNoSr_8b0,204
|
98
|
-
ams/pypower/routines/cpf.py,sha256=VRL8rWGFaOMn3VheKm2DWZzjpY99W1msvWN4yY9kHcE,17371
|
99
|
-
ams/pypower/routines/cpf_callbacks.py,sha256=93f3sdibG7FsXOP9EmqX-iTe0_eZmGtH1JhvtJB1Xig,4480
|
100
|
-
ams/pypower/routines/opf.py,sha256=SNklP0cC8qu-ji1vluEj7DjAtvWDneOEkZWZeMBdd5g,73447
|
101
|
-
ams/pypower/routines/opffcns.py,sha256=o8EpvWH32x3vbN9gV7Xi-D6RHQ5V2eB8NT15cZrwX2w,78144
|
102
|
-
ams/pypower/routines/pflow.py,sha256=q5RFZ5XuB5YQZk1jpJ5aTUB3DfgPJEGsvWyLDNo5PJo,30697
|
103
|
-
ams/routines/__init__.py,sha256=idfPyMhFr0hkUZjcAEQw14JA5zPHeFe3Vl3p4DCJ5d0,640
|
104
|
-
ams/routines/acopf.py,sha256=VZC3qs1G7zE--6XxE_wXv432nj3SV5hcrR8967ogYlg,3835
|
105
|
-
ams/routines/cpf.py,sha256=xsrUVjtGQ1b7UCXpwwYihqzTeEGJJKnO9LlX1Tz9Tks,1552
|
106
|
-
ams/routines/dcopf.py,sha256=6ETgopvX9tSFF3kssHsBchAttcyo2DTG-eIqjvlk0WY,11087
|
84
|
+
ams/routines/__init__.py,sha256=V_IyEb5qLBrZ4zc_eVe-Rc0G_j-u881tvEzcEejhNv8,647
|
85
|
+
ams/routines/acopf.py,sha256=dLVTh84KiBvLyG2auNsIfcufsl6N-9FcXWjpdYrQfYQ,208
|
86
|
+
ams/routines/dcopf.py,sha256=40I5pYUsUiear_DT9iHwRtFPs_yy-wlxQVDnFrlMtg4,11619
|
107
87
|
ams/routines/dcopf2.py,sha256=sDCP8zqYHDh7s7p9SX6G8QhMfIxCg3VPYJn6r3pRKyo,3620
|
108
|
-
ams/routines/dcpf.py,sha256=
|
109
|
-
ams/routines/dcpf0.py,sha256=V9zfBoV0cRMFLJdLrpvieyvwTybLTZADPoaKMJLKSkY,6814
|
88
|
+
ams/routines/dcpf.py,sha256=lGZ9LmCL1DsFB-sNxI7NGrq0qd_iBRMDPJmU5022t20,8242
|
110
89
|
ams/routines/dopf.py,sha256=8D36-FkPORYGaMnwGTqwz8HxAXk5ywo3mk8NlGq327g,6289
|
111
|
-
ams/routines/ed.py,sha256=
|
112
|
-
ams/routines/
|
113
|
-
ams/routines/
|
114
|
-
ams/routines/
|
90
|
+
ams/routines/ed.py,sha256=9Hf_ZqD6poIxCIBfsTMC0DGoPNEja1ZtVxqhb4ijhgE,11875
|
91
|
+
ams/routines/grbopt.py,sha256=DeNpm6JU-I_i_Q_vicaz_u_MnrE6zSLeyxcfJOluOoc,5367
|
92
|
+
ams/routines/pflow.py,sha256=5_9n10r_PfsVXIRkaBgKxVITumImZ8mvpHnwxX_ECdw,9432
|
93
|
+
ams/routines/pypower.py,sha256=1DjhNpCqhSQdZivYQsNvpBaKUEhmNsiWGgAHdMB7cOk,26740
|
94
|
+
ams/routines/routine.py,sha256=v4jzsziQPvbVh5m0AH629NBEtmKlLvitFW5m-YfFtfY,35833
|
115
95
|
ams/routines/rted.py,sha256=GOHRxo0-HS5HhwQg8lv7-2VcGr_M_TdUvvomgJ31fDQ,22070
|
116
96
|
ams/routines/type.py,sha256=lvTWSnCYIbRJXIm3HX6jA0Hv-WWYusTOUPfoW8DITlU,3877
|
117
|
-
ams/routines/uc.py,sha256=
|
97
|
+
ams/routines/uc.py,sha256=VcuNy2TnBjsewKEGIqeo2EFTyuhpx5QsEvgpAtscDIQ,15648
|
118
98
|
ams/utils/__init__.py,sha256=2hAQmWRgmnE-bCGT9cJoW9FkPDMGRiGkbBcUgj-bgjI,122
|
119
99
|
ams/utils/misc.py,sha256=Y6tPKpUKJa7bL9alroJuG2UNW9vdQjnfAmKb2EbIls8,2027
|
120
100
|
ams/utils/paths.py,sha256=D9VNUwtJtHy-8PFzMnxtQ9HpkOXT6vdVOjfOTuoKGKw,6699
|
121
101
|
docs/Makefile,sha256=UKXBFAbKGPt1Xw9J84343v0Mh8ylAZ-tE0uCd74DrQU,725
|
122
102
|
docs/make.bat,sha256=9UgKGb4SdP006622fJiFxeFT1BeycYAs6hDbV1xwPy8,804
|
123
|
-
docs/source/api.rst,sha256=
|
103
|
+
docs/source/api.rst,sha256=BRzdDFDzDwVL7Jr_Xj-O5Icgx0gt5hNNd1OjvPl7ap0,1490
|
124
104
|
docs/source/conf.py,sha256=UyoWogZTUNSJU7pQS_JaR28nKddW94zr01LYoIciZZw,6688
|
125
105
|
docs/source/genmodelref.py,sha256=IhmF7bDw8BXPvLD8V3WjQNrfc-H07r5iS-_4DHbbp-8,1420
|
126
106
|
docs/source/genroutineref.py,sha256=0JyMc2kV5bWrWbSoO6d7o4QgDgG8mVy3JGGQWacJypw,1064
|
127
107
|
docs/source/index.rst,sha256=N5phQS5RIyYs-NZo_5yYB8LjvHzOKLeXzRA-M8i-g3Q,2688
|
128
|
-
docs/source/release-notes.rst,sha256=
|
108
|
+
docs/source/release-notes.rst,sha256=Fa-rDL0lhaZVi8nwfyn7gCQhQUKyn7NtMIIBkeGM-Vc,13724
|
129
109
|
docs/source/_templates/autosummary/base.rst,sha256=zl3U4baR4a6YjsHyT-x9zCOrHwKZOVUdWn1NPX2u3bc,106
|
130
110
|
docs/source/_templates/autosummary/class.rst,sha256=Hv_igCsLsUpM62_zN0nqj6FSfKnS5xLyu8ZldMbfOAk,668
|
131
111
|
docs/source/_templates/autosummary/module.rst,sha256=YdbpCudOrEU-JbuSlzGvcOI2hn_KrCM6FW5HcGqkaEE,1113
|
@@ -133,7 +113,7 @@ docs/source/_templates/autosummary/module_toctree.rst,sha256=sg30OdqFDLyo8Y3hl9V
|
|
133
113
|
docs/source/examples/index.rst,sha256=6VT3wVeKk8BWf6pJQtZrmcumW_3jI8esdlzja8scUCA,742
|
134
114
|
docs/source/getting_started/copyright.rst,sha256=d3S7FjrbysVqQd3pEBadrrkcQOZ7sYYeDTCOS4goPC8,715
|
135
115
|
docs/source/getting_started/index.rst,sha256=mcp1NdUwbPoNzpn7Owf5Qzfd6J_--ToU52PjmrbwjBY,1512
|
136
|
-
docs/source/getting_started/install.rst,sha256=
|
116
|
+
docs/source/getting_started/install.rst,sha256=pCL5GDNxwkWnrPaO48i9c0bBPT_dYAWvD2CQ7Oi2P_0,7400
|
137
117
|
docs/source/getting_started/overview.rst,sha256=Zy890bDCUVW37NvjhQFUJUae1Zkghr72Az4Qd0PhP_I,1068
|
138
118
|
docs/source/getting_started/testcase.rst,sha256=L3fGjfm7mGj7ChRovYw5Jx6OP8PU5pTerid0_Y4iKVM,2016
|
139
119
|
docs/source/getting_started/verification.rst,sha256=Jxbgf-SmXYLSokylr1LKtGOjAWUc7a5D-uT_mQZ7i7c,243
|
@@ -144,7 +124,8 @@ docs/source/getting_started/formats/pypower.rst,sha256=8rpKdZkNcj1s-KK76XJAc3FZ2
|
|
144
124
|
docs/source/getting_started/formats/xlsx.png,sha256=WX5x7ZG9hBu5Ft8gmA_u4XQewK_SDWw30WOaXsAS8LY,171220
|
145
125
|
docs/source/getting_started/formats/xlsx.rst,sha256=utsE0AJirT_P7ZvCk63NhB-z19NdbS8OjWQyQ9juskM,761
|
146
126
|
docs/source/images/curent.ico,sha256=pKetB19VTcdXTRH6iACq5YWHZYPcDesd9bfnT2KaaOM,36637
|
147
|
-
docs/source/images/dcopf_time.png,sha256=
|
127
|
+
docs/source/images/dcopf_time.png,sha256=6BU5hCr-4mHZj76BNaHlTBVTrDXML-o78WGUxtrukEk,45985
|
128
|
+
docs/source/images/educ_pie.png,sha256=XZyhH4FFtRySpOAMoKpBnFCTWD4hE659Yf-55qGf63s,111483
|
148
129
|
docs/source/images/sponsors/CURENT_Logo_NameOnTrans.png,sha256=0t3hcFcIEdwFWqwCW3xivrpbqHihBlrzq-BjrajQXrA,87680
|
149
130
|
docs/source/images/sponsors/CURENT_Logo_Transparent.png,sha256=dCz3400_jBhWG7oJUKJO_Gm4Lejp-hOyFnj60UI2fUI,59336
|
150
131
|
docs/source/images/sponsors/CURENT_Logo_Transparent_Name.png,sha256=nIOUmexImq_Ytu7r8ZMTO1wM47wZ_ICHniShnB7JxSc,837476
|
@@ -155,33 +136,35 @@ docs/source/modeling/model.rst,sha256=j7OSvoXnDht6rGpgwPiJklsCWrebfx4DxIN-G8r6iF
|
|
155
136
|
docs/source/modeling/routine.rst,sha256=BkUE3y5L1lA7LP9Nyzc4zzY-tF3t4k7egBE188kybHY,4286
|
156
137
|
docs/source/modeling/system.rst,sha256=NMOPNMOKG1_dRyNPPx-MiCKbbpadxWJxGyU6geRUsvQ,1374
|
157
138
|
tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
158
|
-
tests/test_1st_system.py,sha256=
|
139
|
+
tests/test_1st_system.py,sha256=63ngZwXbUzs1964XmqzlkWUgBugi29vuEDMBBTXxLiE,1900
|
159
140
|
tests/test_addressing.py,sha256=MIT713KCqMg0h2o4rBDZsGUrpGadmMlXnrrdq-wB77E,1364
|
160
|
-
tests/test_case.py,sha256=
|
141
|
+
tests/test_case.py,sha256=b_YZhwIN9sX3FCMD03hRNygV-mYthNj7cOhEv7-by-g,8857
|
161
142
|
tests/test_cli.py,sha256=TtCGBy2e7Ll_2gJTFo9juZtzhaakho_MqkcqhG2w2dk,870
|
162
|
-
tests/test_export_csv.py,sha256=
|
143
|
+
tests/test_export_csv.py,sha256=NTULXfTexgI1jf5koUMOYi3RLrSQouS7zxRjXo3ng50,2921
|
163
144
|
tests/test_group.py,sha256=Tq0s9gtenqrv4ws5YNzWxbiF4WgyhtMEAXZfJtew6M4,2699
|
164
|
-
tests/test_interface.py,sha256=
|
165
|
-
tests/test_io.py,sha256=
|
145
|
+
tests/test_interface.py,sha256=8hOZ1caRfoyoEdy1lnh8Y4rIL97FLb2oUKfX_N1lEDo,8838
|
146
|
+
tests/test_io.py,sha256=MIale4g0jMC9Vy4jjtFKpnh12aavp9lusczff1iIVC0,6493
|
166
147
|
tests/test_jumper.py,sha256=bdOknplEGnO_tiJc7p3xQvgTe2b6Dz53bOgbFaXKMAI,537
|
167
148
|
tests/test_known_good.py,sha256=NBrlAxnVMxIHXR2cWps-Kwjh36fiU4Y-eupspZkM0ks,9670
|
168
149
|
tests/test_matp.py,sha256=LkjhqxSFr6oY_ENpduDQ77rhLLBl6RzIHZ2d0m_8i-8,17262
|
169
150
|
tests/test_model.py,sha256=ZgghNYmEeALf8_1sPjq9lIJwuYDQ2SelivJNEYpHxJU,1621
|
170
|
-
tests/test_omodel.py,sha256=
|
151
|
+
tests/test_omodel.py,sha256=niVdTZJEZNSVHz-ocA0nnVx84Dt3-8P5FUrwKkNiA0I,4305
|
171
152
|
tests/test_paths.py,sha256=BU6Tjl4Q_WuHbid0ujkiibqx7yas42YJ7eV_avVMwuw,633
|
172
|
-
tests/test_report.py,sha256=
|
153
|
+
tests/test_report.py,sha256=RR23by4G-cyleaHTy9A7SEVet0eOVS-Tm0kk1GXY5dM,8134
|
173
154
|
tests/test_repr.py,sha256=g7MRdxLcZRI1PlREFdUG_npp0LkcQiJZfOPw1aq0EFM,570
|
174
|
-
tests/test_routine.py,sha256=
|
175
|
-
tests/
|
176
|
-
tests/
|
177
|
-
tests/
|
178
|
-
tests/test_rtn_ed.py,sha256=
|
179
|
-
tests/
|
180
|
-
tests/
|
181
|
-
tests/
|
155
|
+
tests/test_routine.py,sha256=DP5CwKtzliw2gNLW2W_3kp0Ihy4rCaxeBxMpgyN5AXA,6234
|
156
|
+
tests/test_rtn_acopf.py,sha256=Kg-RHflrrwyX2uHr16xSAze9XAdYcK7eg1LHMyr1uyA,2354
|
157
|
+
tests/test_rtn_dcopf.py,sha256=Pl6yGfvznnjP1oGiIWEhnqFIBW2futxPZS4o_DRkbrw,3660
|
158
|
+
tests/test_rtn_dcopf2.py,sha256=57_62TnHW-cS6iK2zXT_eXChnh83YiYoPypJwub3VmQ,3747
|
159
|
+
tests/test_rtn_ed.py,sha256=SeSuzqpTZZnBph41PV2Piplo9yxR3qpbhQUa6UCYnSw,10267
|
160
|
+
tests/test_rtn_opf.py,sha256=MmMNwb9-G0KzHcrrP4uHTvs9DBU71_XPIJqNnkQQPHo,4846
|
161
|
+
tests/test_rtn_pflow.py,sha256=QLg0q89Tcb-rrncpiNw6phjMEnvzvExjGTrkqGliiak,4664
|
162
|
+
tests/test_rtn_pypower.py,sha256=KO5VOZxETxVH2mY1mgNvzj1gz1Gdak1sAWxYleDU4E8,10477
|
163
|
+
tests/test_rtn_rted.py,sha256=QHDUymorCqQAJKFlDgTy40JyLTGDvNVNU3tjbjDl3-0,9850
|
164
|
+
tests/test_rtn_uc.py,sha256=UbMeaam3dZwgq2LAJokGOl3LT5B3TWKMjCp4dRcLs40,8497
|
182
165
|
tests/test_service.py,sha256=6IP6CAH2xHxGHZM4-R8LjZxVJ2L10LcGaPDyRIqKLmc,2438
|
183
|
-
ltbams-1.0.
|
184
|
-
ltbams-1.0.
|
185
|
-
ltbams-1.0.
|
186
|
-
ltbams-1.0.
|
187
|
-
ltbams-1.0.
|
166
|
+
ltbams-1.0.10.dist-info/METADATA,sha256=607sw75UjOTCI4FuqQROlZn7BobwBeBubXQ5r9H_Bgc,13511
|
167
|
+
ltbams-1.0.10.dist-info/WHEEL,sha256=zaaOINJESkSfm_4HQVc5ssNzHCPXhJm0kEUakpsEHaU,91
|
168
|
+
ltbams-1.0.10.dist-info/entry_points.txt,sha256=FA56FlhO_yVNeEf810SrorVQb7_Xsmo3_EW-W-ijUfA,37
|
169
|
+
ltbams-1.0.10.dist-info/top_level.txt,sha256=pyKDqG2kj13F9-BYd_wkruRdBSqLXw8Nwc-cmljqrxg,15
|
170
|
+
ltbams-1.0.10.dist-info/RECORD,,
|
tests/test_1st_system.py
CHANGED
@@ -19,7 +19,7 @@ class TestCodegen(unittest.TestCase):
|
|
19
19
|
out += group.doc_all()
|
20
20
|
|
21
21
|
def test_docum(self) -> None:
|
22
|
-
sp = ams.load(ams.get_case('5bus/pjm5bus_demo.
|
22
|
+
sp = ams.load(ams.get_case('5bus/pjm5bus_demo.json'),
|
23
23
|
setup=True, no_output=True)
|
24
24
|
sp.DCOPF.init()
|
25
25
|
docum = sp.DCOPF.docum
|
tests/test_case.py
CHANGED
@@ -14,7 +14,7 @@ class Test5Bus(unittest.TestCase):
|
|
14
14
|
|
15
15
|
def setUp(self) -> None:
|
16
16
|
self.ss = ams.main.load(
|
17
|
-
get_case("5bus/pjm5bus_demo.
|
17
|
+
get_case("5bus/pjm5bus_demo.json"),
|
18
18
|
default_config=True,
|
19
19
|
no_output=True,
|
20
20
|
)
|
@@ -110,19 +110,19 @@ class Test5Bus(unittest.TestCase):
|
|
110
110
|
self.ss.ACOPF.run()
|
111
111
|
np.testing.assert_array_equal(self.ss.GCost.c1.v, [1500., 3100., 0.4, 0.1, 0.01])
|
112
112
|
|
113
|
-
def test_multiple_disconnected_line(self):
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
113
|
+
# def test_multiple_disconnected_line(self):
|
114
|
+
# """
|
115
|
+
# Test connectivity check for systems with disconnected lines.
|
116
|
+
|
117
|
+
# These disconnected lines (zeros) was not excluded when counting
|
118
|
+
# connected buses, causing an out-of-bound error.
|
119
|
+
# """
|
120
|
+
# # TODO: need to add `connectivity` in `system`
|
121
|
+
# pass
|
122
|
+
# # self.ss.Line.u.v[[0, 6]] = 0
|
123
|
+
# # self.ss.PFlow.run()
|
124
|
+
# # self.assertEqual(len(self.ss.Bus.islands), 1)
|
125
|
+
# # self.assertEqual(self.ss.Bus.n_islanded_buses, 0)
|
126
126
|
|
127
127
|
|
128
128
|
class TestIEEE14RAW(unittest.TestCase):
|
tests/test_export_csv.py
CHANGED
tests/test_interface.py
CHANGED
@@ -17,7 +17,7 @@ class TestAndesConversion(unittest.TestCase):
|
|
17
17
|
Tests conversion from AMS to ANDES.
|
18
18
|
"""
|
19
19
|
ad_cases = [
|
20
|
-
'ieee14/
|
20
|
+
'ieee14/ieee14_exac1.json',
|
21
21
|
'ieee39/ieee39_full.xlsx',
|
22
22
|
'npcc/npcc.xlsx',
|
23
23
|
]
|
@@ -133,7 +133,7 @@ class TestAndesConversion(unittest.TestCase):
|
|
133
133
|
"""
|
134
134
|
Test conversion when there is Toggle in ANDES case.
|
135
135
|
"""
|
136
|
-
sp = ams.load(ams.get_case('5bus/pjm5bus_demo.
|
136
|
+
sp = ams.load(ams.get_case('5bus/pjm5bus_demo.json'),
|
137
137
|
setup=True,
|
138
138
|
no_output=True,
|
139
139
|
default_config=True)
|
@@ -214,3 +214,25 @@ class TestDataExchange(unittest.TestCase):
|
|
214
214
|
sa.TDS.run()
|
215
215
|
self.sp.dyn.send(adsys=sa, routine='RTED')
|
216
216
|
self.sp.dyn.receive(adsys=sa, routine='RTED', no_update=False)
|
217
|
+
|
218
|
+
|
219
|
+
class TestLoadANDESFile(unittest.TestCase):
|
220
|
+
"""
|
221
|
+
Test loading ANDES file.
|
222
|
+
"""
|
223
|
+
|
224
|
+
def test_no_dyn_models(self):
|
225
|
+
"""
|
226
|
+
Test loading ANDES file without dynamic models.
|
227
|
+
"""
|
228
|
+
sp1 = ams.load(andes.get_case('ieee14/ieee14_exac1.json'),
|
229
|
+
setup=True,
|
230
|
+
no_output=True,
|
231
|
+
default_config=True,)
|
232
|
+
self.assertNotIn('EXAC1', sp1.models.keys())
|
233
|
+
|
234
|
+
sp2 = ams.load(andes.get_case('ieee14/ieee14_pvd1.json'),
|
235
|
+
setup=True,
|
236
|
+
no_output=True,
|
237
|
+
default_config=True,)
|
238
|
+
self.assertIn('PVD1', sp2.models.keys())
|
tests/test_io.py
CHANGED
@@ -50,6 +50,7 @@ class TestMATPOWER(unittest.TestCase):
|
|
50
50
|
with self.assertRaises(ValueError, msg='gentype length check failed!'):
|
51
51
|
ams.io.matpower.mpc2system(mpc14, system14)
|
52
52
|
|
53
|
+
system14 = ams.system.System()
|
53
54
|
ams.io.matpower.mpc2system(self.mpc14, system14)
|
54
55
|
# In case14.m, the gencost has type 2 cost model, with 3 parameters.
|
55
56
|
np.testing.assert_array_less(np.zeros(system14.StaticGen.n),
|
@@ -128,3 +129,52 @@ class TestMATPOWER(unittest.TestCase):
|
|
128
129
|
# Clean up the generated files
|
129
130
|
os.remove(mfile5)
|
130
131
|
os.remove(mfile14)
|
132
|
+
|
133
|
+
def test_system2m(self):
|
134
|
+
"""Test conversion from AMS System to M file."""
|
135
|
+
s5 = ams.load(ams.get_case('matpower/case5.m'),
|
136
|
+
no_output=True)
|
137
|
+
mfile5 = './case5out.m'
|
138
|
+
ams.io.matpower.write(s5, mfile5)
|
139
|
+
|
140
|
+
# Clean up the generated file
|
141
|
+
os.remove(mfile5)
|
142
|
+
|
143
|
+
|
144
|
+
class TestSystemExport(unittest.TestCase):
|
145
|
+
"""
|
146
|
+
Test system export functions.
|
147
|
+
"""
|
148
|
+
|
149
|
+
def test_system_to(self):
|
150
|
+
"""Test conversion from AMS System to several formats."""
|
151
|
+
ss = ams.load(ams.get_case('matpower/case5.m'),
|
152
|
+
no_output=True)
|
153
|
+
|
154
|
+
mpc = ss.to_mpc()
|
155
|
+
|
156
|
+
self.assertIsInstance(mpc, dict)
|
157
|
+
self.assertIn('bus', mpc)
|
158
|
+
self.assertIn('branch', mpc)
|
159
|
+
self.assertIn('gen', mpc)
|
160
|
+
self.assertIn('gencost', mpc)
|
161
|
+
self.assertIn('baseMVA', mpc)
|
162
|
+
self.assertIn('bus_name', mpc)
|
163
|
+
self.assertIn('gentype', mpc)
|
164
|
+
self.assertIn('genfuel', mpc)
|
165
|
+
|
166
|
+
ss.to_m("./case5_out.m")
|
167
|
+
self.assertTrue(os.path.exists("./case5_out.m"))
|
168
|
+
os.remove("./case5_out.m")
|
169
|
+
|
170
|
+
ss.to_json("./case5_out.json")
|
171
|
+
self.assertTrue(os.path.exists("./case5_out.json"))
|
172
|
+
os.remove("./case5_out.json")
|
173
|
+
|
174
|
+
ss.to_xlsx("./case5_out.xlsx")
|
175
|
+
self.assertTrue(os.path.exists("./case5_out.xlsx"))
|
176
|
+
os.remove("./case5_out.xlsx")
|
177
|
+
|
178
|
+
ss.to_raw("./case5_out.raw", overwrite=True)
|
179
|
+
self.assertTrue(os.path.exists("./case5_out.raw"))
|
180
|
+
os.remove("./case5_out.raw")
|
tests/test_omodel.py
CHANGED
@@ -70,7 +70,7 @@ class TestOModelrepr(unittest.TestCase):
|
|
70
70
|
"""
|
71
71
|
|
72
72
|
def setUp(self) -> None:
|
73
|
-
self.ss = ams.load(ams.get_case("5bus/pjm5bus_demo.
|
73
|
+
self.ss = ams.load(ams.get_case("5bus/pjm5bus_demo.json"),
|
74
74
|
setup=True,
|
75
75
|
default_config=True,
|
76
76
|
no_output=True,
|
tests/test_report.py
CHANGED
@@ -20,7 +20,7 @@ class TestReport(unittest.TestCase):
|
|
20
20
|
|
21
21
|
def setUp(self) -> None:
|
22
22
|
self.ss = ams.main.load(
|
23
|
-
ams.get_case("5bus/pjm5bus_demo.
|
23
|
+
ams.get_case("5bus/pjm5bus_demo.json"),
|
24
24
|
default_config=True,
|
25
25
|
no_output=True,
|
26
26
|
)
|
@@ -125,7 +125,7 @@ class TestReport(unittest.TestCase):
|
|
125
125
|
Test report with RTEDES solved.
|
126
126
|
"""
|
127
127
|
self.ss.files.no_output = False
|
128
|
-
self.ss.RTEDES.run()
|
128
|
+
self.ss.RTEDES.run(solver='SCIP')
|
129
129
|
self.assertTrue(self.ss.report())
|
130
130
|
self.assertTrue(os.path.exists(self.expected_report))
|
131
131
|
|
@@ -180,7 +180,7 @@ class TestReport(unittest.TestCase):
|
|
180
180
|
Test report with EDES solved.
|
181
181
|
"""
|
182
182
|
self.ss.files.no_output = False
|
183
|
-
self.ss.EDES.run()
|
183
|
+
self.ss.EDES.run(solver='SCIP')
|
184
184
|
self.assertTrue(self.ss.report())
|
185
185
|
self.assertTrue(os.path.exists(self.expected_report))
|
186
186
|
|
@@ -199,7 +199,7 @@ class TestReport(unittest.TestCase):
|
|
199
199
|
Test report with UC solved.
|
200
200
|
"""
|
201
201
|
self.ss.files.no_output = False
|
202
|
-
self.ss.UC.run()
|
202
|
+
self.ss.UC.run(solver='SCIP')
|
203
203
|
self.assertTrue(self.ss.report())
|
204
204
|
self.assertTrue(os.path.exists(self.expected_report))
|
205
205
|
|
@@ -218,7 +218,7 @@ class TestReport(unittest.TestCase):
|
|
218
218
|
Test report with UCDG solved.
|
219
219
|
"""
|
220
220
|
self.ss.files.no_output = False
|
221
|
-
self.ss.UCDG.run()
|
221
|
+
self.ss.UCDG.run(solver='SCIP')
|
222
222
|
self.assertTrue(self.ss.report())
|
223
223
|
self.assertTrue(os.path.exists(self.expected_report))
|
224
224
|
|
@@ -237,7 +237,7 @@ class TestReport(unittest.TestCase):
|
|
237
237
|
Test report with UCES solved.
|
238
238
|
"""
|
239
239
|
self.ss.files.no_output = False
|
240
|
-
self.ss.UCES.run()
|
240
|
+
self.ss.UCES.run(solver='SCIP')
|
241
241
|
self.assertTrue(self.ss.report())
|
242
242
|
self.assertTrue(os.path.exists(self.expected_report))
|
243
243
|
|
tests/test_routine.py
CHANGED
@@ -104,7 +104,7 @@ class TestSetOptzValueACOPF(unittest.TestCase):
|
|
104
104
|
"""
|
105
105
|
|
106
106
|
def setUp(self) -> None:
|
107
|
-
self.ss = ams.load(ams.get_case("5bus/pjm5bus_demo.
|
107
|
+
self.ss = ams.load(ams.get_case("5bus/pjm5bus_demo.json"),
|
108
108
|
setup=True,
|
109
109
|
default_config=True,
|
110
110
|
no_output=True,
|
@@ -144,7 +144,7 @@ class TestSetOptzValueDCOPF(unittest.TestCase):
|
|
144
144
|
"""
|
145
145
|
|
146
146
|
def setUp(self) -> None:
|
147
|
-
self.ss = ams.load(ams.get_case("5bus/pjm5bus_demo.
|
147
|
+
self.ss = ams.load(ams.get_case("5bus/pjm5bus_demo.json"),
|
148
148
|
setup=True,
|
149
149
|
default_config=True,
|
150
150
|
no_output=True,
|
tests/test_rtn_acopf.py
ADDED
@@ -0,0 +1,75 @@
|
|
1
|
+
import unittest
|
2
|
+
|
3
|
+
import ams
|
4
|
+
|
5
|
+
|
6
|
+
class TestACOPF(unittest.TestCase):
|
7
|
+
"""
|
8
|
+
Test routine `ACOPF`.
|
9
|
+
"""
|
10
|
+
|
11
|
+
def setUp(self) -> None:
|
12
|
+
self.ss = ams.load(ams.get_case('matpower/case14.m'),
|
13
|
+
setup=True, no_output=True, default_config=True)
|
14
|
+
|
15
|
+
def test_init(self):
|
16
|
+
"""
|
17
|
+
Test initialization.
|
18
|
+
"""
|
19
|
+
self.ss.ACOPF.init()
|
20
|
+
self.assertTrue(self.ss.ACOPF.initialized, "ACOPF initialization failed!")
|
21
|
+
|
22
|
+
def test_trip_gen(self):
|
23
|
+
"""
|
24
|
+
Test generator tripping.
|
25
|
+
"""
|
26
|
+
stg = 2
|
27
|
+
self.ss.StaticGen.set(src='u', idx=stg, attr='v', value=0)
|
28
|
+
|
29
|
+
self.ss.ACOPF.update()
|
30
|
+
self.ss.ACOPF.run()
|
31
|
+
self.assertTrue(self.ss.ACOPF.converged, "ACOPF did not converge under generator trip!")
|
32
|
+
self.assertAlmostEqual(self.ss.ACOPF.get(src='pg', attr='v', idx=stg),
|
33
|
+
0, places=6,
|
34
|
+
msg="Generator trip does not take effect!")
|
35
|
+
|
36
|
+
self.ss.StaticGen.set(src='u', idx=stg, attr='v', value=1)
|
37
|
+
|
38
|
+
def test_trip_line(self):
|
39
|
+
"""
|
40
|
+
Test line tripping.
|
41
|
+
"""
|
42
|
+
self.ss.Line.set(src='u', attr='v', idx='Line_3', value=0)
|
43
|
+
|
44
|
+
self.ss.ACOPF.update()
|
45
|
+
self.ss.ACOPF.run()
|
46
|
+
self.assertTrue(self.ss.ACOPF.converged, "ACOPF did not converge under line trip!")
|
47
|
+
self.assertAlmostEqual(self.ss.ACOPF.get(src='plf', attr='v', idx='Line_3'),
|
48
|
+
0, places=6,
|
49
|
+
msg="Line trip does not take effect!")
|
50
|
+
|
51
|
+
self.ss.Line.alter(src='u', idx='Line_3', value=1)
|
52
|
+
|
53
|
+
def test_set_load(self):
|
54
|
+
"""
|
55
|
+
Test setting and tripping load.
|
56
|
+
"""
|
57
|
+
# --- run ACOPF ---
|
58
|
+
self.ss.ACOPF.run()
|
59
|
+
pgs = self.ss.ACOPF.pg.v.sum()
|
60
|
+
|
61
|
+
# --- set load ---
|
62
|
+
self.ss.PQ.set(src='p0', attr='v', idx='PQ_1', value=0.1)
|
63
|
+
self.ss.ACOPF.update()
|
64
|
+
|
65
|
+
self.ss.ACOPF.run()
|
66
|
+
pgs_pqt = self.ss.ACOPF.pg.v.sum()
|
67
|
+
self.assertLess(pgs_pqt, pgs, "Load set does not take effect!")
|
68
|
+
|
69
|
+
# --- trip load ---
|
70
|
+
self.ss.PQ.set(src='p0', attr='v', idx='PQ_1', value=0)
|
71
|
+
self.ss.ACOPF.update()
|
72
|
+
|
73
|
+
self.ss.ACOPF.run()
|
74
|
+
pgs_pqt2 = self.ss.ACOPF.pg.v.sum()
|
75
|
+
self.assertLess(pgs_pqt2, pgs_pqt, "Load trip does not take effect!")
|
tests/test_rtn_dcopf.py
CHANGED
@@ -10,7 +10,7 @@ class TestDCOPF(unittest.TestCase):
|
|
10
10
|
"""
|
11
11
|
|
12
12
|
def setUp(self) -> None:
|
13
|
-
self.ss = ams.load(ams.get_case("5bus/pjm5bus_demo.
|
13
|
+
self.ss = ams.load(ams.get_case("5bus/pjm5bus_demo.json"),
|
14
14
|
setup=True, default_config=True, no_output=True)
|
15
15
|
# decrease load first
|
16
16
|
self.ss.PQ.set(src='p0', attr='v', idx=['PQ_1', 'PQ_2'], value=[0.3, 0.3])
|
tests/test_rtn_dcopf2.py
CHANGED
@@ -10,7 +10,7 @@ class TestDCOPF2(unittest.TestCase):
|
|
10
10
|
"""
|
11
11
|
|
12
12
|
def setUp(self) -> None:
|
13
|
-
self.ss = ams.load(ams.get_case("5bus/pjm5bus_demo.
|
13
|
+
self.ss = ams.load(ams.get_case("5bus/pjm5bus_demo.json"),
|
14
14
|
setup=True, default_config=True, no_output=True)
|
15
15
|
# decrease load first
|
16
16
|
self.ss.PQ.set(src='p0', attr='v', idx=['PQ_1', 'PQ_2'], value=[0.3, 0.3])
|
tests/test_rtn_ed.py
CHANGED
@@ -11,7 +11,7 @@ class TestED(unittest.TestCase):
|
|
11
11
|
"""
|
12
12
|
|
13
13
|
def setUp(self) -> None:
|
14
|
-
self.ss = ams.load(ams.get_case("5bus/pjm5bus_demo.
|
14
|
+
self.ss = ams.load(ams.get_case("5bus/pjm5bus_demo.json"),
|
15
15
|
setup=True, default_config=True, no_output=True)
|
16
16
|
# decrease load first
|
17
17
|
self.ss.PQ.set(src='p0', attr='v', idx=['PQ_1', 'PQ_2'], value=[0.3, 0.3])
|
@@ -102,7 +102,7 @@ class TestEDDG(unittest.TestCase):
|
|
102
102
|
"""
|
103
103
|
|
104
104
|
def setUp(self) -> None:
|
105
|
-
self.ss = ams.load(ams.get_case("5bus/pjm5bus_demo.
|
105
|
+
self.ss = ams.load(ams.get_case("5bus/pjm5bus_demo.json"),
|
106
106
|
setup=True, default_config=True, no_output=True)
|
107
107
|
# decrease load first
|
108
108
|
self.ss.PQ.set(src='p0', attr='v', idx=['PQ_1', 'PQ_2'], value=[0.3, 0.3])
|
@@ -193,7 +193,7 @@ class TestEDES(unittest.TestCase):
|
|
193
193
|
"""
|
194
194
|
|
195
195
|
def setUp(self) -> None:
|
196
|
-
self.ss = ams.load(ams.get_case("5bus/pjm5bus_demo.
|
196
|
+
self.ss = ams.load(ams.get_case("5bus/pjm5bus_demo.json"),
|
197
197
|
setup=True, default_config=True, no_output=True)
|
198
198
|
# decrease load first
|
199
199
|
self.ss.PQ.set(src='p0', attr='v', idx=['PQ_1', 'PQ_2'], value=[0.3, 0.3])
|
@@ -217,7 +217,7 @@ class TestEDES(unittest.TestCase):
|
|
217
217
|
loc_offtime = np.array([0, 2])
|
218
218
|
self.ss.EDTSlot.ug.v[loc_offtime, stg_uid] = 0
|
219
219
|
|
220
|
-
self.ss.EDES.run()
|
220
|
+
self.ss.EDES.run(solver='SCIP')
|
221
221
|
self.assertTrue(self.ss.EDES.converged, "ED did not converge under generator trip!")
|
222
222
|
pg_pv1 = self.ss.EDES.get(src='pg', attr='v', idx=stg)
|
223
223
|
np.testing.assert_almost_equal(np.zeros_like(loc_offtime),
|
@@ -232,7 +232,7 @@ class TestEDES(unittest.TestCase):
|
|
232
232
|
self.ss.StaticGen.set(src='u', idx=stg, attr='v', value=0)
|
233
233
|
self.ss.EDES.update()
|
234
234
|
|
235
|
-
self.ss.EDES.run()
|
235
|
+
self.ss.EDES.run(solver='SCIP')
|
236
236
|
self.assertTrue(self.ss.EDES.converged, "ED did not converge under generator trip!")
|
237
237
|
pg_pv1 = self.ss.EDES.get(src='pg', attr='v', idx=stg)
|
238
238
|
np.testing.assert_array_less(np.zeros_like(pg_pv1), pg_pv1,
|
@@ -246,7 +246,7 @@ class TestEDES(unittest.TestCase):
|
|
246
246
|
Test line tripping.
|
247
247
|
"""
|
248
248
|
self.ss.Line.set(src='u', attr='v', idx='Line_3', value=0)
|
249
|
-
self.ss.EDES.run()
|
249
|
+
self.ss.EDES.run(solver='SCIP')
|
250
250
|
self.assertTrue(self.ss.EDES.converged, "EDES did not converge!")
|
251
251
|
plf_l3 = self.ss.EDES.get(src='plf', attr='v', idx='Line_3')
|
252
252
|
np.testing.assert_almost_equal(np.zeros_like(plf_l3),
|
@@ -259,14 +259,14 @@ class TestEDES(unittest.TestCase):
|
|
259
259
|
"""
|
260
260
|
Test setting and tripping load.
|
261
261
|
"""
|
262
|
-
self.ss.EDES.run()
|
262
|
+
self.ss.EDES.run(solver='SCIP')
|
263
263
|
pgs = self.ss.EDES.pg.v.sum()
|
264
264
|
|
265
265
|
# --- set load ---
|
266
266
|
self.ss.PQ.set(src='p0', attr='v', idx='PQ_1', value=0.1)
|
267
267
|
self.ss.EDES.update()
|
268
268
|
|
269
|
-
self.ss.EDES.run()
|
269
|
+
self.ss.EDES.run(solver='SCIP')
|
270
270
|
pgs_pqt = self.ss.EDES.pg.v.sum()
|
271
271
|
self.assertLess(pgs_pqt, pgs, "Load set does not take effect!")
|
272
272
|
|
@@ -274,6 +274,6 @@ class TestEDES(unittest.TestCase):
|
|
274
274
|
self.ss.PQ.alter(src='u', idx='PQ_2', value=0)
|
275
275
|
self.ss.EDES.update()
|
276
276
|
|
277
|
-
self.ss.EDES.run()
|
277
|
+
self.ss.EDES.run(solver='SCIP')
|
278
278
|
pgs_pqt2 = self.ss.EDES.pg.v.sum()
|
279
279
|
self.assertLess(pgs_pqt2, pgs_pqt, "Load trip does not take effect!")
|