mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
Three extensions closing the last 0.05 SAP residual on 000487 — and with it, all 6 Elmhurst Summary PDFs match their U985 worksheets to 1e-4 unrounded SAP. 1. Alternative-wall extraction. `WallDetails` gains an `alternative_walls: List[AlternativeWall]` field; the extractor parses §7's "Alternative Wall N Area / Type / Insulation / Thickness / Thickness Unknown / U-value Known" prefixed labels. Even when an extension lodges "As Main Wall: Yes" we still pull alt walls from the extension's own subsection (they don't inherit) — the main wall fields are merged with the extension's alt-wall list. 2. Alt-wall mapper plumbing. `_map_elmhurst_alternative_wall` builds a `SapAlternativeWall` per lodged Elmhurst entry; the building- part mapper attaches up to two via `sap_alternative_wall_1/_2` per `SapBuildingPart`. When the surveyor flags `Thickness Unknown: Yes` (cohort's only example — 000487 Ext1's "TimberWallOneLayer" entry) we route the cascade with thickness=None so `u_wall` falls through to the age-band-and- construction default — Timber Frame age B uninsulated → U=1.9, matching the full-cert-text U=1.90 the handbuilt fixture lodges for the same 9-mm thin timber wall. 3. "TI" wall-construction code mapping. The §7 "Alternative Wall 1 Type: TI Timber Frame" uses leading code "TI" rather than the "TF" code seen on the primary wall types — both alias to SAP10 wall_construction=5 (Timber Frame). Final cohort state — all 6 closed at 1e-4: 000474 0.0000 ✓ Slice 47 000477 0.0000 ✓ Slice 52 000480 0.0000 ✓ Slice 50 000487 0.0000 ✓ THIS SLICE 000490 0.0000 ✓ Slice 49 000516 0.0000 ✓ Slice 51 758 tests pass; pyright net-zero (35 baseline). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| epc | ||
| magicplan | ||
| __init__.py | ||
| datatypes.py | ||
| enums.py | ||