ltbams 1.0.6__py3-none-any.whl → 1.0.8__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/_version.py +3 -3
- ams/cases/5bus/pjm5bus_demo.xlsx +0 -0
- ams/cases/5bus/pjm5bus_ev.xlsx +0 -0
- ams/cases/5bus/pjm5bus_jumper.xlsx +0 -0
- ams/cases/hawaii40/Hawaii40.m +375 -0
- ams/cases/ieee14/ieee14_uced.xlsx +0 -0
- ams/cases/ieee39/ieee39_uced.xlsx +0 -0
- ams/cases/ieee39/ieee39_uced_esd1.xlsx +0 -0
- ams/cases/ieee39/ieee39_uced_pvd1.xlsx +0 -0
- ams/cases/ieee39/ieee39_uced_vis.xlsx +0 -0
- ams/cases/matpower/case5.m +25 -0
- ams/core/matprocessor.py +7 -16
- ams/core/service.py +4 -3
- ams/interface.py +17 -4
- ams/io/__init__.py +1 -0
- ams/io/matpower.py +165 -7
- ams/io/psse.py +1 -1
- ams/models/__init__.py +1 -1
- ams/models/group.py +77 -6
- ams/models/line.py +3 -164
- ams/models/renewable/regc.py +1 -5
- ams/models/reserve.py +2 -2
- ams/models/static/gen.py +11 -3
- ams/models/static/pq.py +2 -2
- ams/models/timeslot.py +1 -1
- ams/routines/dcopf.py +1 -1
- ams/routines/dcpf0.py +1 -1
- ams/routines/dopf.py +10 -10
- ams/routines/ed.py +3 -4
- ams/routines/pflow.py +9 -10
- ams/routines/rted.py +20 -29
- ams/routines/uc.py +1 -1
- ams/system.py +11 -18
- docs/source/api.rst +2 -0
- docs/source/getting_started/copyright.rst +1 -1
- docs/source/release-notes.rst +24 -0
- {ltbams-1.0.6.dist-info → ltbams-1.0.8.dist-info}/METADATA +1 -1
- {ltbams-1.0.6.dist-info → ltbams-1.0.8.dist-info}/RECORD +48 -51
- {ltbams-1.0.6.dist-info → ltbams-1.0.8.dist-info}/WHEEL +1 -1
- tests/test_1st_system.py +31 -0
- tests/test_case.py +27 -19
- tests/test_io.py +15 -0
- tests/test_rtn_ed.py +4 -4
- tests/test_rtn_rted.py +4 -4
- tests/test_rtn_uc.py +4 -4
- tests/test_service.py +2 -2
- ams/cases/5bus/pjm5bus_uced.json +0 -1062
- ams/cases/5bus/pjm5bus_uced.xlsx +0 -0
- ams/cases/5bus/pjm5bus_uced_esd1.xlsx +0 -0
- ams/cases/5bus/pjm5bus_uced_ev.xlsx +0 -0
- tests/test_andes_mats.py +0 -61
- {ltbams-1.0.6.dist-info → ltbams-1.0.8.dist-info}/entry_points.txt +0 -0
- {ltbams-1.0.6.dist-info → ltbams-1.0.8.dist-info}/top_level.txt +0 -0
tests/test_rtn_ed.py
CHANGED
@@ -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/
|
196
|
+
self.ss = ams.load(ams.get_case("5bus/pjm5bus_demo.xlsx"),
|
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])
|
@@ -245,14 +245,14 @@ class TestEDES(unittest.TestCase):
|
|
245
245
|
"""
|
246
246
|
Test line tripping.
|
247
247
|
"""
|
248
|
-
self.ss.Line.set(src='u', attr='v', idx=
|
248
|
+
self.ss.Line.set(src='u', attr='v', idx='Line_3', value=0)
|
249
249
|
self.ss.EDES.run()
|
250
250
|
self.assertTrue(self.ss.EDES.converged, "EDES did not converge!")
|
251
|
-
plf_l3 = self.ss.EDES.get(src='plf', attr='v', idx=
|
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),
|
253
253
|
plf_l3, decimal=6)
|
254
254
|
|
255
|
-
self.ss.Line.alter(src='u', idx=
|
255
|
+
self.ss.Line.alter(src='u', idx='Line_3', value=1)
|
256
256
|
|
257
257
|
@skip_unittest_without_MISOCP
|
258
258
|
def test_set_load(self):
|
tests/test_rtn_rted.py
CHANGED
@@ -203,7 +203,7 @@ class TestRTEDES(unittest.TestCase):
|
|
203
203
|
"""
|
204
204
|
|
205
205
|
def setUp(self) -> None:
|
206
|
-
self.ss = ams.load(ams.get_case("5bus/
|
206
|
+
self.ss = ams.load(ams.get_case("5bus/pjm5bus_demo.xlsx"),
|
207
207
|
setup=True, default_config=True, no_output=True)
|
208
208
|
# decrease load first
|
209
209
|
self.ss.PQ.set(src='p0', attr='v', idx=['PQ_1', 'PQ_2'], value=[0.3, 0.3])
|
@@ -237,16 +237,16 @@ class TestRTEDES(unittest.TestCase):
|
|
237
237
|
"""
|
238
238
|
Test line tripping.
|
239
239
|
"""
|
240
|
-
self.ss.Line.set(src='u', attr='v', idx=
|
240
|
+
self.ss.Line.set(src='u', attr='v', idx='Line_3', value=0)
|
241
241
|
|
242
242
|
self.ss.RTEDES.update()
|
243
243
|
self.ss.RTEDES.run()
|
244
244
|
self.assertTrue(self.ss.RTEDES.converged, "RTEDES did not converge under line trip!")
|
245
|
-
self.assertAlmostEqual(self.ss.RTEDES.get(src='plf', attr='v', idx=
|
245
|
+
self.assertAlmostEqual(self.ss.RTEDES.get(src='plf', attr='v', idx='Line_3'),
|
246
246
|
0, places=6,
|
247
247
|
msg="Line trip does not take effect!")
|
248
248
|
|
249
|
-
self.ss.Line.alter(src='u', idx=
|
249
|
+
self.ss.Line.alter(src='u', idx='Line_3', value=1)
|
250
250
|
|
251
251
|
@skip_unittest_without_MISOCP
|
252
252
|
def test_set_load(self):
|
tests/test_rtn_uc.py
CHANGED
@@ -173,7 +173,7 @@ class TestUCES(unittest.TestCase):
|
|
173
173
|
"""
|
174
174
|
|
175
175
|
def setUp(self) -> None:
|
176
|
-
self.ss = ams.load(ams.get_case("5bus/
|
176
|
+
self.ss = ams.load(ams.get_case("5bus/pjm5bus_demo.xlsx"),
|
177
177
|
setup=True, default_config=True, no_output=True)
|
178
178
|
# decrease load first
|
179
179
|
self.ss.PQ.set(src='p0', attr='v', idx=['PQ_1', 'PQ_2'], value=[0.3, 0.3])
|
@@ -236,13 +236,13 @@ class TestUCES(unittest.TestCase):
|
|
236
236
|
"""
|
237
237
|
Test line tripping.
|
238
238
|
"""
|
239
|
-
self.ss.Line.set(src='u', attr='v', idx=
|
239
|
+
self.ss.Line.set(src='u', attr='v', idx='Line_3', value=0)
|
240
240
|
self.ss.UCES.update()
|
241
241
|
|
242
242
|
self.ss.UCES.run()
|
243
243
|
self.assertTrue(self.ss.UCES.converged, "UCES did not converge under line trip!")
|
244
|
-
plf_l3 = self.ss.UCES.get(src='plf', attr='v', idx=
|
244
|
+
plf_l3 = self.ss.UCES.get(src='plf', attr='v', idx='Line_3')
|
245
245
|
np.testing.assert_almost_equal(np.zeros_like(plf_l3),
|
246
246
|
plf_l3, decimal=6)
|
247
247
|
|
248
|
-
self.ss.Line.alter(src='u', idx=
|
248
|
+
self.ss.Line.alter(src='u', idx='Line_3', value=1)
|
tests/test_service.py
CHANGED
@@ -63,9 +63,9 @@ class TestService(unittest.TestCase):
|
|
63
63
|
"""
|
64
64
|
Test `ZonalSum`.
|
65
65
|
"""
|
66
|
-
ds = ZonalSum(u=self.ss.RTED.zd, zone="
|
66
|
+
ds = ZonalSum(u=self.ss.RTED.zd, zone="Area",
|
67
67
|
name="ds", tex_name=r"S_{d}",
|
68
|
-
info="Sum pl vector in shape of
|
68
|
+
info="Sum pl vector in shape of area",)
|
69
69
|
ds.rtn = self.ss.RTED
|
70
70
|
# check if the shape is correct
|
71
71
|
np.testing.assert_array_equal(ds.v.shape, (self.nR, self.nD))
|