Model/tests
Khalim Conn-Kowlessar 72ef0f0e7b fix(water): don't apply heat-pump water SCOP to a separate immersion (SAP N3.7a)
When a heat-pump cert lodges a PCDB Table 362 record, the APM override
set BOTH the space efficiency (N3.6) and the water efficiency (N3.7a)
from the heat pump unconditionally. But the PCDB η_water applies only
when the DHW is heated BY the heat pump (water-heating code "from main":
901/902/914). A separate electric immersion (WHC 903) heats the water at
100% regardless of the space system, so applying the HP's water SCOP
(187.5% × 0.6 in-use = 112.5%) under-counted the immersion's hot-water
fuel.

Gate the η_water override on the DHW-from-main codes; a separate immersion
keeps its own 100% efficiency. Space η_space still always uses the APM
value (the heat pump is the space main).

Worksheet-validated to 1e-4 on simulated case 45 (HP space + WHC-903
immersion): water fuel (62) 1893.57 -> 2130.2639, total cost (255)
619.7433, CO2 692.13 — all matching the P960 exactly; SAP 60.53 -> rounds
to the worksheet's 61. RdSAP-21.0.1 corpus unchanged (no HP+WHC903 certs
in it). Pinned in test_cert_to_inputs (immersion fuel is main-independent).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-18 13:44:51 +00:00
..
applications put db engine construction inside handler to avoid import errors in test 2026-06-09 15:18:42 +00:00
datatypes fix(mapper): map Elmhurst "Value known" cylinder to measured volume (code 6) 2026-06-15 23:57:25 +00:00
domain fix(water): don't apply heat-pump water SCOP to a separate immersion (SAP N3.7a) 2026-06-18 13:44:51 +00:00
e2e docs(epc-prediction): module README + end-to-end showcase test 2026-06-16 04:13:30 +00:00
fixtures/epc_prediction feat(epc-prediction): geo-proximity weighting, per-component (#1227) 2026-06-15 14:58:42 +00:00
harness feat(modelling): drive measure scoping from the Scenario's exclusions 2026-06-16 15:26:25 +00:00
infrastructure fix(heat-transmission): bill a ground-floor flat's ground floor (RdSAP 10 §3.12) 2026-06-18 13:16:44 +00:00
magic_plan Migrate all MagicPlan tests to single new-format fixture 🟪 2026-06-05 12:59:56 +00:00
orchestration feat(modelling): gate generation by the considered-measures allowlist 2026-06-16 14:56:09 +00:00
repositories feat(modelling): drive measure scoping from the Scenario's exclusions 2026-06-16 15:26:25 +00:00
scripts fix terraform error and pass handler bool for dry runs 2026-06-15 14:06:54 +00:00
utilities added floats helper 2026-06-12 14:28:41 +00:00
__init__.py added postcode splitter rewrite to ddd 2026-05-19 16:35:09 +00:00
conftest.py Audit generator populates XLSX, uploads to S3, and records UploadedFile row 🟪 2026-06-09 12:05:55 +00:00
test_lambda_packaging.py more tests to ensure we don't deploy something that is brokern 2026-06-02 15:03:20 +00:00