mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-07-12 13:29:04 +00:00
When the main heating system does not heat every habitable room (heated rooms < habitable rooms), SAP 10.2 Appendix A.2.2 assumes the unheated rooms are served by a portable-electric secondary heater, so the Table 11 secondary fraction (0.10 for a boiler main) must be costed at the electricity tariff — even when the cert lodges no explicit secondary system. `_secondary_fraction` previously returned 0 unless a secondary was lodged or the main was a forced-secondary electric-storage code, dropping the assumed secondary and billing 100% of space heat to the (cheaper) main fuel — an over-rate. Added an `unheated_habitable_rooms` trigger plus `_has_unheated_habitable_rooms(epc)`, which prefers the lodged `any_unheated_rooms` flag and guards the gov-API `heated_rooms_count == 0` "not provided" sentinel. The secondary fuel/efficiency cascade already defaults to portable electric (code 693) when no secondary code is lodged. Worksheet-validated on simulated case 46 (heated 4 < habitable 7, no lodged secondary): the assumed 10% electric secondary (2289 kWh, ~£260) lifted our SAP 39 -> 29.35 vs accredited Elmhurst 30 (cost £1502 vs £1493, within 0.6%). Corpus UNCHANGED (71.6% / MAE 0.819): all 17 corpus certs with heated < habitable already lodge an explicit secondary description, so the gov-API path was already costing it; this only adds the assumed secondary where none is lodged (Elmhurst / reduced-field path). pyright not installed locally. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| applications | ||
| datatypes | ||
| domain | ||
| e2e | ||
| fixtures/epc_prediction | ||
| harness | ||
| infrastructure | ||
| magic_plan | ||
| orchestration | ||
| repositories | ||
| scripts | ||
| utilities | ||
| __init__.py | ||
| conftest.py | ||
| test_lambda_packaging.py | ||