-
Couldn't load subscription status.
- Fork 20
Closed
Labels
part:power-managementAffects the management of battery power and distributionAffects the management of battery power and distributionpart:❓We need to figure out which part is affectedWe need to figure out which part is affectedpriority:❓We need to figure out how soon this should be addressedWe need to figure out how soon this should be addressedtype:bugSomething isn't workingSomething isn't working
Milestone
Description
What happened?
When 0 power is requested when there are exclusion bounds, the power distributor is returning non-zero power values that are outside the exclusion bounds. This can be reproduced by adding the below snippet under test_scenario_1
diff --git a/tests/actor/power_distributing/test_battery_distribution_algorithm.py b/tests/actor/power_distributing/test_battery_distribution_algorithm.py
index 3501cc2c..3841deef 100644
--- a/tests/actor/power_distributing/test_battery_distribution_algorithm.py
+++ b/tests/actor/power_distributing/test_battery_distribution_algorithm.py
@@ -1039,6 +1039,10 @@ class TestDistWithExclBounds:
algorithm = BatteryDistributionAlgorithm()
+ self.assert_result(
+ algorithm.distribute_power(0, components),
+ DistributionResult({1: 0, 3: 0, 5: 0}, remaining_power=0.0),
+ )
self.assert_result(
algorithm.distribute_power(-300, components),
DistributionResult({1: -100, 3: -100, 5: -100}, remaining_power=0.0),What did you expect instead?
It should produce 0 values, because the api service accepts 0 values, even when there are exclusion bounds.
Affected version(s)
No response
Affected part(s)
I don't know (part:❓)
Extra information
We renamed the power distribution label to power management, but the Affected part(s) dropdown when reporting a bug still says power distribution.
Metadata
Metadata
Assignees
Labels
part:power-managementAffects the management of battery power and distributionAffects the management of battery power and distributionpart:❓We need to figure out which part is affectedWe need to figure out which part is affectedpriority:❓We need to figure out how soon this should be addressedWe need to figure out how soon this should be addressedtype:bugSomething isn't workingSomething isn't working
Type
Projects
Status
Done