MAINT-28 fix-forward round 3: the cap is the guard's largest claim of the period, 0 W for a pack the guard does not place on
test_maint28 quarter bound back to aim + 1 W (now 5925 W; the guard alone landed 5960.1 W): the pack's limit is the largest floor the guard claimed in the 15-minute period. A pack in peak_guard.held (the guard places its claim on the others) gets 0 W. test_safety84 n2_charge_banked re-pinned again, its banked quarters asserted under the aim. New test: guard claims on the other pack only. Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude
parent
776b84ca20
commit
fb4a449591
@@ -158,7 +158,7 @@ back = next((i for i, r in enumerate(after) if r["a"] < -50), None) # cycles
|
||||
print(f" first give at {trip}, flips in the load {flips(load)}, charge s in"
|
||||
f" the load {sum(1 for r in load if r['a'] < -50)}, charge back "
|
||||
f"{back} cycles after it, quarters "
|
||||
f"{[round(a[0] / a[1], 1) for a in st['quarters'].values()]}")
|
||||
f"{[round(a[0] / a[1]) for a in st['quarters'].values()]}")
|
||||
check("the guard stepped in once the projection went over the aim",
|
||||
trip is not None)
|
||||
check("from the first give to the load's end A does not flip",
|
||||
@@ -166,10 +166,8 @@ check("from the first give to the load's end A does not flip",
|
||||
check("...and does not charge at all", not any(r["a"] < -50 for r in load))
|
||||
check("...the pause is on in every one of those cycles",
|
||||
all(r["susp"] for r in load))
|
||||
# MAINT-28 fix: A gives only the guard's claim, so the guard lands the quarter
|
||||
# itself: 5960.1 W against the 5950 W aim, 40 W under the month peak.
|
||||
check("every quarter under the month peak (no new peak)",
|
||||
max(a[0] / a[1] for a in st["quarters"].values()) <= MONTH_PEAK)
|
||||
check("every quarter at or under the month aim",
|
||||
max(a[0] / a[1] for a in st["quarters"].values()) <= AIM + 1.0)
|
||||
check("after the load A's charge is back within 10 cycles (1 s each)",
|
||||
back is not None and back <= 10)
|
||||
tail = [r["a"] for r in after[10:]]
|
||||
|
||||
Reference in New Issue
Block a user