@@ -498,7 +498,7 @@ async def test_case_5( # pylint: disable=too-many-statements
498498 """Test case 5.
499499
500500 - four battery pools with same batteries, but different priorities.
501- - two battery pools are incremental , two are not.
501+ - two battery pools are in the shifting group , two are not.
502502 - all batteries are working.
503503 """
504504 set_power = typing .cast (
@@ -531,8 +531,8 @@ async def test_case_5( # pylint: disable=too-many-statements
531531 await bounds_1_rx .receive (), power = None , lower = - 4000.0 , upper = 4000.0
532532 )
533533
534- # The target power of non-incremental battery pools should only be visible to
535- # other non-incremental battery pools, and vice-versa.
534+ # The target power of non-shifting battery pools should only be visible to other
535+ # non-shifting battery pools, and vice-versa.
536536 await battery_pool_2 .propose_power (
537537 Power .from_watts (200.0 ),
538538 bounds = timeseries .Bounds (
@@ -558,8 +558,8 @@ async def test_case_5( # pylint: disable=too-many-statements
558558 ]
559559 set_power .reset_mock ()
560560
561- # Set a power to the second non-incremental battery pool. This should also have
562- # no effect on the higher-priority incremental battery pools.
561+ # Set a power to the second non-shifting battery pool. This should also have
562+ # no effect on the shifting battery pools.
563563 await battery_pool_1 .propose_power (
564564 Power .from_watts (720.0 ),
565565 )
@@ -595,9 +595,9 @@ async def test_case_5( # pylint: disable=too-many-statements
595595 ]
596596 set_power .reset_mock ()
597597
598- # Setting power to an incremental battery pool should shift the bounds of the
599- # non-incremental battery pools to adjust for the target power of the incremental
600- # battery pools .
598+ # Setting power to a shifting battery pool should shift the bounds seen by the
599+ # non-shifting battery pools. It would also shift the final target power sent
600+ # in the batteries .
601601 await battery_pool_3 .propose_power (
602602 Power .from_watts (- 1000.0 ),
603603 )
@@ -634,25 +634,25 @@ async def test_case_5( # pylint: disable=too-many-statements
634634 ]
635635 set_power .reset_mock ()
636636
637- # Creating a new non-incremental battery pool that's higher priority than the
638- # incremental actors should shift the bounds of the incremental actors, because
639- # the non-incremental battery pools will already have a target power .
637+ # Creating a new non-shifting battery pool that's higher priority than the
638+ # shifting battery pools should still be shifted by the target power of the
639+ # shifting battery pools.
640640 battery_pool_5 = microgrid .battery_pool (priority = 5 )
641641 bounds_5_rx = battery_pool_5 .power_status .new_receiver ()
642642
643643 await battery_pool_5 .propose_power (None )
644644
645645 self ._assert_report (
646- await bounds_5_rx .receive (), power = 720.0 , lower = - 4000 .0 , upper = 4000 .0
646+ await bounds_5_rx .receive (), power = 720.0 , lower = - 3000 .0 , upper = 5000 .0
647647 )
648648 self ._assert_report (
649- await bounds_4_rx .receive (), power = - 1000.0 , lower = - 4720 .0 , upper = 3280 .0
649+ await bounds_4_rx .receive (), power = - 1000.0 , lower = - 4000 .0 , upper = 4000 .0
650650 )
651651 self ._assert_report (
652- await bounds_3_rx .receive (), power = - 1000.0 , lower = - 4720 .0 , upper = 3280 .0
652+ await bounds_3_rx .receive (), power = - 1000.0 , lower = - 4000 .0 , upper = 4000 .0
653653 )
654654 self ._assert_report (
655- await bounds_2_rx .receive (), power = 720.0 , lower = - 4000 .0 , upper = 4000 .0
655+ await bounds_2_rx .receive (), power = 720.0 , lower = - 3000 .0 , upper = 5000 .0
656656 )
657657 self ._assert_report (
658658 await bounds_1_rx .receive (), power = 720.0 , lower = - 1000.0 , upper = 1500.0
0 commit comments