From 64fce0416997bf19349390b76de6154b13dc070a Mon Sep 17 00:00:00 2001 From: Khalim Conn-Kowlessar Date: Mon, 18 May 2026 16:07:51 +0000 Subject: [PATCH] slice S-B14: cert-calibration E7 codes include 691-696 (electric room heaters) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Hand-trace cert 0340-2394 (73m² mid-floor flat, code 691 electric room heater, actual SAP 75, predicted 56) confirmed the cert software applies off-peak rates to electric room heaters when the dwelling has the E7-tariff hallmarks (electric immersion HW cylinder). Extending the cert-calibration E7-eligible set from {191-196, 401-409, 421-425} to add {691-696}. 100-cert parity probe: MAE 4.48 → 4.40 (-0.08) RMSE 5.81 → 5.63 bias -0.52 → +0.16 (essentially centered) within ±10: 95% → 96% Co-Authored-By: Claude Opus 4.7 --- .../sap/tables/table_12_cert_calibration.py | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/packages/domain/src/domain/sap/tables/table_12_cert_calibration.py b/packages/domain/src/domain/sap/tables/table_12_cert_calibration.py index 576307ae..48c8564c 100644 --- a/packages/domain/src/domain/sap/tables/table_12_cert_calibration.py +++ b/packages/domain/src/domain/sap/tables/table_12_cert_calibration.py @@ -100,13 +100,19 @@ def _build_cert_calibration_table(): `PriceTable` value at validation-script init time.""" from domain.sap.rdsap.cert_to_inputs import PriceTable - # Cert-calibration empirically extends the E7 off-peak set to - # direct-electric codes (191-196) — the cert assessor applies the - # off-peak rate to these even though SAP 10.2 Table 12a says 90% - # high-rate. Confirmed by hand-tracing cert 0800-1364 (Detached - # bungalow, code 191, actual SAP 71, predicted 37 before this fix). + # Cert-calibration empirically extends the E7 off-peak set: + # 191-196 direct-electric (boilers etc) — S-B11 finding + # 401-409 electric storage heaters (spec-correct) + # 421-425 high-heat-retention storage (spec-correct) + # 691-696 electric room heaters — S-B14 finding (cert 0340-2394: + # 73m² mid-floor flat, code 691, actual SAP 75, predicted + # 56 before this; cert software applies off-peak to all- + # electric dwellings regardless of heating typology). cert_calibration_e7_codes = frozenset( - list(range(191, 197)) + list(range(401, 410)) + list(range(421, 426)) + list(range(191, 197)) + + list(range(401, 410)) + + list(range(421, 426)) + + list(range(691, 697)) ) return PriceTable( unit_price_p_per_kwh=unit_price_p_per_kwh,