Skip to content

Commit aa320b0

Browse files
CopilotMaStr
andcommitted
chore: default precharge overhang feature flag to false
Co-authored-by: MaStr <1036501+MaStr@users.noreply.github.com>
1 parent 48447a1 commit aa320b0

3 files changed

Lines changed: 3 additions & 2 deletions

File tree

config/batcontrol_config_dummy.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ battery_control_expert:
2828
soften_price_difference_on_charging: False # enable earlier charging based on a more relaxed calculation
2929
# future_price <= current_price-min_price_difference/soften_price_difference_on_charging_factor
3030
soften_price_difference_on_charging_factor: 5
31-
enable_precharge_overhang: true # Feature flag for charging overflow before the price turning point
31+
enable_precharge_overhang: false # Feature flag for charging overflow before the price turning point
3232
max_charge_loss_factor: 0.1 # Assume up to 10% charging losses for slot planning
3333
round_price_digits: 4 # round price to n digits after the comma
3434
production_offset_percent: 1.0 # Adjust production forecast by a percentage (1.0 = 100%, 0.8 = 80%, etc.)

src/batcontrol/logic/default.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def __init__(self, timezone: datetime.timezone = datetime.timezone.utc,
3030
self.soften_price_difference_on_charging = False
3131
self.soften_price_difference_on_charging_factor = 5.0 # Default factor
3232
self.max_charge_loss_factor = 0.1
33-
self.enable_precharge_overhang = True
33+
self.enable_precharge_overhang = False
3434
self.timezone = timezone
3535
self.interval_minutes = interval_minutes
3636
self.common = CommonLogic.get_instance()

tests/batcontrol/logic/test_default.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,7 @@ def test_charge_rate_calculation_with_remaining_time(self):
328328

329329
def test_recharge_overhang_is_charged_before_turning_point(self):
330330
"""Test that only the overhang is charged when multiple slots are required."""
331+
self.logic.enable_precharge_overhang = True
331332
self.logic.max_charge_loss_factor = 0.1
332333
self.logic.set_calculation_parameters(
333334
CalculationParameters(

0 commit comments

Comments
 (0)