Model/tests/domain
Jun-te Kim 5b4a1b4966 Classify PCDB-index gas boilers with no SAP code for heating recs
Gov-API certs that lodge a gas boiler as main_heating_category=2 + a PCDB
main_heating_index_number but omit sap_main_heating_code were carried with
a null code, so the heating generators (which gated on sap_main_heating_code
alone) never evaluated them for a boiler upgrade or a system tune-up — they
silently got nothing (£0 works, plateau at D). The SAP calculator already
handles this shape (cert_to_inputs._is_wet_boiler_main), so the calculator
modelled these as wet boilers while the recommenders ignored them.

Mirror the calculator's classification in the generator:
- _is_wet_boiler / _is_electric_boiler fall back, when no SAP code is
  lodged, to a PCDB Table 105 boiler index or main_heating_category in
  {1,2} (heat pumps excluded); electric boilers stay excluded by the code
  range when lodged, else by an electricity main fuel.
- _already_condensing reads the boiler's declared PCDB winter efficiency
  when there is no Table 4b code, so a modern condensing boiler lodged this
  way still isn't offered a pointless like-for-like swap (gets a tune-up).

Verified read-only on portfolio 814 / scenario 1271: pids 742304, 742306,
742322, 742325, 742336 now get a gas_boiler_upgrade (two cross D->C on the
boiler alone) where they had £0 works; predicted properties whose heating
donor is a PCDB-shape boiler (e.g. 742095/742102/742105) also recover a
tune-up. Fixes the A#2 slice of #1388 (and unblocks 742302/742367).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-01 14:52:47 +00:00
..
addresses standardist Address 2026-05-22 10:13:32 +00:00
billing Pin end-to-end off-peak day/night bill regression 🟩 2026-06-24 18:05:33 +00:00
data_transformation Let a deterministic guard override the fallback classifier per description 🟥 2026-07-01 09:39:16 +00:00
epc Merge pull request #1397 from Hestia-Homes/fix/1376-hhrsh-baseline-archetype 2026-07-01 15:41:52 +01:00
epc_prediction Re-baseline pins for full-SAP PV + tariff mapper fixes 🟩 2026-06-30 09:18:39 +00:00
fuel_rates Expose an off-peak meter's standing charge and full day/night blend range 🟩 2026-06-24 17:14:51 +00:00
magicplan Mapper reads 'Individual Trickle Vent' label variant 🟥 2026-06-30 13:43:48 +00:00
modelling Classify PCDB-index gas boilers with no SAP code for heating recs 2026-07-01 14:52:47 +00:00
property feat: thread physical-state-change signal into rebaselining 🟩 2026-06-26 19:15:11 +00:00
property_baseline test: portfolio-796 override-rebaseline regression (the 7 properties) 🟩 2026-06-26 19:22:32 +00:00
sap10_calculator Merge pull request #1363 from Hestia-Homes/fix/hyde-portfolio-audit 2026-06-30 10:26:17 +01:00
tasks tests framework completed 2026-05-20 14:00:19 +00:00
__init__.py added postcode splitter rewrite to ddd 2026-05-19 16:35:09 +00:00
test_building_geometry.py feat(modelling): floor Recommendation Generator + ground-floor-area geometry 2026-06-03 09:12:29 +00:00
test_postcode.py tests framework completed 2026-05-20 14:00:19 +00:00