Skip to content

Commit

Permalink
Incorrect data when iboost today exceeds target (#1387)
Browse files Browse the repository at this point in the history
  • Loading branch information
springfall2008 authored Aug 24, 2024
1 parent 9a1ff83 commit 559642e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apps/predbat/prediction.py
Original file line number Diff line number Diff line change
Expand Up @@ -533,12 +533,12 @@ def run_prediction(self, charge_limit, charge_window, discharge_window, discharg
# IBoost based on plan for given rates
if self.iboost_plan and (self.iboost_on_discharge or (discharge_window_n < 0)):
iboost_load = self.in_iboost_slot(minute_absolute) * step / 60.0
iboost_amount = min(iboost_load, self.iboost_max_power * step, self.iboost_max_energy - iboost_today_kwh)
iboost_amount = min(iboost_load, self.iboost_max_power * step, max(self.iboost_max_energy - iboost_today_kwh, 0))

# IBoost based on Predbat charging
if self.iboost_charging and iboost_rate_okay and iboost_today_kwh < self.iboost_max_energy:
if charge_window_n >= 0:
iboost_amount = min(self.iboost_max_power * step, self.iboost_max_energy - iboost_today_kwh)
iboost_amount = min(self.iboost_max_power * step, max(self.iboost_max_energy - iboost_today_kwh, 0))

# Freeze discharge on iboost
if iboost_amount > 0 and self.iboost_prevent_discharge:
Expand Down

0 comments on commit 559642e

Please sign in to comment.