Revert "MAINT-28: during a real peak the maintenance charge stays paused (#247)"
Takes PR #247 (f3f9483) out of release/1.0 so the 19 Nov release ships MAINT-24 + MAINT-25 without MAINT-28. The rig failedf3f9483(reports/MAINT-28-test-report.md) and the fix-forward PR #248 review found a High regression (reports/MAINT-28-fix-review-report.md). MAINT-28 continues on PR #248 after the release. Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude
parent
f3f9483d9c
commit
7bc8ad264b
@@ -28,10 +28,6 @@ FLOOR_AT_SOC_FLOOR = "the battery level is at or below the peak reserve"
|
||||
|
||||
SOURCE = "peak"
|
||||
|
||||
# MAINT-28. Watts the house must sit under the aim before a paused maintenance
|
||||
# charge resumes. DECISIONS/MAINT-28-hold-the-pause-in-a-peak.md.
|
||||
MAINT_RESUME_UNDER_W = 300.0
|
||||
|
||||
# Mirror of config.yaml's peak options, pinned to the file by
|
||||
# test_peakguard.py. Not a read: `decide()` takes them as arguments.
|
||||
PEAK_OPTION_DEFAULTS = {
|
||||
@@ -450,20 +446,6 @@ def shaping_suspended(decision, peak_forecast_w, cap_w) -> bool:
|
||||
return decision is not None and decision.engaged
|
||||
|
||||
|
||||
def shaping_held(suspended, held, peak_forecast_w, aim_w, house_w) -> bool:
|
||||
"""MAINT-28. `suspended` (`shaping_suspended()`'s answer), kept on while
|
||||
`held` until the house is `MAINT_RESUME_UNDER_W` under `aim_w`
|
||||
(`peak_forecast_w` stands in for an unread house; neither read: not held,
|
||||
as SAFETY-63). Only ever pauses the maintenance charge, never a cut-back.
|
||||
DECISIONS/MAINT-28-hold-the-pause-in-a-peak.md."""
|
||||
if suspended:
|
||||
return True
|
||||
if not held:
|
||||
return False
|
||||
level = house_w if house_w is not None else peak_forecast_w
|
||||
return level is not None and level > float(aim_w) - MAINT_RESUME_UNDER_W
|
||||
|
||||
|
||||
def cap_floor(decision, cap_w):
|
||||
"""SAFETY-128: the floor no higher than `cap_w` (the command standing while
|
||||
the readings have not answered it), or `decision` unchanged when None.
|
||||
|
||||
Reference in New Issue
Block a user