Model/tests/domain
Khalim Conn-Kowlessar 39ae2cf0c2 fix(water-heating): split whc-903 immersion HW CO2/PE on off-peak tariffs
SAP 10.2 Table 12d/12e: electric water heating on a 7-/10-hour tariff bills
CO2/PE at the high-rate code (32/34) and low-rate code (31/33), kWh-weighted
by the Table 13 high-rate fraction. The cost path already applied this split;
the CO2/PE factors did not — they used the flat annual Table 12 figure
(0.136 CO2 / 1.501 PE) for ALL dual-rate electric HW.

That flat-annual behaviour (slice S0380.163) was validated only against
HW-from-main "low-rate cost" certs (100% low, no high-rate split). It is NOT
how Elmhurst bills a whc-903 ELECTRIC IMMERSION: the hand-built case-50
worksheet (000565 + dual immersion, 7-hour) splits HW CO2/PE into "high rate
cost" (CO2 0.1475 / PE 1.5514) + "low rate cost" (CO2 0.1238 / PE 1.4429)
weighted by the Table 13 fraction 0.1009. So flat-0.136 for immersion HW was
a spec gap on our side, not an Elmhurst divergence.

Fix: `_electric_immersion_hw_high_rate_fraction` threads the Table 13 fraction
(scoped to whc-903, 7-/10-hour, cylinder data present) into the HW CO2 + PE
factor helpers, which then blend the Table 12d/12e high/low codes. The flat
rule is unchanged for HW-from-main and 18-/24-hour (no Table 12d split), so
the S0380.163 41-variant cases and the existing pin are untouched.

Case 50: rating CO2 2413.48 -> 2397.1237 = Elmhurst EXACT; demand CO2 2007.1384
EXACT; demand PE +111 -> +32.5 residual (within corpus PE noise). Corpus
unchanged 73.3% / MAE 0.774 / CO2 0.08 / PE 3.4 (62 whc-903 off-peak certs;
aggregate gauges hold). SAP unaffected (cost-based).

Pin: test_whc903_immersion_hw_co2_pe_factors_split_high_low_on_off_peak; doc
updated in SAP_CALCULATOR.md §8.1.
pyright strict gate not run locally (pyright not installed in this container).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-24 09:05:21 +00:00
..
addresses standardist Address 2026-05-22 10:13:32 +00:00
billing refactor(billing): relocate Bill Derivation to domain/billing/ (cross-stage) 2026-06-03 17:19:23 +00:00
epc move overlas to its own thing 2026-06-18 10:04:14 +00:00
epc_prediction sap calculator variaince changes 2026-06-18 10:22:21 +00:00
fuel_rates feat(fuel-rates): FuelRates snapshot + repository foundation (ADR-0014) 2026-06-02 09:29:07 +00:00
magicplan handle 50 rows in new template file 2026-06-10 16:18:46 +00:00
modelling fix(climate): compute EPC CO2/PE on the postcode demand cascade (SAP 10.2 Appendix U p.124) 2026-06-18 14:15:34 +00:00
property move overlas to its own thing 2026-06-18 10:04:14 +00:00
property_baseline feat(baseline): sap_code_to_fuel normalizes via the calculator's own helper 2026-06-05 18:59:25 +00:00
sap10_calculator fix(water-heating): split whc-903 immersion HW CO2/PE on off-peak tariffs 2026-06-24 09:05:21 +00:00
tasks tests framework completed 2026-05-20 14:00:19 +00:00
__init__.py added postcode splitter rewrite to ddd 2026-05-19 16:35:09 +00:00
test_building_geometry.py feat(modelling): floor Recommendation Generator + ground-floor-area geometry 2026-06-03 09:12:29 +00:00
test_postcode.py tests framework completed 2026-05-20 14:00:19 +00:00