SAP 10.2 §4 line 7702 (PDF p.137):
Combi loss for each month from Table 3a, 3b or 3c (enter '0' if
not a combi boiler)
SAP 10.2 Table 3 (PDF p.160) zero-loss list for primary circuit loss:
Electric immersion heater
Combi boiler (including when it is part of a combined heat pump and
boiler package and provides all the hot water)
CPSU (including electric CPSU)
Boiler and thermal store within a single casing
Separate boiler and thermal store connected by no more than 1.5 m
of insulated pipework
Direct-acting electric boiler
Heat pump (...) with hot water vessel integral to package
Combi boilers are defined by Table 3's zero-loss list entry: they
provide instantaneous DHW with no storage vessel. A cert that lodges
a hot-water cylinder therefore has a non-combi heat generator —
the cylinder bypasses any instantaneous-DHW capability and the
boiler acts as a regular boiler for the DHW circuit.
Two compounding gaps for PCDB Table 322 (gas/oil boiler) records
with a lodged cylinder:
(a) (61)m combi loss: pre-slice the cascade routed every PCDB record
through `pcdb_combi_loss_override` regardless of cylinder
presence. For PCDB regular boilers (subsidiary_type=0, store_
type=0, separate_dhw_tests=0) this dispatched to Table 3a row 1
"Instantaneous without keep-hot" — 600 kWh/yr. Cert pcdb 1
(Potterton KOA PCDB 716 + 110 L cylinder) exposed this: worksheet
(61)m = 0 ; cascade was lodging 600 kWh/yr keep-hot loss on a
regular oil boiler.
(b) (59)m primary loss: `_primary_loss_applies` gated on
`main_heating_category in {1, 2}`. The Elmhurst path leaves
`main_heating_category=None`, so the gate returned False even
when the cert lodged a PCDB Table 322 (gas/oil boiler) record +
a cylinder. Worksheet (59)m sum ~1177 kWh ; cascade was zero.
Fix:
- `_water_heating_worksheet_and_gains` now zeroes combi_loss_override
whenever `epc.has_hot_water_cylinder` is True (top-level gate
preceding the `pcdb_combi_loss_override` dispatch). Preserves the
existing non-cylinder fallback for HP / no-PCDB / community-heat
certs that lack a main_heating_category lodgement.
- `_primary_loss_applies` extends the Elmhurst-path fallback: when
`main_heating_index_number` resolves to a PCDB Table 322 record,
return True (the cert is implicitly a boiler — Table 3 row 1 covers
any "heat generator (e.g. boiler) connected to a hot water storage
vessel via insulated or uninsulated pipes").
Corpus impact:
- pcdb 1 (Potterton KOA + cylinder, the only PCDB Table 322 + cylinder
combination in the corpus): SAP +3.40 → +2.86; cost -£75.68 →
-£63.22; CO2 -397.02 → -328.74; PE -1601.74 → -1257.97.
- Golden cert 0390-2954-3640-2196-4175 (Firebird oil combi PCDF 9005
+ cylinder): PE -26.37 → -28.50; CO2 -2.55 → -2.75. Combi-loss
removal (-600 kWh/yr) exceeded the primary-loss gain (~5-10 kWh
given the cert's insulated pipework + thermostat lodging), so the
net (62) shifted down. Direction is more spec-correct: the spec
treats a combi feeding a cylinder as a regular boiler for DHW,
matching the (61)m=0 + (59)m>0 worksheet behaviour.
Extended handover suite: 885 pass, 0 fail.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
||
|---|---|---|
| .devcontainer | ||
| .github/workflows | ||
| .idea | ||
| .vscode | ||
| applications | ||
| asset_list | ||
| backend | ||
| backlog | ||
| datatypes | ||
| deployment/terraform | ||
| docs/adr | ||
| domain | ||
| epr_data_exports | ||
| etl | ||
| infrastructure | ||
| model_data/requirements | ||
| orchestration | ||
| recommendations | ||
| repositories | ||
| scripts | ||
| sfr/principal_pitch | ||
| survey_report | ||
| tests | ||
| utilities | ||
| utils | ||
| .coveragerc | ||
| .dockerignore | ||
| .gitignore | ||
| __init__.py | ||
| ara_backend_design.md | ||
| BaseUtility.py | ||
| CLAUDE.md | ||
| conftest.py | ||
| CONTEXT.md | ||
| devcontainer.sh | ||
| Dockerfile.test | ||
| Dockerfile.test.dockerignore | ||
| Makefile | ||
| MEMORY.md | ||
| package-lock.json | ||
| package.json | ||
| pyproject.toml | ||
| pyrightconfig.json | ||
| pytest.ini | ||
| README.md | ||
| run_lambda_local.sh | ||
| serverless.yml | ||
| test.requirements.txt | ||
| tox.ini | ||
| UBIQUITOUS_LANGUAGE.md | ||
Model Repository
This repository contains the code pertaining to the development of the data science and machine learning products being utilised by Hestia.
The different folders in this repository relate to services that can be used independently, or can be imported and used as part of a larger application
Getting Started
Prerequisites
Dev Container Setup
This repo uses a Docker Compose-based dev container. The model-backend service joins a shared-dev Docker network so it can communicate with other local services (e.g. a frontend container) running on your machine.
VS Code users: The initializeCommand in devcontainer.json creates the shared-dev network automatically before the container starts. No manual step required — just open the repo and select Reopen in Container.
Non-VS Code / CI workflows: Run the following once before starting the container:
make dev-setup
This is idempotent and safe to re-run if the network already exists.
Folders
backend/
This folder contains the code for the fastapi backend service, which provides an interface to much of the functionality in this repository, for the frontend
model_data/
This folder contains related to the reading and preparation of assessment model data, including pulling out epc attributes
Testing
All tests can be run, against the configuration in pytest.ini running
pytest
This will run the complete panel of tests and report on coverage in the locations specified by the pytest.ini file.
To run tests in a specific service, e.g. inside of model_data, simply run
pytest --cov-config=model_data/.coveragerc --cov=model_data
This will produce the test results and coverage reports