SAP 10.2 Table 4e (PDF p.170-173) "Heating system controls":
3. The 'Temperature adjustment' modifies the mean internal
temperature and is added to worksheet (92)m.
SAP 10.2 Table 9c step 8 (PDF p.184): "Apply adjustment to the mean
internal temperature from Table 4e, where appropriate".
Pre-slice the cascade hardcoded `control_temperature_adjustment_c
=0.0` at all three call sites of `mean_internal_temperature_monthly`
and `space_heating_section_with_results`. The §8 heat loss calc
therefore drove off (92)m unchanged → §8 SH demand under-counted on
every cert whose `main_heating_control` lodges a non-zero adjustment.
Table 4e adjustments by code (full p.170-173 coverage):
Group 0 — No heating system:
2699: +0.3
Group 1 — Boilers with radiators/UFH (+ micro-CHP):
2101, 2102: +0.6 (no thermo / programmer-only)
2103..2113: 0
Group 2 — Heat pumps:
2201, 2202: +0.3
2203..2210: 0
Group 3 — Heat networks:
2301, 2302: +0.3
2303..2314: 0
Group 4 — Electric storage:
2401 (Manual charge): +0.7
2402 (Automatic charge): +0.4
2403 (Celect): +0.4
2404 (HHR controls): 0
Group 5 — Warm air:
2501, 2502: +0.3
2503..2506: 0
Group 6 — Room heaters:
2601: +0.3
2602..2605: 0
Group 7 — Other systems:
2701, 2702: +0.3
2703..2706: 0
New `_control_temperature_adjustment_c(main)` helper consults
`_CONTROL_TEMPERATURE_ADJUSTMENT_BY_CODE` (52 entries, full Table 4e
coverage). Strict-raises `UnmappedSapCode` on present-but-unmapped
codes per [[reference-unmapped-sap-code]] so spec-coverage gaps
surface at test time. The helper is wired to all three call sites
of the MIT/SH orchestrators in cert_to_inputs.
Corpus impact — closes the +2.5 SAP cluster substantially:
Variant | control | pre → post | delta
------- | ------- | -------------- | -----
e3 (401)| 2401 | +2.55 → -0.09 | -2.46 (massive close)
e6 (404)| 2402 | +1.33 → -0.17 | -1.50
e7 (408)| 2402 | +1.29 → -0.20 | -1.49
e2 (524)| 2502 | +0.47 → -0.18 | -0.65
e5 (402)| 2402 | +0.07 → -1.43 | -1.50 (regressed —
previously net-zero
from offsetting bugs)
Cumulative |ΔSAP| across these 5: 5.71 → 2.07 (-3.64 pts closed).
electric 3 / 6 / 7 / 8 / 9 now all within 0.20 SAP of worksheet.
Golden fixtures unchanged (API certs in those tests don't lodge
non-zero-adjustment control codes; suite stays 888 pass).
Extended handover suite: 888 pass, 0 fail (was 887 + 1 new AAA test).
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