Model/backend/documents_parser
Khalim Conn-Kowlessar 3de52bcb90 Slice S0380.165: §9.4.11 boiler-interlock -5pp applies AFTER Eq D1, not before
SAP 10.2 §9.4.11 (PDF p.30): "The efficiency of gas and liquid fuel
boilers for both space and water heating is reduced by 5% if the
boiler is not interlocked for space and water heating."

S0380.141 had subtracted the -5pp from BOTH `Pwinter` and `Psummer`
PCDB / Table 4b seasonal efficiencies BEFORE running the SAP 10.2
Appendix D §D2.1 (2) Equation D1 monthly cascade. The Elmhurst P960
worksheet for `pcdb 1` (PCDB 716 oil boiler, Pwinter 65 / Psummer 53,
Cylinder Stat=No → no interlock) shows the -5pp is applied to the
η_water,monthly OUTPUT of Eq D1, NOT to its inputs. The two
interpretations diverge because Eq D1's reciprocal weighting (1/η_w
and 1/η_s) is non-linear in η.

Worked example for pcdb 1 Jan (Q_space=1409.77, Q_water=387.86):

  Old cascade:  Eq D1(60, 48, …) = 56.9292 %       (off −0.04 pp)
  Worksheet:    Eq D1(65, 53, …) = 61.9725 %
                                    −5pp = 56.9725 %  ≡ (217)m_jan ✓

Across all 12 months the post-Eq-D1 form matches worksheet (217)m to
1e-4 every month. Cascade HW kWh: 7068.41 → 7063.96 (= worksheet (219)
total exactly), Δ −4.45 kWh.

The spec text "reduced by 5%" does not explicitly state pre- vs post-
Eq D1 ordering. Per [[feedback-software-no-special-handling]] mirror
the Elmhurst engine — the worksheet output is unambiguous.

Changes:
  - `_apply_water_efficiency` gains a `interlock_penalty_pp: float = 0.0`
    kwarg. Eq D1 branch runs on raw (Pwinter, Psummer), then subtracts
    `interlock_penalty_pp / 100` from each monthly efficiency before
    dividing.
  - Caller (`cert_to_inputs` orchestrator) now passes the raw seasonal
    efficiencies in `eq_d1_winter_summer_pct` + the penalty separately.
    The pre-Eq-D1 `eq_d1_winter_summer_pct[0] -= 5` block is removed.
  - SH-side `eff -= 0.05` (line 5349) is unchanged — the SH cascade
    doesn't go through Eq D1, just `(98c)m / eff_sh`.

Closures `pcdb 1`:
  ΔSAP_c −0.0108 → +0.0000 (1e-4)
  Δcost  +£0.24  → +£0.0000
  ΔCO2   +1.33   → +0.0000
  ΔPE    +5.70   → −0.0000

No regressions on the other 25 cascade-OK variants — the gate is
`no_interlock AND eq_d1_winter_summer_pct is not None`, which fires
only when Cylinder Stat=No on a gas/oil boiler cert. The 6 Elmhurst
U985 cohort + cohort-2 Elmhurst fixtures all lodge Cylinder Stat=Yes
(interlock present) → no penalty fires; cohort-1 ASHP certs lodge no
cylinder thermostat at all but route through Appendix N3 instead of
Eq D1. 38 cohort-2 + 9 ASHP golden fixtures all PASS unchanged.

The 41-variant heating-systems corpus cascade-OK tier is now CLOSED:
all 25 variants SAP / cost / CO2 / PE EXACT vs Elmhurst worksheet at
abs < 1e-3 (most < 1e-4). Σ|ΔSAP_c| = 0.0001 (= floating-point noise).

Tests:
  - test_apply_water_efficiency_applies_interlock_penalty_after_equation_d1
  - test_apply_water_efficiency_interlock_penalty_zero_keeps_raw_eq_d1

911 pass / 0 fail; pyright net-zero 43 → 43.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-02 09:44:10 +00:00
..
handler address JTK review comments 2026-04-20 15:11:17 +00:00
tests Slice S0380.165: §9.4.11 boiler-interlock -5pp applies AFTER Eq D1, not before 2026-06-02 09:44:10 +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