mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-07-12 13:29:04 +00:00
The high-heat-retention storage-heater (HHRSH) recommendation was computed as LOWERING SAP and wrongly rejected by the Optimiser, leaving electric- room-heater flats/maisonettes stuck at band E with no sensible plan. Root cause: `_HHR_STORAGE_OVERLAY` sets `sap_main_heating_code=409` (HHR storage) + `meter_type="Dual"` but left `main_heating_category` at the pre-existing value (10 = electric room heaters). The SAP 10.2 Table 12a space-heating high-rate-fraction resolver classifies by category, so it misread the off-peak storage heating as direct-acting electric (1.00 high-rate) and priced 100% at the 7-hour peak rate (15.29p) instead of the storage off-peak split (0.00, ~5.5p). Verified against accredited Elmhurst RdSAP-10 on UPRN 100020942571 (8 Booth Close, SE28 8BW): engine HHRSH SAP 48 (peak-priced, cost £1087) vs Elmhurst 71 (cost ~£611); with the fix the engine gives 73 / £576. Two-part fix (defence in depth, so no future overlay/mapper can reintroduce it): - `_HHR_STORAGE_OVERLAY` now sets `main_heating_category=7`, keeping the overlaid EPC internally consistent. - `_table_12a_system_for_main` now classifies electric storage heaters by their Table 4a SAP code (401-409) as well as `category==7`, checked before the room-heater branch, so a specific storage code is authoritative over a stale/inconsistent category. Tests: new regression `test_storage_heater_classified_by_sap_code_over_stale_category`; updated the HHRSH overlay pin. Full accuracy corpus still passes (no regressions). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| applications | ||
| datatypes | ||
| domain | ||
| e2e | ||
| fixtures/epc_prediction | ||
| harness | ||
| infrastructure | ||
| lambdas | ||
| magic_plan | ||
| orchestration | ||
| repositories | ||
| scripts | ||
| utilities | ||
| __init__.py | ||
| conftest.py | ||
| test_lambda_packaging.py | ||