Model/domain
Khalim Conn-Kowlessar 42ed38f77d Slice S0380.47: wire β-split into cost cascade per SAP 10.2 Appendix M1 §6
SAP 10.2 Appendix M1 §6 (p.94): "When calculating the fuel cost
benefits ... apply the normal import electricity price to PV energy
used within the dwelling and the 'electricity sold to grid, PV' price
from Table 12 to the energy exported."

Adds the third leg of the β-factor split (PE was S0380.45, CO2 was
S0380.46). Now uniform across all three cascades:
  PE   → IMPORT PEF × E_dw + EXPORT PEF × E_ex
  CO2  → IMPORT CO2 × E_dw + EXPORT CO2 × E_ex
  Cost → IMPORT £   × E_dw + EXPORT £   × E_ex

Mechanism:
- `worksheet/fuel_cost.py`: optional `pv_dwelling_kwh_per_yr` +
  `pv_exported_kwh_per_yr` + `pv_dwelling_import_price_gbp_per_kwh`
  keyword args; when all three are set, split the credit; otherwise
  fall back to legacy single-rate-EXPORT (preserves synthetic test
  constructions).
- `rdsap/cert_to_inputs.py`: new `_pv_dwelling_import_price_gbp_per_kwh`
  helper that pulls Table 32 code 30 (standard electricity = 13.19
  p/kWh) for standard tariff; off-peak branch uses
  `prices.e7_low_rate_p_per_kwh` as the natural extension point when
  the first off-peak PV cert lands (currently short-circuited by the
  `Tariff != STANDARD` guard at line 2710).
- `calculator.py`: new `pv_dwelling_import_price_gbp_per_kwh` field on
  `CalculatorInputs` with synthetic-fallback split logic mirroring the
  precomputed-fuel_cost path. Maintains the cross-cascade architecture
  documented in the prior handover.

Cohort impact: **none**. Per ADR-0010 RdSAP10 amendment, Table 32
collapses code 30 (standard electricity import) and code 60
(electricity sold to grid, PV) to the SAME 13.19 p/kWh rate. So the
β-split's E_dw × 13.19 + E_ex × 13.19 == E_total × 13.19, matching the
legacy single-rate credit at 1e-4 — 763 pass + 0 fail across the
full chain test suite (Elmhurst U985, cohort-1 ASHP, cohort-2 38-cert
sweep, 15-cert golden fixtures). The β-split shape is now in place
for the off-peak case (where weighted Table 12a high/low rates would
diverge) and any future amendment that splits import/export prices.

Pyright net-zero on touched files (34 errors before, 34 after — all
pre-existing).
2026-05-28 19:01:38 +00:00
..
addresses get rid of comments 2026-05-20 13:21:11 +00:00
sap10_calculator Slice S0380.47: wire β-split into cost cascade per SAP 10.2 Appendix M1 §6 2026-05-28 19:01:38 +00:00
sap10_ml Slice S0380.26: RdSAP10 §5.8 dry-lining adjustment on alt walls — closes cert 7700 -0.44 → +5e-5 2026-05-28 10:56:11 +00:00
tasks added postcode splitter rewrite to ddd 2026-05-19 16:35:09 +00:00
postcode.py get rid of comments 2026-05-20 13:21:11 +00:00