mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-07-27 23:35:01 +00:00
A dwelling with two main heating systems lodges a "Main Heating 2" block and a "Percentage of space heating provided by Main Heating 1" split (e.g. 20% fan + 80% slimline storage, or 50% storage + 50% panel heaters). The survey model held a single `main_heating`, and the extractor read the whole §Heating section first-match — so it captured only Main 1, modelled it as 100% of the load, and dropped Main 2 and the split (also bleeding Main 2's fields into Main 1). Every such dwelling over-rated. - `HeatingAndHotWater` now holds `main_heating_2` + `main_heating_1_percent`. - The extractor slices the "Main Heating Systems" region per system on the "Main Heating N" markers and reads Main 1's percentage; a single-main dwelling (no "Main Heating 2") parses byte-identically to before. - `_map_sap_heating` factors the per-system detail into `_pashub_main_heating_ detail(main, fraction)` and emits two `MainHeatingDetail`s, setting Main 2's `main_heating_fraction = 100 - Main 1 %` (the calculator reads Main 2's share and gives Main 1 the remainder). 5 of the 6 dual-main dwellings converge (within-0.5 53.4% → 55.3%, MAE 0.799); single-main fixtures and the gov-API / Elmhurst / Guinness / Wythenshawe corpora are unaffected. The 6th (497655371974, storage+panel) regresses because the calculator deliberately bills an electric Main 2 at Main 1's rate (`_main_2_space_heating_fuel_cost_gbp_per_kwh`, deferred §10a off-peak slice) — the correct two-main mapping now exposes that calculator gap; tracked separately. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| handler | ||
| tests | ||
| __init__.py | ||
| db_writer.py | ||
| elmhurst_extractor.py | ||
| extractor.py | ||
| local_runner.py | ||
| parser.py | ||
| pdf.py | ||