Closes the final §4 cascade fail. SAP10.2 Appendix J step 8 (p.82)
specifies the electric-shower kWh formula:
N_ES = N_shower / N_outlets (eq J16)
EES,j,m = N_ES × f_beh × P_ES,j × 0.1 × n_m (eq J17)
EES,m = Σ EES,j,m (eq J18)
where P_ES,j defaults to Table J4 (p.83) row "Instantaneous electric
shower" = 9.3 kW for assessments of existing dwellings, and 0.1 = the
6-minute shower duration in hours.
For 000487 (N=2.492, has_bath, 1 electric shower, 0 mixer outlets):
N_shower = 0.45 × 2.492 + 0.65 = 1.7714
N_outlets = 1 (just the electric)
N_ES = 1.7714 / 1 = 1.7714
Jan: 1.7714 × 1.035 × 9.3 × 0.1 × 31 = 52.86 kWh ≈ PDF LINE_64A[1] = 52.8566 ✓
LINE_65 (heat gains from water heating) was undercounting by 25% of
the missing LINE_64A (the recovery factor for instantaneous electric
showers per the heat-gains formula); deriving LINE_64A from cert
closes it.
Changes:
- water_heating.py: new `electric_shower_monthly_kwh` function +
`electric_shower_count` parameter to `water_heating_from_cert`.
When count > 0 and no override, derives LINE_64A from N_outlets +
Table J4 default P_ES.
- cert_to_inputs.py: `_electric_shower_count_from_cert` helper +
plumb through both the §4 section helper and internal cascade.
Per-fixture cluster status (was/now):
§3 24/24 → 24/24 ✓ all 6 fixtures
§4 53/54 → 54/54 ✓ all 6 fixtures
§5 52/54 → 54/54 ✓ all 6 fixtures
§6 11/12 → 12/12 ✓ all 6 fixtures
§7 45/60 → 52/60 (000487 cascade closed; LINE_92/93 marginal on
000474/477/480/490 remains)
Scoreboard:
section_cascade_pins: 293 → 304 PASS (+11; 97.4% closure)
e2e SapResult: 32 → 33 PASS (+1, water_heating closure cascades)
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