fix(warm-air): Table 11 secondary fraction for category 9 → 0.10

main_heating_category=9 (warm-air systems, NOT heat pump) had no entry
in _SECONDARY_HEATING_FRACTION_BY_CATEGORY, so a warm-air main with a
lodged secondary raised UnmappedSapCode in
_secondary_heating_fraction_for_category — the last calc_raise in the
API sample (cert 0380-2197-2590-2996-2715: warm air mains gas code 506 +
electric room-heater secondary).

SAP 10.2 Table 11 (p.188): a gas/oil warm-air unit falls under "All gas,
liquid and solid fuel systems" (0.10), and electric warm air under
"Other electric systems" (also 0.10) — so 0.10 regardless of fuel. The
warm-air efficiency (Table 4a code→eff: 506→0.70) and Table 4f fan
energy were already wired; this was the only missing dispatch entry.

0380 now computes: SAP 78.1 vs lodged 77 (+1.1; the residual is per-cert
fabric/PV, not the warm-air dispatch — a faithful 0380 worksheet isn't
available, sim case 28 diverges at SAP 57 / code 502 / condensing unit).
Eval: zero raises remain, computed 908→909; mean|err| 1.703→1.702.
Regression green (2448 pass incl. golden 6035 + cohort); pyright
net-zero (44=44).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Khalim Conn-Kowlessar 2026-06-07 20:26:32 +00:00
parent 1c5675a063
commit a8e5563ace
2 changed files with 13 additions and 0 deletions

View file

@ -792,6 +792,12 @@ _SECONDARY_HEATING_FRACTION_BY_CATEGORY: Final[dict[int, float]] = {
5: 0.10,
6: 0.10,
7: 0.15,
9: 0.10, # Warm-air systems (NOT heat pump): a gas/oil warm-air unit
# is an "All gas, liquid and solid fuel systems" row (0.10),
# and electric warm air is "Other electric systems" (also
# 0.10) — so 0.10 regardless of fuel (SAP 10.2 Table 11
# p.188). Cert 0380 (warm air mains gas, code 506, +
# electric room-heater secondary) raised here before.
10: 0.20,
}
_SECONDARY_HEATING_FRACTION_DEFAULT: Final[float] = 0.10

View file

@ -3352,6 +3352,13 @@ def test_secondary_heating_fraction_for_category_full_table_11_coverage() -> Non
assert _secondary_heating_fraction_for_category(5) == 0.10
assert _secondary_heating_fraction_for_category(6) == 0.10
assert _secondary_heating_fraction_for_category(7) == 0.15
# Category 9 = warm-air systems (NOT heat pump). A gas/oil warm-air
# unit is an "All gas, liquid and solid fuel systems" row (0.10);
# electric warm air is "Other electric systems" (also 0.10) — so 0.10
# regardless of fuel (SAP 10.2 Table 11 p.188). Cert 0380-2197-2590-
# 2996-2715 (warm air mains gas, code 506, + electric room-heater
# secondary) previously raised UnmappedSapCode here, blocking it.
assert _secondary_heating_fraction_for_category(9) == 0.10
assert _secondary_heating_fraction_for_category(10) == 0.20
# Absent
assert _secondary_heating_fraction_for_category(None) == 0.10