EV-05 round 2: the peak cut waits 15 s while a battery can give
checks / unit (pull_request) Successful in 23m32s
infra-pin / fresh (pull_request) Successful in 1s

Owner 2026-11-18 (dev finding 1, brief v4 Expected 8): while a battery is
above its cut-out, the car's peak cut waits until the guard has wanted power
for 15 s in a row (CUT_WAIT_S), so a cloud edge the batteries catch does not
pause the car. It cuts at once with no battery able, or with 120 s or less of
the 15-minute period left (CUT_NEAR_END_S: waiting 15 s then costs at most
8/7 of the cut, taken off the car at once).

Tests: T21/T22 cut at 15 s and not sooner, the period lands under the aim;
T21b a house step and a cloud edge the batteries catch: no cut, no pause;
T24 (c) late in the period: the cut at once, under the aim; T12's cut row
with the batteries at their cut-out. The harness's battery level model was
1000x too fast (round 1); fixed. The 10-hour day: 0 cut pauses in both
priorities.

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
ems-agent
2026-11-18 10:13:02 +01:00
co-authored by Claude
parent 8ba3e1c337
commit 17a7b299d2
6 changed files with 152 additions and 39 deletions
+8 -3
View File
@@ -179,7 +179,11 @@ for first, race in (("batteries", False), ("car", True)):
# so with Batteries first the car gets sun once they are full.
r44 = S.drive(house=house44, sun=sun44, first=first, socs={"a": 40.0,
"b": 60.0},
caps={"a": 15.36, "b": 20.48}, dur=36000, race=race)
caps={"a": 15.36, "b": 20.48}, dur=36000, race=race,
opts={"slew_w": 0})
# `slew_w` 0 is the shipped default. With the harness's usual 400 W a
# cycle (the SAFETY-81 rig) this day also has no cut pause (dev report,
# round 2).
# On the harness clock, as the trace (the model's own clock runs ahead).
w44 = [(x[0], x[2]) for x in r44["plant"].wlog if x[1] == "current"]
p44 = [(x[0], x[2]) for x in r44["plant"].wlog if x[1] == "phases"]
@@ -241,7 +245,8 @@ for first, race in (("batteries", False), ("car", True)):
if g > 3410.0 and g - car <= 3410.0]
gaps = [b[0] - a[0] for a, b in zip(p44, p44[1:])]
check(f"T44 {first} first ({'race' if race else 'step'}): starts {starts} "
f"(<= 1 + {long44} long clouds + {len(cut_t)} peak cuts, Car first)"
f"(<= 1 + {long44} long clouds, Car first); peak-cut pauses "
f"{len(cut_t)} (round 2: none, the batteries catch the cloud edges)"
f"; pauses {pauses}; N5 dwells {n5[:3]}; selects {len(p44)} "
f"(gaps >= 600 s: {gaps[:4]}); no pause from a short cloud "
f"{short_hit[:3]}; the car's grid energy outside holds {grid_wh:.1f} "
@@ -249,7 +254,7 @@ for first, race in (("batteries", False), ("car", True)):
f"{len(steps44)} steps and edges); quarters over the aim by the car "
f"{over44}",
starts >= 1 and not n5 and all(g >= 600 for g in gaps)
and (first != "car" or starts <= 1 + long44 + len(cut_t))
and not cut_t and (first != "car" or starts <= 1 + long44)
and not seq_ok(r44) and not short_hit and grid_wh <= 10.0
and not over44)