Replaces the legacy `predicted_hot_water_kwh` cascade with a call into
`water_heating_from_cert` for the modal combi-gas-mains population. The
new helper `_hot_water_fuel_kwh_per_yr` chains the §4 cascade end-to-end
(occupancy → daily hot water → energy content → distribution + combi
loss → (62)m total → (64)m output) then divides by water-heater
efficiency to land annual fuel kWh — the slot CalculatorInputs expects.
Section-by-section validation across all 6 Elmhurst fixtures shows:
§1 dimensions exact (≤ 1e-4) on all 6
§2 ventilation exact (≤ 1e-4) on all 6
§3 heat trans exact on non-RR (000474, 000490) within 0.04 W/K
(display-rounding); RR fixtures under-count per the
formal SapRoomInRoof sub-area deferral.
§4 hot water exact on the 2 fixtures with LINE_42/LINE_64 lodged
(000474 PCDB override + 000490 cascade-default); 4 RR
fixtures emit plausible orchestrator values.
End-to-end SAP impact (legacy → new):
000490 57=57 (cont 56.72 → 56.92, closer to worksheet 57.40)
000474 55→56 (cont 55.39 → 55.59, expected 62, still 6pt under)
Caveats / future slices:
- Cold water source defaults to mains (no domain-model field yet).
- Shower flow rate defaults to 7 L/min vented (no shower_outlet_type
plumbing yet); both fixtures actually lodge this so no false drift.
- Cylinder + solar + WWHRS / PV / FGHRS branches default to zero.
- PCDB Table 3b combi loss not implemented; orchestrator accepts a
`combi_loss_monthly_kwh_override` for now but cert_to_inputs always
falls to Table 3a row "time-clock keep-hot".
- water_efficiency variable misnamed "pct" — it's a decimal (0.0-1.0).
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
||
|---|---|---|
| .devcontainer | ||
| .github/workflows | ||
| .idea | ||
| .vscode | ||
| asset_list | ||
| backend | ||
| backlog | ||
| datatypes | ||
| docs | ||
| epr_data_exports | ||
| etl | ||
| infrastructure/terraform | ||
| model_data/requirements | ||
| packages | ||
| recommendations | ||
| scripts | ||
| services | ||
| sfr/principal_pitch | ||
| survey_report | ||
| utils | ||
| .coveragerc | ||
| .dockerignore | ||
| .gitignore | ||
| __init__.py | ||
| AGENTS.md | ||
| 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_backlog.sh | ||
| 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