mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-07-19 17:03:02 +00:00
Audit of the API-SAP error (53% within 0.5) localised the systematic under-rate to ELECTRIC FLATS (houses sit at 60-66% within 0.5; electric flats 13-19%). Decomposing the flat error showed it tracks space-heating demand per m² — the worst certs reach 130-289 kWh/m² (accurate certs sit at 14-110), i.e. a grossly over-stated fabric heat loss, amplified ~4x by the electricity unit price and the steep low-band SAP log curve. Root cause: the gov-EPC API lodges `sheltered_wall="Y"` on alternative wall sub-areas (a sub-area adjacent to an unheated buffer — stair core, adjoining structure), but the field was dropped by the schema + domain dataclasses and the calculator billed the alt sub-area at its full exposed U. RdSAP 10 Table 4 (PDF p.22) "Sheltered": such a wall carries an added external surface resistance R=0.5 m²K/W → U_sheltered = 1/(1/U + 0.5) — the SAME adjustment the main wall already applies for `gable_wall_type=2` (`gable_wall_sheltered`, `_SHELTERED_GABLE_ADDED_RESISTANCE_M2K_W`). Cert 0340-2976 (band-A flat, 42 m² sheltered timber-frame alt) over-stated its wall channel by ~58 W/K → walls 128 -> 70 W/K. Threads the field end-to-end: schema dataclasses (21.0.0/21.0.1) + domain `SapAlternativeWall.is_sheltered` (default False — the Summary/ Elmhurst path leaves it False, sheltering rides through its lodged U-value there, so goldens are untouched) + `from_api_response` mapping `"Y"->True` + `_alt_wall_w_per_k` applying the 0.5 resistance on the cascade path (lodged-U and basement alt-walls return before it). 140 certs (15% of the corpus) carry a sheltered alt-wall; they under- rated at median -0.82 / mean signed -1.33 / 23% within 0.5. Eval: 102 improved, 38 regressed (offsetting-error cases — fix is spec-uniform per [[feedback_software_no_special_handling]]); within-0.5 53.14% -> 54.24%, within-1.0 67.99% -> 69.64%, within-2.0 81.85% -> 83.50%, mean|err| 1.312 -> 1.248, 909 computed / 0 raises. Goldens (6035, 000565) and full calc/epc/parser regression green; pyright net-zero. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| fixtures | ||
| __init__.py | ||
| _elmhurst_fixtures.py | ||
| _elmhurst_worksheet_000474.py | ||
| _elmhurst_worksheet_000477.py | ||
| _elmhurst_worksheet_000480.py | ||
| _elmhurst_worksheet_000487.py | ||
| _elmhurst_worksheet_000490.py | ||
| _elmhurst_worksheet_000516.py | ||
| _elmhurst_worksheet_000565.py | ||
| _elmhurst_worksheet_001431.py | ||
| _elmhurst_worksheet_001431_6035.py | ||
| _elmhurst_worksheet_001431_case5.py | ||
| _elmhurst_worksheet_001431_case6.py | ||
| _elmhurst_worksheet_001431_case7.py | ||
| _elmhurst_worksheet_001431_case20.py | ||
| _elmhurst_worksheet_001431_case21.py | ||
| _elmhurst_worksheet_001431_rr.py | ||
| _elmhurst_worksheet_001431_rr8.py | ||
| _xlsx_loader.py | ||
| test_appendix_h_solar.py | ||
| test_dimensions.py | ||
| test_e2e_elmhurst_sap_score.py | ||
| test_energy_requirements.py | ||
| test_fabric_energy_efficiency.py | ||
| test_fuel_cost.py | ||
| test_heat_transmission.py | ||
| test_internal_gains.py | ||
| test_mean_internal_temperature.py | ||
| test_mev.py | ||
| test_photovoltaic.py | ||
| test_rating.py | ||
| test_section_cascade_pins.py | ||
| test_solar_gains.py | ||
| test_space_cooling.py | ||
| test_space_heating.py | ||
| test_utilisation_factor.py | ||
| test_ventilation.py | ||
| test_water_heating.py | ||