File tree Expand file tree Collapse file tree 5 files changed +5
-10
lines changed
src/frequenz/sdk/actor/_power_managing Expand file tree Collapse file tree 5 files changed +5
-10
lines changed Original file line number Diff line number Diff line change @@ -91,7 +91,7 @@ class Proposal:
9191
9292 These bounds will apply to actors with a lower priority, and can be overridden by
9393 bounds from actors with a higher priority. If None, the power bounds will be set to
94- the maximum power of the batteries in the pool. This is currently and experimental
94+ the maximum power of the batteries in the pool. This is currently an experimental
9595 feature.
9696 """
9797
@@ -144,7 +144,7 @@ class BaseAlgorithm(abc.ABC):
144144 """The base class for algorithms."""
145145
146146 @abc .abstractmethod
147- def get_target_power (
147+ def calculate_target_power (
148148 self ,
149149 battery_ids : frozenset [int ],
150150 proposal : Proposal | None ,
Original file line number Diff line number Diff line change @@ -123,7 +123,7 @@ def _validate_battery_ids(
123123 return True
124124
125125 @override
126- def get_target_power (
126+ def calculate_target_power (
127127 self ,
128128 battery_ids : frozenset [int ],
129129 proposal : Proposal | None ,
Original file line number Diff line number Diff line change @@ -148,7 +148,7 @@ async def _send_updated_target_power(
148148 ) -> None :
149149 from .. import power_distributing # pylint: disable=import-outside-toplevel
150150
151- target_power = self ._algorithm .get_target_power (
151+ target_power = self ._algorithm .calculate_target_power (
152152 battery_ids ,
153153 proposal ,
154154 self ._system_bounds [battery_ids ],
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ def test_tgt_power(
3535 ) -> None :
3636 nonlocal call_count
3737 call_count += 1
38- tgt_power = algorithm .get_target_power (
38+ tgt_power = algorithm .calculate_target_power (
3939 batteries ,
4040 Proposal (
4141 battery_ids = batteries ,
Original file line number Diff line number Diff line change @@ -180,11 +180,6 @@ async def test_case_1(
180180
181181 battery_pool = microgrid .battery_pool ()
182182
183- # This is used just to wait for the processing to be complete. The results are
184- # not used.
185- #
186- # It will be replaced by a reporting streaming from the PowerManager in a
187- # subsequent commit.
188183 bounds_rx = battery_pool .power_status .new_receiver ()
189184
190185 self ._assert_report (
You can’t perform that action at this time.
0 commit comments