EV-20 review round 1: no 1-phase current on 3 phases after a select; rows for mE, mF, mC
After its own phase select (taken, or with a late read-back), Solar ends the sequence with the lower of the currents for the new phases and the phases the charger reports, and keeps the plan on them; the old phases' current comes back only when no select went out (EV-28's cap). Rows: T19/T33 settle write refused or ignored once and select confirmed late; an exit after a given-up write; shutdown in Off with the 0 A owed; Stop with a refused 0 A and another writer. NoCharger.write_current takes took_s; ev_mode_start text names C1; NL solar_hold wording. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VSY9UpTaUYnjJF5oVtbM1w
This commit is contained in:
@@ -686,6 +686,48 @@ for pmin, back in ((10, 6.0), (5, 0.0)):
|
||||
and (nth(w19f, 1)[1] == 6.0 if back else len(w19f) == 1)
|
||||
and not [a for t, a in w19f if a > 6.0])
|
||||
nevers(r19f, f"T19 (failed, {pmin} min)")
|
||||
# Review round 1, Major 1: Solar's own 1 -> 3 change (the T7 shape) where the
|
||||
# select went out but (i) the settle current write is refused once, or (ii)
|
||||
# the select's read-back comes later than 10 s. Every current written after the
|
||||
# select is floor(car_w / (230 x the phases the charger reports)): 10 A, never
|
||||
# the 1-phase 16 A on 3 phases.
|
||||
|
||||
|
||||
class LateSel(SimCharger):
|
||||
"""The phases select shows in the read-back 12 s late (HA took it)."""
|
||||
|
||||
def request_phases(self, n):
|
||||
keep, self.lag_s = self.lag_s, 12.0
|
||||
try:
|
||||
return super().request_phases(n)
|
||||
finally:
|
||||
self.lag_s = keep
|
||||
|
||||
|
||||
r7b = S.drive(const(900.0), const(7900.0), dur=500, first="car",
|
||||
socs={"a": 71.0, "b": 100.0})
|
||||
ts7 = [x[0] for x in r7b["sim"].log if x[1] == "current"
|
||||
and x[2] not in (0.0, 16.0)]
|
||||
for how, sim_ in (("settle write refused once",
|
||||
TSim(setpoint_a=0, windows=[(nth(ts7, 0) - 1,
|
||||
nth(ts7, 0) + 1, "error")])),
|
||||
("settle write ignored once",
|
||||
TSim(setpoint_a=0, windows=[(nth(ts7, 0) - 1,
|
||||
nth(ts7, 0) + 2, "ignore")])),
|
||||
("select confirmed late", LateSel(setpoint_a=0))):
|
||||
rm1 = S.drive(const(900.0), const(7900.0), dur=600, first="car",
|
||||
socs={"a": 71.0, "b": 100.0}, sim=sim_)
|
||||
over = [(x["t"], x["sp"]) for x in rm1["trace"]
|
||||
if x["ph"] == 3 and x["sp"] > 10.0]
|
||||
after = [a for t, e, a in rm1["plant"].sets
|
||||
if e == SET and t > 290.0]
|
||||
check(f"T19/T33 [{how}]: after the select every current is 10 A for 3 "
|
||||
f"phases, never 1-phase 16 A on 3 ({len(over)} s over 10 A on 3: "
|
||||
f"{over[:3]}; currents tried after 290 s {after})",
|
||||
present(nth(ts7, 0)) and not over and 16.0 not in after
|
||||
and rm1["sim"].phases_allowed == 3
|
||||
and rm1["sim"].setpoint_a == 10.0)
|
||||
nevers(rm1, f"T19/T33 [{how}]")
|
||||
r19a = std(1800, sun=const(600.0 + 6900.0), opts={"ev_phases": "1"})
|
||||
check(f"T19: fixed 1 with 6.9 kW for 30 min: no select, 16 A "
|
||||
f"({cur_writes(r19a)})", selects(r19a) == []
|
||||
|
||||
Reference in New Issue
Block a user