EV-21: Solar cuts the car first for the quarter peak
In Solar, when the 15-minute period heads over the aim and the batteries would have to give more, the car is lowered first: floor((car - excess) / (230 x phases)) A, 0 under 6 A. At once without real headroom (saturated, floor-limited, excess beyond what the batteries can add, no battery figure, cover off, last 120 s), else after at most 15 s. One cut per episode from its start, deeper only on a growing excess; restart with the start power under the aim for the start time; none after a 2nd cut in the period. Grading (formal C2): a Solar car Solar cannot cut is graded, banked and left in the guard as in Off. A Solar car is never banked. Grey note and Why "Solar lowered the car for the peak." Manual and Off unchanged. Tests: test_ev21.py, test_ev21_paths.py, test_ev21_same.py; T49 in tools/ev20_day.py; T50 in test_ev20_fuzz.py; test_ev20_guard section 8 moved from "as Manual" to "as Off" where Solar cannot cut (T51). Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -190,6 +190,8 @@ T_CHARGER_UNREACH = "Charger not reachable"
|
||||
T_CHARGER_UNREACH_NL = "Laadpaal onbereikbaar"
|
||||
T_CAR_OVER = "Car over the peak limit"
|
||||
T_CAR_OVER_NL = "Auto boven de piekgrens"
|
||||
T_CAR_CUT = "Car lowered for the peak"
|
||||
T_CAR_CUT_NL = "Auto verlaagd voor de piek"
|
||||
T_CAR_RELEASE = "Car may still be charging"
|
||||
T_CAR_START = "Charger kept its current"
|
||||
T_CAR_START_NL = "Laadpaal hield haar stroom"
|
||||
@@ -209,6 +211,7 @@ ID_NO_PRICES = "goodwe_no_prices"
|
||||
ID_CHARGER_UNREACH = "goodwe_charger_unreachable"
|
||||
ID_CAR_OVER = "goodwe_car_over"
|
||||
ID_CAR_RELEASE = "goodwe_car_release"
|
||||
ID_CAR_CUT = "goodwe_car_cut"
|
||||
ID_CAR_START = "goodwe_car_start_current"
|
||||
# PRICE-01: an earlier build raised a card with this id. Nothing raises it now;
|
||||
# the add-on only dismisses it at start.
|
||||
@@ -545,6 +548,15 @@ def row_car_over_solar(a_text) -> str:
|
||||
return Bi(*_solar_over(a_text))
|
||||
|
||||
|
||||
def car_cut() -> Notice:
|
||||
"""EV-21 (OQ5): Solar cut the car first for the peak, and the charger
|
||||
took it. Grey, once per charging session."""
|
||||
return Notice(ID_CAR_CUT, INFO, T_CAR_CUT,
|
||||
"Solar lowered the car for the peak.",
|
||||
body_nl=f"{T_CAR_CUT_NL}. Zon verlaagde de auto voor de "
|
||||
"piek.")
|
||||
|
||||
|
||||
def car_release_failed() -> Notice:
|
||||
"""EV-20 (D3): at shutdown in Solar the charger did not take 0 A, and the
|
||||
inverters were released on time anyway. Taken down when the next start's
|
||||
@@ -1894,6 +1906,7 @@ def samples() -> list:
|
||||
charger_unreachable("09:12"),
|
||||
car_over("16"),
|
||||
car_over_solar("8"),
|
||||
car_cut(),
|
||||
car_release_failed(),
|
||||
car_start_current("10"),
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user