Skip to content

Commit

Permalink
Fix bug where sometimes plan jumped to high charging (#1861)
Browse files Browse the repository at this point in the history
End record was changed late causing bad plan results with calculate second pass
  • Loading branch information
springfall2008 authored Jan 8, 2025
1 parent e23d24f commit 683661f
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions apps/predbat/plan.py
Original file line number Diff line number Diff line change
Expand Up @@ -2236,8 +2236,6 @@ def optimise_all_windows(self, best_metric, metric_keep, debug_mode=False):
)
)

# Re-compute end record
self.end_record = self.record_length(self.charge_window_best, self.charge_limit_best, best_price)
record_charge_windows = max(self.max_charge_windows(self.end_record + self.minutes_now, self.charge_window_best), 1)
record_export_windows = max(self.max_charge_windows(self.end_record + self.minutes_now, self.export_window_best), 1)

Expand Down

0 comments on commit 683661f

Please sign in to comment.