mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
RdSAP §1.4.2: window openings deduct from the gross of the wall they pierce. The cert schema lodges `window_wall_type` on each SapWindow: code 1 = main wall, codes 2/3 = alternative walls 1/2. Cohort ground-truth: cert 2636 BP0 lodges one window (1.14 × 1.04 ≈ 1.19 m²) with `window_wall_type=2` → it pierces alt.1 (12.76 m² cavity unfilled at age D → U=0.70). Pre-fix the cascade subtracted ALL openings from the BP's (main+alt) gross then routed each alt at its FULL gross — over-counting alt's contribution by 1.19 × U_alt and under-counting main by 1.19 × U_main. For cert 2636: 1.19 × (0.70 − 0.25) = +0.535 W/K cascade walls excess, matching the observed cascade walls 20.56 vs worksheet 20.024. `_window_on_alt_wall` translates the per-window `window_wall_type` code; the per-BP loop aggregates alt-wall windows into `alt_window_area_by_bp`, passes that opening area through to `_alt_wall_w_per_k` (alt.1 only — no cohort cert exercises alt.2 windows), and adds the deducted area back to the main wall's net area so the conservation invariant holds. Cohort impact: cert 2636 cascade walls closes from 20.5595 → 20.0240 (spec-exact to 1e-3). Cascade (37) closes from 114.7067 → 114.1846 (Δ +0.0134 from a small thermal-bridging area rounding diff). Cert 2636 SAP shifts from -0.0055 → +0.0323 — joining the cohort cluster (all 7 ASHP certs now within +0.030 to +0.059 SAP). The current near-zero cancellation state for cert 2636 was hiding two opposite cascade errors (over-count walls + under-count η_space). This slice closes walls correctly; the remaining +0.03 SAP cluster across all 7 certs is the systematic PSR-denominator HLC×ΔT drift documented in the handover (not max_output, which BRE confirmed is 4.39 kW exactly). Zero regressions on Elmhurst hand-built fixtures, closed-cert Layer 4 1e-4 chain gates, or golden cert residual pins. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| handler | ||
| tests | ||
| __init__.py | ||
| db_writer.py | ||
| elmhurst_extractor.py | ||
| extractor.py | ||
| local_runner.py | ||
| parser.py | ||
| pdf.py | ||