PRICE-02 review: keep an open buy over midnight in the real-year replay; say which variant the kWh figure is
The production-shaped plan sees tomorrow from 13:00, so most buys are sold the next day or later. The ledger forgot the open buy at each midnight and booked 46 of 51 sales as holdings: 5 trips, +1.21 EUR. Carried over, the same decisions give 51 trips, +13.81 EUR, all clearing the threshold. Decisions are unchanged and identical on the old and new verdict. No assertion changed. DECISIONS: 27.5 -> 42.6 kWh is the refresh-:00, tomorrow-known variant; give the range of the other three. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Bdqr7PiaHcBnzPituu2yTC
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
3dd4dd89e0
commit
6b2d0091d6
@@ -2093,12 +2093,14 @@ def replay_real(days, threshold, unc, *, soc0=50.0, floor=20.0, ceiling=95.0):
|
||||
it and never a day on its own. (An earlier version built one plan per
|
||||
calendar day with no tomorrow: after the cheap hour no cheap hour was left
|
||||
ahead, and the ledger shrank to a few trades that no real site would see.)
|
||||
An open buy is kept over midnight: with tomorrow in view most buys are
|
||||
sold the next day or later (46 of 51 at the shipped threshold).
|
||||
"""
|
||||
soc = soc0
|
||||
trades, holdings, bad, neg_sells = [], [], [], 0
|
||||
open_buy = None
|
||||
for di, day in enumerate(days):
|
||||
nxt = days[di + 1] if di + 1 < len(days) else []
|
||||
open_buy = None
|
||||
for i, p in enumerate(day):
|
||||
ahead = day[i:] + (nxt if brussels(p.start).hour >= 13 else [])
|
||||
plan = TariffPlan(
|
||||
|
||||
Reference in New Issue
Block a user