RdSAP 10 Specification §10.11 Table 29 page 56 — "Heating and hot water parameters" → row "Hot water cylinder insulation if not accessible": Age band of main property A to F: 12 mm loose jacket Age band of main property G, H: 25 mm foam Age band of main property I to M: 38 mm foam Pre-slice the Elmhurst mapper passed through cylinder_insulation_type and cylinder_insulation_thickness_mm as None whenever §15.1 lodged "Cylinder Size: No Access" (the inaccessible-cylinder lodging form) because the Summary doesn't carry the measured insulation label / thickness on inaccessible cylinders. The cascade's §4 (56)m water storage loss override at `_cylinder_storage_loss_override` then returned None (gates on `insulation_type == _CYLINDER_INSULATION_ TYPE_FACTORY` + thickness lodged), so the worksheet's (56)m sum was dropped entirely from (62)m. Cert pcdb 1 (corpus 001431, Potterton KOA PCDB 716 + 110 L cylinder + §15.1 "No Access" + age G 1983-1990) exposes the gap: worksheet (56)m monthly ≈ 59.06 kWh ((51) factor 0.024 from Note 1 formula L = 0.005 + 0.55 / (t + 4) at t = 25 mm) × (52) volume factor 1.0294 × (53) Table 2b temperature factor 0.702 — annual sum ≈ 695 kWh, missing from the pre-slice cascade entirely. New helper `_resolve_elmhurst_inaccessible_cylinder_insulation(age_band)` in `datatypes/epc/domain/mapper.py` returns the `(insulation_type_code, thickness_mm)` tuple for age G/H (factory foam, 25 mm) and I/J/K/L/M (factory foam, 38 mm). Age bands A-F (loose jacket, 12 mm) raise `UnmappedElmhurstLabel` — no current Elmhurst corpus member is age A-F with §15.1 = "No Access", and the loose-jacket SAP10 cylinder_insulation_type enum value is not yet plumbed into the calculator's `cylinder_storage_loss_factor_table_2` dispatch (only factory=1 is exercised). The strict-raise mirrors the [[reference-unmapped-sap-code]] pattern so a future fixture forces the loose-jacket extension explicitly. `_map_elmhurst_sap_heating` calls the resolver before constructing SapHeating; the accessible-cylinder path stays unchanged (measured label + thickness from §15.1). Corpus impact: - pcdb 1 (only "No Access" cylinder variant in the corpus): SAP +2.86 → +0.57; cost -£63.22 → -£12.55; CO2 -328.74 → -51.19; PE -1257.97 → -109.46. The remaining residual is a ~1.3% cascade- side undercount on space-heating demand (cascade SH 7900 kWh vs worksheet (98c) 8004 kWh) plus minor pumps/fans rate noise — well within the spec-cascade floor. Combined with S0380.141 (§9.4.11 -5pp interlock on SH + Eq D1) and S0380.142 (§4 lines 7700/7702 cylinder-presence gates), the pre-slice pcdb 1 residual SAP +6.95 closes to +0.57 (-92% magnitude), cost -£157.61 to -£12.55, PE -3135.30 to -109.46. Extended handover suite: 886 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