MAINT-28 fix-forward round 2: while the pause holds, the maintenance pack gives only what the peak guard claims
Owner go 2026-11-13. The pack in maintenance CHARGE gets a unit limit with hi = the guard's own floor while the pause holds, at any SoC (replaces the under-reserve limit). Sim 45 min: A give 2.39 -> 0.02 kWh, SoC 49.0 %, charge back 4 s. test_safety84 n2_charge_banked re-pinned (192 of 480 rows), test_maint28 quarter bound to the month peak. Tests: test_maint28b.py. Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude
parent
34b81e8aeb
commit
776b84ca20
@@ -589,11 +589,12 @@ class CycleMixin:
|
||||
"suspended so the peak claim is not "
|
||||
"contradicted",
|
||||
hint=messages.hint("maint_paused"))
|
||||
# MAINT-28: under its peak reserve this pack gives only
|
||||
# what the guard claims. DECISIONS/MAINT-28-hold-the-pause-in-a-peak.md
|
||||
shape = ((0.0, "peak reserve")
|
||||
if _m28 and inv.name in self._under_reserve()
|
||||
else None)
|
||||
# MAINT-28: while held this pack gives only what the
|
||||
# guard claims. DECISIONS/MAINT-28-hold-the-pause-in-a-peak.md
|
||||
shape = ((max((c.lo for c in claims
|
||||
if c.source == peakguard.SOURCE),
|
||||
default=0.0), "peak hold")
|
||||
if _m28 else None)
|
||||
else:
|
||||
self._maint_shape_suspended = False
|
||||
hi = 0.0
|
||||
|
||||
Reference in New Issue
Block a user