pcdb followup: 000474 fixture lodges main_heating_index_number=16839; e2e ceiling 7 → 2

PDF "PCDF boiler reference: 16839 Vaillant ecoTEC pro 28 88.70%" → fixture sets `main_heating_index_number=16839` + `main_heating_data_source=1`. cert_to_inputs PCDB precedence resolves Table 105 record 16839 (Vaillant ecoTEC pro 28 VUW GB 286/5-3, 2005-2015, winter 88.7%, summer 87.0%, comparative HW 75.1%).

000474 e2e impact — near-closure:
  - main_heating_efficiency: 0.80 → 0.887
  - hot_water_kwh: 3020 → 2622 (PDF 2292, gap +32% → +14.4%)
  - total_fuel_cost: £778 → £652 (PDF £656, gap +19% → -0.6%)
  - SAP rating: 69 → 63 (PDF 62, +7 → +1)

Ceiling tightened 7 → 2 (SAP integer) and 7.0 → 2.0 (continuous). Residual HW kWh gap (+14.4%) is the Appendix J §3b PCDB combi-loss row that our HW cascade still defaults from Table 3a — closes in a future §4 slice.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Khalim Conn-Kowlessar 2026-05-21 11:30:18 +00:00
parent 1b43c95ca6
commit 7d4f3d78dc
2 changed files with 40 additions and 20 deletions

View file

@ -28,7 +28,12 @@ from datatypes.epc.domain.epc_property_data import (
SapFloorDimension,
SapWindow,
)
from domain.ml.tests._fixtures import make_minimal_sap10_epc, make_window
from domain.ml.tests._fixtures import (
make_main_heating_detail,
make_minimal_sap10_epc,
make_sap_heating,
make_window,
)
from domain.sap.worksheet.solar_gains import RoofWindowInput, RooflightInput
from domain.sap.worksheet.ventilation import MechanicalVentilationKind
from domain.sap.worksheet.water_heating import TABLE_J1_TCOLD_FROM_MAINS_C
@ -110,6 +115,9 @@ def build_epc() -> EpcPropertyData:
],
wall_thickness_mm=380,
)
# PDF lodges "PCDF boiler reference: 16839 Vaillant ecoTEC pro 28 88.70%".
# The 16839 is the BRE PCDB index_number (Table 105 Vaillant ecoTEC pro
# 28kW VUW GB 286/5-3, 2005-2015, winter eff 88.7%, summer eff 87.0%).
return make_minimal_sap10_epc(
total_floor_area_m2=56.79,
country_code="ENG",
@ -117,6 +125,14 @@ def build_epc() -> EpcPropertyData:
habitable_rooms_count=3,
heated_rooms_count=3,
door_count=2,
sap_heating=make_sap_heating(
main_heating_details=[
make_main_heating_detail(
main_heating_index_number=16839,
main_heating_data_source=1,
),
],
),
)

View file

@ -110,26 +110,30 @@ def test_elmhurst_000490_end_to_end_sap_score_currently_within_6_points() -> Non
)
def test_elmhurst_000474_end_to_end_sap_score_currently_within_7_points() -> None:
"""End-terrace PCDB-tested Vaillant boiler — currently a 7-point
under-prediction. The gap localises to:
def test_elmhurst_000474_end_to_end_sap_score_currently_within_2_points() -> None:
"""End-terrace PCDB-tested Vaillant boiler. After the PCDB Table 105
integration the fixture lodges `main_heating_index_number=16839`
(Vaillant ecoTEC pro 28 VUW GB 286/5-3, winter eff 88.7%, summer
87.0%, comparative HW 75.1%) per the PDF's "PCDF boiler reference:
16839 Vaillant ecoTEC pro 28 88.70%" lodgement.
Post-PCDB residuals nearly closed:
| metric | actual | expected | delta |
| --------------- | ------- | -------- | ----- |
| space heating | 12299.6 | 10612.9 | +16% |
| hot water fuel | 3020.0 | 2291.8 | +32% |
| total fuel cost | £778.09 | £655.69 | +19% |
| space heating | 10914.3 | 10612.86 | +2.8% |
| hot water fuel | 2621.7 | 2291.78 | +14.4%|
| total fuel cost | £651.85 | £655.69 | -0.6% |
| SAP rating | 63 | 62 | +1 |
Hypothesised drivers (to close in future slices):
1. The legacy hot-water cascade doesn't know about PCDB Table 3b
combi loss 000474's Vaillant ecoTEC pro tests below the
Table 3a row our cascade defaults to.
2. Space heating over-prediction may be downstream of fabric
heat-loss + heating efficiency cascade.
The PCDB summer efficiency override (was 80% 87.0%) closes the HW
fuel gap from +32% to +14.4% the residual is the Appendix J §3b
PCDB combi loss table that our HW cascade still uses Table 3a row
defaults for. The SAP rating sits comfortably within tolerance.
Tolerance set at the CURRENT gap so improvements show up as test
tightening, not silent drift. Drop to 2 points once the §4
orchestrator + PCDB combi loss are wired into cert_to_inputs.
Ceiling dropped 7 2 (SAP integer) and 7.0 2.0 (continuous)
reflecting the post-PCDB current state. Tightens further when the
Appendix J §3b combi-loss cascade lands.
"""
# Arrange
epc = _w000474.build_epc()
@ -139,15 +143,15 @@ def test_elmhurst_000474_end_to_end_sap_score_currently_within_7_points() -> Non
# Assert
delta = abs(result.sap_score - _ELMHURST_000474_EXPECTED.sap_rating)
assert delta <= 7, (
f"SAP rating delta {delta} exceeds current-state ceiling of 7. "
assert delta <= 2, (
f"SAP rating delta {delta} exceeds current-state ceiling of 2. "
f"Actual={result.sap_score}, expected={_ELMHURST_000474_EXPECTED.sap_rating}."
)
continuous_delta = abs(
result.sap_score_continuous - _ELMHURST_000474_EXPECTED.sap_score_continuous
)
assert continuous_delta <= 7.0, (
f"Continuous SAP delta {continuous_delta:.2f} exceeds ceiling 7.0"
assert continuous_delta <= 2.0, (
f"Continuous SAP delta {continuous_delta:.2f} exceeds ceiling 2.0"
)