mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-07-12 13:29:04 +00:00
Two second-main fuel errors mis-cost a dual-main dwelling whose two main systems burn different fuels (SAP 10.2 §10a worksheet (213) bills main 2 at its own fuel): 1. Off-peak/legacy scalar cost path (calculator.py + cert_to_inputs.py): main 2's kWh was priced at main 1's `space_heating_fuel_cost_gbp_per_kwh` scalar. Split main 1 vs main 2 and price main 2 at its OWN rate via the new `_main_2_space_heating_fuel_cost_gbp_per_kwh` (+ CalculatorInputs field). Scoped to a NON-electric second main (wood/oil/coal) — an electric second main keeps main 1's scalar (its off-peak Table 12a split is the deferred §10a slice; per-system splitting it regresses the off-peak electric cohort, certs 13 Parkers Hill / 34 Dunley Road). 0 corpus impact (no corpus cert has a non-electric second main on an off-peak meter). 2. Elmhurst Summary mapper (mapper.py): when §14.1 omits the Fuel Type cell, a fuel-fired second main (room-heater SAP code) inherited main 1's fuel. Derive it from the SAP code's Table 4a category (solid 631-636 -> house coal, gas -> mains gas, liquid -> oil) before the main-1 inherit, mirroring `_elmhurst_secondary_fuel_from_sap_code` (same modal sub-fuel caveat). Boiler codes (<601) still inherit main 1 (case 6 oil rads+UFH). simulated case 47 (electric room heaters + solid room heaters 633): our SAP 37.81 -> 55.09 vs Elmhurst current 57 (residual is the wood-vs-coal sub-fuel the Summary export does not carry). Corpus unchanged 72.5% / MAE 0.793; batch 0 raised / 0 diverge; 000565 e2e green. (mapper.py also carries an earlier, behaviour-free roof-window doc comment.) Spec-cited unit pins added (AAA). pyright not installed locally — strict type gate not run. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| addresses | ||
| billing | ||
| data_transformation | ||
| epc | ||
| epc_prediction | ||
| fuel_rates | ||
| geospatial | ||
| magicplan | ||
| modelling | ||
| property | ||
| property_baseline | ||
| sap10_calculator | ||
| sap10_ml | ||
| tasks | ||
| building_geometry.py | ||
| postcode.py | ||