mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
Closes the second half of the cert 000565 Main 2 work. After Slice
S0380.54 lodged Main 2 on the EpcPropertyData, the water-heating
cascade still derived efficiency from Main 1 (the heat pump) instead
of Main 2 (the gas combi that actually services DHW).
Per the Elmhurst RdSAP convention, `Water Heating SapCode 914` =
"from second main system" — DHW is generated by Main 2, not Main 1.
The §4 / Appendix D2.1 summer-efficiency lookup must therefore key
off Main 2's PCDB Table 105 record (cert 000565: PCDB 15100 Vaillant
Ecotec plus 415, summer η = 88%) rather than Main 1's HP COP.
Implementation:
- New `_water_heating_main(epc)` helper — returns Main 2 when WHC
is in `_WATER_FROM_SECOND_MAIN_CODES = {914}` AND a second main is
lodged; otherwise returns Main 1 (matches prior behaviour for
single-main certs + WHC 901/902 "from main system")
- The water-eff branch at the §4 cascade now reads `water_pcdb_main
= gas_oil_boiler_record(water_main.main_heating_index_number)`
+ `_water_efficiency_with_category_inherit(water_main.sap_main_
heating_code, water_main.main_heating_category, _main_fuel_code(
water_main))` — same logic as before but parametrised by the
water-heating main rather than hard-coded to Main 1
Cert 000565 cascade impact on hot_water_kwh_per_yr pin:
- Before: actual 1,844.66 kWh/yr (= HW heat / HP COP 1.70 — wrong)
Δ −1,910.36 vs U985-0001-000565.pdf expected 3,755.03
After Slice S0380.54 (Main 2 lodged but cascade still using Main 1):
actual 3,919.91 kWh/yr, Δ +164.88 (regression from the no-cascade
baseline because Main 2 PCDB was lodged but water_eff still came
from Main 1's HP-vs-default fallthrough)
- After this slice: actual 3,969.53 kWh/yr (= HW heat / 0.88)
Δ +214.50 — 89% reduction vs the original Main-1 WHC 914 routing,
remaining gap is fine-grained (FGHRS / solar HW / Table 3a no-keep-
hot territory — separate slice)
For single-main certs (the 14 existing Summary fixtures + 8 ASHP
cohort certs): `_water_heating_main` returns Main 1, identical to
the prior `main` reference. Cohort regression check: 472 pass + 10
expected 000565 fails — no broader regression.
Spec source: SAP 10.2 §4 water-heating cascade + Appendix D2.1 (D1
equation) summer-efficiency override; Elmhurst RdSAP water-heating
code 914 ("from second main system").
Pyright net-zero on cert_to_inputs.py (34 errors before, 34 after).
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
||
|---|---|---|
| .. | ||
| addresses | ||
| data_transformation | ||
| epc | ||
| sap10_calculator | ||
| sap10_ml | ||
| tasks | ||
| postcode.py | ||