mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-07-12 13:29:04 +00:00
Follow-up to the §2 MV-kind slice. Once MEV dwellings stopped under-stating their ventilation HEAT loss, a +0.9 SAP over-rate residual remained — the MEV FAN ELECTRICITY (§5 Table 4f line (230a), `SFPav × 1.22 × V`, PCDB Tables 322 decentralised-MEV + 329 in-use factors). `_mev_decentralised_kwh_per_yr_from_cert` already composes it, but reads `epc.mechanical_ventilation_index_number` + `epc.mechanical_vent_duct_type`, and the API builder (`from_rdsap_schema_21_0_1`) never set either — so `pcdf_id is None` short-circuited the fan energy to 0 on every API cert (the Summary/ Elmhurst path set them, so cert 000565 already billed it). Wire both schema fields through the 21.0.1 API construction (the corpus schema). Eval: the 9 MEV certs carrying a PCDB index closed +0.90 -> +0.13 signed (fan electricity now billed); headline within-0.5 55.01% -> 55.12%, mean|err| 1.233 -> 1.232, 909 computed / 0 raises. Only those 9 certs move (clean diff). The 11 index-less MEV certs still sit at +1.36 — they need the SAP Table 4h DEFAULT specific fan power (no PCDB record), a separate slice. New end-to-end test + fixture (cert 1300, Titon-class dMEV index 500777, Flexible duct): from_api_response preserves the index + duct type and (230a) resolves to a positive fan-energy contribution. Goldens + full calc/epc regression green; pyright net-zero. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| epc | ||
| magicplan | ||
| __init__.py | ||
| datatypes.py | ||
| enums.py | ||