mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
SAP 10.2 Table 4a (PDF p.165) lists "Heat pumps" as category 4 for
SAP main-heating codes:
211-217 — ground/water source heat pumps
221-227 — air source heat pumps (224 = ASHP 2013+, COP 1.70)
521-527 — warm-air heat pumps
Cert 000565 Main 1 lodges `Main Heating SAP Code = 224` (ASHP 2013+)
with `PCDF boiler Reference = 0` — i.e. no PCDB Table 362 lookup is
possible. Pre-slice `_elmhurst_main_heating_category` returned None
on this path (the existing PCDB-Table-362-membership check failed),
falling through to the cascade's `_DEFAULT_PUMPS_FANS_KWH_PER_YR =
130` (incorrect — HP circulation pump's electricity is inside the
system COP per SAP 10.2 Table 4f line "Heat pumps", so the cascade
row is 0 kWh/year for category 4).
Single-line fix: after the existing PCDB-resolution branches, check
`mh.main_heating_sap_code in _HEAT_PUMP_SAP_MAIN_HEATING_CODES` and
return category 4 if so. New frozenset of HP codes (subset of the
existing `_ELECTRIC_SAP_MAIN_HEATING_CODES`).
Transient state at HEAD (cert 000565):
- main_heating_category: None → 4 ✓
- pumps_fans cascade: 255.0 → 125.0 kWh/yr (HP base 0 + flue 45 +
solar HW 80; MEV +127.5 kWh still missing — wiring lands in
S0380.102)
- sap_score (int): 29 ✓ EXACT preserved
- sap_score_continuous: 28.31 → 28.69 (transient drift +0.39 vs ws;
the previously-cancelling +130 over-count is gone, restoring the
MEV-under net negative — closes when S0380.102 lands)
Cohort safety: cohort certs 000474..000516 are gas-combi with
`sap_main_heating_code=None` (PCDB Table 105 boiler identified via
the index instead). No cohort cert affected. Cert 0380 + other
golden HP fixtures lodge category=4 via the API mapper, also
unaffected.
Per the spec citation in [[feedback-spec-citation-in-commits]] +
the standing TODO at mapper.py:4037-4043, this slice is the
category half of the coupled cert 000565 closure arc.
Pyright net-zero per touched file.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
||
|---|---|---|
| .. | ||
| epc | ||
| magicplan | ||
| __init__.py | ||
| datatypes.py | ||
| enums.py | ||