mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
Cert 9501 lodges measured PV: 2.36 kWp South-West, 45° pitch, "None Or Little" overshading. The worksheet's §10a credit (-250.02 GBP = PV used in dwelling £-129.49 + PV exported £-120.53) depends on the Appendix M / Appendix U3.3 cascade reading these from `SapEnergySource.photovoltaic_arrays`. The prior extractor only captured the `photovoltaic_panel: "Panel details"` label — the actual kW / orientation / elevation / overshading were silently dropped, so the cascade computed total cost ~£250 too high → ECF 2.92 vs worksheet 2.26 → SAP 59.26 vs 68.53 (Δ -9.27). Changes: - Extend `surveys.elmhurst_site_notes.Renewables` with 4 new optional fields: pv_peak_power_kw / pv_orientation / pv_elevation_deg / pv_overshading. - Add `ElmhurstSiteNotesExtractor._extract_pv_array_detail` — anchors on "Photovoltaic panel details" then reads the 4 consecutive value lines (kWp, orientation, elevation, overshading). - Add `_elmhurst_pv_arrays` mapper helper to build the `[PhotovoltaicArray(...)]` list when all 4 values are present; return None for the "PV absent" path the cascade already handles. - Add `_ELMHURST_PV_OVERSHADING_TO_RDSAP` map: "None Or Little" → 1 (ZPV=1.0 per cert_to_inputs._PV_OVERSHADING_FACTOR), "Modest" → 2, "Significant" → 3, "Heavy" → 4. RdSAP omits SAP10.2 Table M1's 5th "Severe" bucket. - Wire `photovoltaic_arrays=_elmhurst_pv_arrays(survey.renewables)` into `from_elmhurst_site_notes`'s `SapEnergySource(...)` call. Effect on cert 9501 Summary path: - sap_continuous 59.2585 → 68.7577 (target 68.5252; Δ +0.23) - total_fuel_cost £1099 → £843 (worksheet £849; -£6 over-credit) - ECF 2.92 → 2.24 (worksheet 2.26; -0.02 over-credit) The remaining +0.23 SAP / +£6 cost drift is a precision gap in the Appendix M cost-offset cascade for measured PV (not a missing-data gap); next slice closes it to 1e-4. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| fixtures | ||
| __init__.py | ||
| test_elmhurst_end_to_end.py | ||
| test_elmhurst_extractor.py | ||
| test_end_to_end.py | ||
| test_extractor.py | ||
| test_pdf.py | ||
| test_summary_pdf_mapper_chain.py | ||