Skip to content

Commit 40d9355

Browse files
committed
Remove unused methods in power distributing actor
Signed-off-by: Sahas Subramanian <[email protected]>
1 parent 9db06e4 commit 40d9355

File tree

1 file changed

+0
-50
lines changed

1 file changed

+0
-50
lines changed

src/frequenz/sdk/actor/power_distributing/power_distributing.py

Lines changed: 0 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -273,56 +273,6 @@ def _get_bounds(
273273
),
274274
)
275275

276-
def _get_upper_bound(self, batteries: abc.Set[int], include_broken: bool) -> float:
277-
"""Get total upper bound of power to be set for given batteries.
278-
279-
Note, output of that function doesn't guarantee that this bound will be
280-
the same when the request is processed.
281-
282-
Args:
283-
batteries: List of batteries
284-
include_broken: whether all batteries in the batteries set in the
285-
request must be used regardless the status.
286-
287-
Returns:
288-
Upper bound for `set_power` operation.
289-
"""
290-
pairs_data: List[InvBatPair] = self._get_components_data(
291-
batteries, include_broken
292-
)
293-
return sum(
294-
min(
295-
battery.power_inclusion_upper_bound,
296-
inverter.active_power_inclusion_upper_bound,
297-
)
298-
for battery, inverter in pairs_data
299-
)
300-
301-
def _get_lower_bound(self, batteries: abc.Set[int], include_broken: bool) -> float:
302-
"""Get total lower bound of power to be set for given batteries.
303-
304-
Note, output of that function doesn't guarantee that this bound will be
305-
the same when the request is processed.
306-
307-
Args:
308-
batteries: List of batteries
309-
include_broken: whether all batteries in the batteries set in the
310-
request must be used regardless the status.
311-
312-
Returns:
313-
Lower bound for `set_power` operation.
314-
"""
315-
pairs_data: List[InvBatPair] = self._get_components_data(
316-
batteries, include_broken
317-
)
318-
return sum(
319-
max(
320-
battery.power_inclusion_lower_bound,
321-
inverter.active_power_inclusion_lower_bound,
322-
)
323-
for battery, inverter in pairs_data
324-
)
325-
326276
async def _send_result(self, namespace: str, result: Result) -> None:
327277
"""Send result to the user.
328278

0 commit comments

Comments
 (0)