mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
Slice 88: thread bp.floor_construction_type into u_floor cascade
`u_floor` defaulted to the SOLID branch for age bands C+ when both `construction` (int code) and `description` were None, regardless of whether the bp's own `floor_construction_type` field said "Suspended timber". This produced U=0.60 for cert 001479 Main vs the worksheet's U=0.65 — a -0.05 W/m²K delta × 30.45 m² → -1.52 W/K of fabric loss shortfall. Fix: in `heat_transmission_section_from_cert`, prefer the bp's `floor_construction_type` string over the global `epc.floors[]. description` when computing the per-bp floor U. The bp-level field is the per-part lodgement Elmhurst surfaces in §3 / §9 of the Summary; the global `epc.floors` list is often empty when the mapper sources data from a Summary PDF rather than the full RdSAP API JSON. Impact on cert 001479 Summary → mapper → cascade SAP delta: BEFORE Slice 88: +0.2290 (floor U 0.60 vs target 0.65) AFTER Slice 88: +0.0898 (floor exact match; only roof gap left) Floor W/K breakdown for cert 001479 (mapper path): was: 21.6480 target 23.1705 delta -1.5225 now: 23.1705 target 23.1705 delta +0.0000 ✓ EXACT Cohort cascade pins remain GREEN (66 of 66) — the cohort hand-builts already set `floor_construction_type` on their Main bp via the Slice 72/75/78/82/85 Cat A bulk updates, so the new code path applies the same suspended-timber branch that previous paths reached via either explicit `floor_construction` int codes or the age-band default (cohort certs are all age B which is in `_SUSPENDED_TIMBER_DEFAULT_BANDS`, so they hit the suspended branch either way; cert 001479 is age C and needs the explicit string). Pyright net-zero on heat_transmission.py (13 → 13 errors). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
parent
aff331ff34
commit
c40679d1e1
1 changed files with 15 additions and 1 deletions
|
|
@ -496,12 +496,26 @@ def heat_transmission_from_cert(
|
|||
age_band=age_band, insulation_thickness_mm=floor_ins_thickness
|
||||
)
|
||||
else:
|
||||
# The per-bp `floor_construction_type` lodgement ("Suspended
|
||||
# timber" / "Solid") takes precedence over the global
|
||||
# `epc.floors[].description` when present — it's the explicit
|
||||
# per-part lodgement Elmhurst surfaces in §3 / §9 of the
|
||||
# Summary PDF (cf. cert 001479 Main: floor_construction_type
|
||||
# = "Suspended timber" age C; the cascade's `u_floor`
|
||||
# otherwise defaults to the solid branch for age bands C+
|
||||
# without an explicit signal, producing a U=0.60 vs the
|
||||
# worksheet's suspended-timber U=0.65).
|
||||
effective_floor_description = (
|
||||
part.floor_construction_type
|
||||
if part.floor_construction_type
|
||||
else floor_description
|
||||
)
|
||||
uf = u_floor(
|
||||
country=country, age_band=age_band, construction=floor_construction,
|
||||
insulation_thickness_mm=floor_ins_thickness,
|
||||
area_m2=floor_area, perimeter_m=floor_perimeter,
|
||||
wall_thickness_mm=part.wall_thickness_mm,
|
||||
description=floor_description,
|
||||
description=effective_floor_description,
|
||||
)
|
||||
upw = u_party_wall(party_wall_construction=party_construction)
|
||||
# Per-bp `y` for backwards compat: when the bp's own age band
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue