You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: compute rate_min_base/rate_max_base from the gap-filled rate curve, not the raw sparse fetch (#4544)
rate_min_base/rate_max_base were captured from a scan of the raw import rate
dict before rate_replicate() ran. For a tariff whose forward-fetch window is
short (e.g. Kraken/E.ON Next Drive Smart, a fixed day/night product where the
raw fetch only exposes the currently-active segment), the scan only ever saw
the known segment and locked in the wrong "true" min/max for the day -
rate_add_io_slots() then stamped IOG/SmartFlex dispatch slots with that stale
value instead of the tariff's real off-peak price, showing as "Predbat charges
the car at the high import rate".
New rate_base_min_max() helper replicates first (mirroring how rate_export_base
is already built downstream of rate_replicate() on the export side) and scans
the result, so a segment that hasn't started yet but is recoverable from
history is reflected correctly.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
0 commit comments