diff --git a/domain/sap10_calculator/tables/table_12a.py b/domain/sap10_calculator/tables/table_12a.py index ab5394f1..b41819b0 100644 --- a/domain/sap10_calculator/tables/table_12a.py +++ b/domain/sap10_calculator/tables/table_12a.py @@ -342,11 +342,26 @@ def rdsap_tariff_for_cert( # evidence the dwelling is on an off-peak tariff — these charge # overnight at the low rate and cannot run economically on a single # rate, so the tariff is implied. Direct-acting electric / room heaters - # / heat pumps (Rule 3) are NOT off-peak evidence (they run on demand - # and exist on single-rate meters too), so they keep STANDARD here - # rather than being mis-billed 100% at the off-peak low rate. A - # non-electric main also keeps STANDARD (no Rule 4 default — Unknown - # must not force off-peak on a gas dwelling). + # / heat pumps (Rule 3) keep STANDARD here. A non-electric main also + # keeps STANDARD (no Rule 4 default — Unknown must not force off-peak + # on a gas dwelling). + # + # VERIFIED NON-FIX (2026-06-23, "simulated case 48" Elmhurst worksheet): + # Elmhurst DOES resolve an Unknown meter + room-heater main (SAP 691) to + # 10-Hour Off Peak (its Rule 3) — a hand-built case-48 Summary (main 691, + # Unknown meter, 903 dual electric immersion) scores Elmhurst SAP 57; our + # STANDARD gives 45, routing Unknown+Rule3 to off-peak gives 55 (7-hour + # gives 45 — confirms Elmhurst uses 10-hour). So the "Rule 3 is not off- + # peak evidence" intuition is WRONG about Elmhurst's behaviour. BUT + # adopting it REGRESSES the lodged-register corpus (72.5%->71.8%, MAE + # 0.793->0.827): of 11 Unknown+Rule3 corpus certs only ONE improves + # (Apartment 241 -5.38->-1.05); the other 10 overshoot +2.7..+9.1 (Flat 2 + # +9.11). The register's meter_type=3 certs were lodged with STANDARD- + # tariff costing (their low ratings only reconcile at 13.19p flat) — the + # gov-API "Unknown" is lossy and does NOT mean off-peak was used. Since + # our north star is reproducing the lodged register (not Elmhurst's + # deliberate-Unknown worksheet path), KEEP STANDARD. Same "Elmhurst != the + # noisy register" family as roof-windows/shutters. Do NOT re-litigate. if _meter_is_unknown(meter_type): if main_codes & _RULE_1_CPSU_CODES: return Tariff.TEN_HOUR