Recognise an air source heat pump via the default ASHP code 🟩

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Khalim Conn-Kowlessar 2026-06-30 17:30:00 +00:00
parent 646bff38a6
commit 1552e24fa5
3 changed files with 9 additions and 3 deletions

View file

@ -134,6 +134,10 @@ _MAIN_HEATING_CODES: dict[str, int] = {
"Direct-acting electric": 191,
"Electric room heaters": 691,
"Solid fuel room heater, closed": 633,
# Default air-source heat pump — SAP Table 4a 211 ("flow temp in other
# cases", default SPF 2.30). Modellable without a PCDB index; an actual
# product index would refine it (ADR-0041).
"Air source heat pump": 211,
}

View file

@ -26,4 +26,5 @@ class MainHeatingSystemType(Enum):
DIRECT_ELECTRIC = "Direct-acting electric"
ELECTRIC_ROOM_HEATERS = "Electric room heaters"
SOLID_FUEL_ROOM_HEATER_CLOSED = "Solid fuel room heater, closed"
AIR_SOURCE_HEAT_PUMP = "Air source heat pump"
UNKNOWN = "Unknown"

View file

@ -245,13 +245,14 @@ def test_off_peak_archetypes_drag_dual_others_drag_single() -> None:
@pytest.mark.parametrize(
"main_heating_value",
["Unknown", "", "Air source heat pump", "Community heating"],
["Unknown", "", "Community heating"],
)
def test_unresolvable_or_unmodelled_heating_produces_no_overlay(
main_heating_value: str,
) -> None:
# Heat pumps (main_heating_index_number) and community heating (community
# codes) don't map to a Table 4b sap_main_heating_code yet — no overlay.
# Genuinely unrecognised values (Unknown / empty) and not-yet-modelled
# community heating produce no overlay — the lodged EPC heating stands
# (ADR-0041). Air source heat pumps ARE now modelled (Table 4a 211).
# Act
simulation = main_heating_overlay_for(main_heating_value, 0)