Skip to content

Commit fdd9e27

Browse files
Remove redundant deficits updates
Originally, deficit updates were introduced as part of adding support for exclusion bounds in the power distribution algorithm. However, it was primarily for reasoning purposes, and these updates have no actual effects. Only the distributed_power requires updating and the deficit updates were safely removed. Signed-off-by: Daniel Zullo <[email protected]>
1 parent f22149d commit fdd9e27

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

src/frequenz/sdk/power/_distribution_algorithm.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -422,12 +422,8 @@ def _distribute_power( # pylint: disable=too-many-arguments
422422
left_over = power_w - distributed_power
423423
if left_over > -deficit:
424424
distributed_power += deficit
425-
deficit = 0.0
426-
deficits[inverter_id] = 0.0
427425
elif left_over > 0.0:
428-
deficit += left_over
429426
distributed_power += left_over
430-
deficits[inverter_id] = deficit
431427

432428
left_over = power_w - distributed_power
433429
dist = DistributionResult(distribution, left_over)

0 commit comments

Comments
 (0)