docs(tariff): record Unknown-meter off-peak as a verified non-fix (RdSAP 10 §12 Rules, table_12a)

Khalim's hand-built "simulated case 48" Elmhurst worksheet (main 691 room
heaters + Unknown meter + 903 dual electric immersion + cylinder) proves
Elmhurst resolves an Unknown meter + Rule-3 room-heater main to 10-Hour Off
Peak — Elmhurst SAP 57; ours (STANDARD) 45; routing Unknown+Rule3 to off-peak
(10h) gives 55, 7h gives 45 (so Elmhurst uses 10-hour, RdSAP 10 §12 Rule 3,
PDF p.62). So the prior "Rule 3 is not off-peak evidence" comment was 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+Rule-3 corpus certs only Apartment 241 improves
(-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 — the
gov-API "Unknown" is lossy and does not mean off-peak. North star is
reproducing the lodged register, not Elmhurst's deliberate-Unknown worksheet,
so KEEP STANDARD (same "Elmhurst != noisy register" family as
roof-windows/shutters).

Comment-only; no behaviour change (corpus gauge unchanged 72.5% / 0.793).
pyright not installed in this container — strict type gate not run locally.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Khalim Conn-Kowlessar 2026-06-23 09:48:21 +00:00
parent 2ac5ec6eb5
commit 3548f1f31a

View file

@ -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