Model/domain
Khalim Conn-Kowlessar e19145aca0 Slice S0380.62: wire Table 32 standing charges into the off-peak cost fallback
The cascade's `additional_standing_charges_gbp(main_fuel_code,
water_heating_fuel_code, tariff)` function (table_32.py:178) was
already producing the right values — for cert 000565 it returns
£143 (£120 mains gas standing + £23 10-hour high-rate electricity
standing per Table 32 page 95). But the value only landed in
`FuelCostResult.additional_standing_charges_gbp` inside `_fuel_cost`,
which returns `_ZERO_FUEL_COST_FOR_OFF_PEAK` for non-STANDARD
tariff. The calculator then falls back to the inline cost math
(scalar fuel-cost × kWh) which had no standing-charge component →
£143 was silently dropped from the off-peak cost cascade.

New `CalculatorInputs.standing_charges_gbp: float = 0.0` field
carries the standing-charge total into the fallback path. The
inline cost summation adds it before max-clamp + PV credit.
STANDARD-tariff certs route via `fuel_cost.additional_standing_
charges_gbp` (set inside `_fuel_cost`) and the calculator ignores
this scalar on that path — no double-count.

`cert_to_inputs` populates the new field unconditionally; the value
is just zero on standard-tariff certs (Table 12 note (a) gates
standing-charge inclusion regardless).

Cert 000565 cascade impact:
- standing_charges_gbp = £143.00 ✓ (exact match to worksheet line 251)
- total_fuel_cost_gbp:  Δ −310 → −167  (46% reduction)
- sap_score_continuous: Δ +3.61 → +1.91 (47% reduction)
- co2_kg_per_yr:        Δ unchanged (standing charges don't bill CO2)

Cohort regression check: 427 pass + 10 expected 000565 fails. The
14 existing Elmhurst fixtures + JSON fixtures all have meter_type=
None → STANDARD → standing routes via FuelCostResult unchanged.

Spec source: RdSAP 10 Table 32 page 95 standing-charge column;
SAP 10.2 Table 12 note (a) inclusion gating.

Pyright net-zero on both files (0 / 34).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-28 23:58:35 +00:00
..
addresses get rid of comments 2026-05-20 13:21:11 +00:00
sap10_calculator Slice S0380.62: wire Table 32 standing charges into the off-peak cost fallback 2026-05-28 23:58:35 +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