Model/backend/documents_parser
Khalim Conn-Kowlessar 41e50be216 Slice S0380.163: Elmhurst-mirror HW PE/CO2 factor on dual-rate tariffs
SAP 10.2 Table 12 footnote (t) (PDF p.189): "PE factors for grid
electricity vary by month. The average figure given in this table is
therefore not used directly. Instead the monthly factors given in
Table 12e should be used in the SAP worksheet." Footnote (s) says the
same for CO2 / Table 12d. Read literally, monthly factors apply to
every electric end-use including dual-rate HW.

The BRE-approved Elmhurst rdSAP engine doesn't follow that reading
for HW. The 41-variant heating-systems corpus controlled-variable
fixture lodges worksheet (278) "Water heating (low-rate cost)" with
factor **1.5010 PE / 0.136 CO2** (Table 12 annual flat) across every
dual-rate tariff cert, while applying the monthly Table 12e/12d
cascade to lighting (1.5338 winter-weighted) and secondary heating
(1.5715) on the same certs. It's an engine implementation choice,
not a documented spec exception.

Per [[feedback-software-no-special-handling]] the calculator
contract is bit-faithful replication of the engine, not literal
compliance with the spec text. This slice flips cascade
`_hot_water_primary_factor` + `_hot_water_co2_factor_kg_per_kwh` to
accept a `tariff: Tariff` parameter:

  - STANDARD tariff       → Table 12e/12d monthly cascade weighted
                            by HW demand seasonality (unchanged from
                            S0380.71 / .72, matches cohort-1 ASHP
                            standard-tariff worksheet)
  - 7-hour / 10-hour /
    18-hour / 24-hour     → Table 12 annual flat (1.501 / 0.136)
                            matching the Elmhurst worksheet (278)
                            "Water heating (low-rate cost)" row

Per-line walk on electric 3 (18-hour tariff, electric immersion HW,
2384.116 kWh annual):

  worksheet (278) factor = 1.5010
  cascade pre-slice      = 1.5214   delta = +0.0204
  (1.5214 - 1.5010) × 2384.116 = +48.66 kWh/yr PE — EXACT match
  the corpus residual pin.

Same shape for CO2: worksheet 0.1360, cascade pre-slice 0.1410,
delta +0.0050 × 2384.116 = +11.95 kg/yr.

Closures across the 18-variant deferred lighting-PE cohort
(electric 1/2/3/5/6/7/8/9 + solid fuel 4/5/6/7/8/9/10/11 + ashp +
gshp):
  ΔCO2 +6.31 / +11.95 → ±0.0000 EXACT
  ΔPE  +25.51 / +48.66 → ±0.0000 EXACT
  ΔSAP_c / Δcost unchanged at ±0.0000 EXACT (already closed
  pre-slice by S0380.156..162).

All 25 cascade-OK variants in the heating-systems corpus now
SAP / cost / CO2 / PE EXACT vs worksheet on all 4 metrics, with
solid fuel 2 as the only remaining open residual (separate
S0380.154 summer-immersion-blend CO2/PE artifact — deferred).

Documented in
`domain/sap10_calculator/docs/SAP_CALCULATOR.md §8.1
"HW PE/CO2 factors on dual-rate tariffs use Table 12 annual"` —
the master doc now carries a new §8 "Elmhurst-mirrored spec
divergences" section for cases like this. Validation tally
refreshed from stale "930/930" to current "941/941".

No regressions on the 6 Elmhurst U985 fixtures (gas combi
STANDARD tariff — unaffected) or the cohort-1 ASHP certs
(STANDARD tariff — unaffected). The dual-rate gate fires only
on the 4 off-peak tariffs.

Verbatim spec quote retained for reference (SAP 10.2 Table 12
footnote (t), PDF p.189):
  "PE factors for grid electricity vary by month. The average
   figure given in this table is therefore not used directly.
   Instead the monthly factors given in Table 12e should be used
   in the SAP worksheet."

Tests: 907 pass (+1), 0 fail. Pyright net-zero (43 → 43).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-04 15:40:25 +00:00
..
handler address JTK review comments 2026-04-20 15:11:17 +00:00
tests Slice S0380.163: Elmhurst-mirror HW PE/CO2 factor on dual-rate tariffs 2026-06-04 15:40:25 +00:00
__init__.py Map to RdSapSiteNotes from site notes JSON 🟥 2026-04-16 13:54:03 +00:00
db_writer.py include updating epc_property_data to pashub to ara workflow 2026-04-29 09:55:14 +00:00
elmhurst_extractor.py Slice S0380.140: §4 cylinder storage loss — extractor picks up §16 thermostat lodging + Table 2b note b restricts ×0.9 to boiler/warm-air/HP systems 2026-05-31 19:03:58 +00:00
extractor.py Handle wall thickness "Unmeasurable" 🟩 2026-04-30 16:41:16 +00:00
local_runner.py update local runner to work for elmhurst 2026-04-24 14:01:36 +00:00
parser.py load ecmk site notes to db 2026-04-29 11:20:47 +00:00
pdf.py update local runner to work for elmhurst 2026-04-24 14:01:36 +00:00