mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
A heat pump that resolves via its PCDB Table 362 index alone (API path, data_source=1, no Table-4a SAP code) had sap_main_heating_code=None, so `_table_12a_system_for_main` fell through the 211-227/521-524 code-range gate to None → the "100% off-peak low-rate" fallback. On a Dual meter (RdSAP §12 Rule 3 routes heat pumps to the 10-hour tariff) this billed space heating at 7.50 p/kWh instead of the SAP 10.2 Table 12a Grid 1 (PDF p.191) ASHP/GSHP-from-database row: 0.80 high-rate fraction → 0.80×14.68 + 0.20×7.50 = 13.244 p/kWh. The collapse over-credited the whole cat-4 heat-pump cluster. Fix: route any main with a PCDB heat-pump record to ASHP_APP_N regardless of SAP code (a Table 362 record IS an Appendix-N heat pump by definition). ASHP_APP_N and GSHP_APP_N share the 0.80 SH fraction at 7h/10h, so ASHP_APP_N is the canonical Appendix-N row for the SH split. cat-4 cluster (20 certs): within-0.5 45%→50%, mean signed +1.43→+0.06, mean|err| 3.81→2.43; cert 9472 +15.0→+6.4, 2789 +13.4→+6.8. Headline 45.0%→45.1%, mean|err| 1.757→1.727. Regression green (only the pre-existing test_total_floor_area fails); pyright net-zero. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| applications | ||
| domain | ||
| infrastructure | ||
| orchestration | ||
| repositories | ||
| utilities | ||
| __init__.py | ||
| conftest.py | ||
| test_lambda_packaging.py | ||