mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-07-19 17:03:02 +00:00
5 certs in a 2026 API sample raised `KeyError: 'rr_common_wall_area_m2'` and were blocked from computing. Root cause: `_part_geometry`'s early return (taken when a building part lodges no sap_floor_dimensions — e.g. a party-wall-only or RR-only extension as bp[0]) returned only 6 of the 9 keys the full return exposes, omitting rr_common_wall_area_m2, rr_gable_area_m2 and cantilever_floor_area_m2. The §3.9 RR contribution block reads geom["rr_common_wall_area_m2"] / ["rr_gable_area_m2"] for EVERY part, so the floorless part's truncated dict raised KeyError at heat_transmission.py:974. Fix: the early return now exposes all 9 keys, the three RR/cantilever geometry values defaulting to 0.0 — correct, since a part with no floor dimensions has no derivable RR shell or cantilever (no floor area). Pure contract-completion bug; no spec/U-value change. Regression test pins the invariant directly: a floorless part's _part_geometry keys must equal a with-floors part's keys. Validated: all 5 certs now compute (4 within ~2 SAP of lodged; the 5th, 8536, has a separate residual). §4 suite 2393 passed; heat_transmission.py pyright unchanged at 12, test file at 71. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| appendix_h_solar.py | ||
| dimensions.py | ||
| energy_requirements.py | ||
| fabric_energy_efficiency.py | ||
| fuel_cost.py | ||
| heat_transmission.py | ||
| internal_gains.py | ||
| mean_internal_temperature.py | ||
| mev.py | ||
| photovoltaic.py | ||
| rating.py | ||
| solar_gains.py | ||
| space_cooling.py | ||
| space_heating.py | ||
| utilisation_factor.py | ||
| ventilation.py | ||
| water_heating.py | ||