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.
Files changed (53) hide show
  1. ams/_version.py +3 -3
  2. ams/cases/5bus/pjm5bus_demo.xlsx +0 -0
  3. ams/cases/5bus/pjm5bus_ev.xlsx +0 -0
  4. ams/cases/5bus/pjm5bus_jumper.xlsx +0 -0
  5. ams/cases/hawaii40/Hawaii40.m +375 -0
  6. ams/cases/ieee14/ieee14_uced.xlsx +0 -0
  7. ams/cases/ieee39/ieee39_uced.xlsx +0 -0
  8. ams/cases/ieee39/ieee39_uced_esd1.xlsx +0 -0
  9. ams/cases/ieee39/ieee39_uced_pvd1.xlsx +0 -0
  10. ams/cases/ieee39/ieee39_uced_vis.xlsx +0 -0
  11. ams/cases/matpower/case5.m +25 -0
  12. ams/core/matprocessor.py +7 -16
  13. ams/core/service.py +4 -3
  14. ams/interface.py +17 -4
  15. ams/io/__init__.py +1 -0
  16. ams/io/matpower.py +165 -7
  17. ams/io/psse.py +1 -1
  18. ams/models/__init__.py +1 -1
  19. ams/models/group.py +77 -6
  20. ams/models/line.py +3 -164
  21. ams/models/renewable/regc.py +1 -5
  22. ams/models/reserve.py +2 -2
  23. ams/models/static/gen.py +11 -3
  24. ams/models/static/pq.py +2 -2
  25. ams/models/timeslot.py +1 -1
  26. ams/routines/dcopf.py +1 -1
  27. ams/routines/dcpf0.py +1 -1
  28. ams/routines/dopf.py +10 -10
  29. ams/routines/ed.py +3 -4
  30. ams/routines/pflow.py +9 -10
  31. ams/routines/rted.py +20 -29
  32. ams/routines/uc.py +1 -1
  33. ams/system.py +11 -18
  34. docs/source/api.rst +2 -0
  35. docs/source/getting_started/copyright.rst +1 -1
  36. docs/source/release-notes.rst +24 -0
  37. {ltbams-1.0.6.dist-info → ltbams-1.0.8.dist-info}/METADATA +1 -1
  38. {ltbams-1.0.6.dist-info → ltbams-1.0.8.dist-info}/RECORD +48 -51
  39. {ltbams-1.0.6.dist-info → ltbams-1.0.8.dist-info}/WHEEL +1 -1
  40. tests/test_1st_system.py +31 -0
  41. tests/test_case.py +27 -19
  42. tests/test_io.py +15 -0
  43. tests/test_rtn_ed.py +4 -4
  44. tests/test_rtn_rted.py +4 -4
  45. tests/test_rtn_uc.py +4 -4
  46. tests/test_service.py +2 -2
  47. ams/cases/5bus/pjm5bus_uced.json +0 -1062
  48. ams/cases/5bus/pjm5bus_uced.xlsx +0 -0
  49. ams/cases/5bus/pjm5bus_uced_esd1.xlsx +0 -0
  50. ams/cases/5bus/pjm5bus_uced_ev.xlsx +0 -0
  51. tests/test_andes_mats.py +0 -61
  52. {ltbams-1.0.6.dist-info → ltbams-1.0.8.dist-info}/entry_points.txt +0 -0
  53. {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/pjm5bus_uced_esd1.xlsx"),
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=3, value=0)
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=3)
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=3, value=1)
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/pjm5bus_uced_esd1.xlsx"),
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=3, value=0)
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=3),
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=3, value=1)
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/pjm5bus_uced_esd1.xlsx"),
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=3, value=0)
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=3)
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=3, value=1)
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="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 zone",)
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))