EV-05 round 2: the peak cut waits 15 s while a battery can give
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:
@@ -244,6 +244,9 @@ def drive(house, sun, *, dur=600.0, ratings=None, socs=None, cap=3500.0,
|
||||
or g.saturated)),
|
||||
floor=(None if g is None else g.floor_w),
|
||||
excess=(None if g is None else g.excess_w),
|
||||
want=(None if g is None else g.wanted_w),
|
||||
since=c._car_want_since,
|
||||
able=c._car_batt_able(), socs=dict(plant.socs),
|
||||
proj=(None if g is None else g.projected_w),
|
||||
target=(None if g is None else g.target_w),
|
||||
would=w.would, single=w.single,
|
||||
@@ -254,7 +257,8 @@ def drive(house, sun, *, dur=600.0, ratings=None, socs=None, cap=3500.0,
|
||||
if callable(on_cycle):
|
||||
on_cycle(plant, c, t)
|
||||
for u, kwh in (caps or {}).items():
|
||||
lv = plant.socs[u] - plant.batt_of(u, t) / 36.0 / kwh
|
||||
# 1 s of W, as a percent of kWh: W / 3600 / (kWh x 1000) x 100
|
||||
lv = plant.socs[u] - plant.batt_of(u, t) / 36000.0 / kwh
|
||||
plant.socs[u] = max(0.0, min(100.0, lv))
|
||||
t += 1.0
|
||||
await c.car_settle()
|
||||
|
||||
Reference in New Issue
Block a user