SAP 10.2 Table 12a Grid 2 (PDF p.191) bills "Fans for mechanical ventilation systems" at 0.71 (7-hour) / 0.58 (10-hour), distinct from "All other uses" (0.90 / 0.80) which covers circulation pumps, flue fans and the solar HW pump. The cost-split mech-vent kWh (`mev_kwh_for_cost_split`) only summed the decentralised-MEV (230b) fans, not the (230a) MVHR fan electricity — even though the total pumps/fans bucket adds both. So an MVHR dwelling on an off-peak tariff billed its fan electricity at the 0.90/0.80 "all other uses" rate instead of 0.71/0.58. The comment already said "MEV/MVHR-fan portion"; only the MEV term was wired when MVHR landed. Fixed to mirror both mechanical-ventilation fan terms summed into the total. Worksheet-proven on simulated case 50 (000565 semi + MVHR Vent Axia + dual electric immersion, Unknown meter -> 7-hour via the §12 dual-immersion trigger): the fan bucket (315.64 kWh, 100% MVHR per worksheet line 230a) was billing at 14.311 p/kWh (0.90) vs Elmhurst's 12.451 p/kWh (0.71) — +£5.87/yr, -0.23 SAP. After the fix our existing-dwelling rating reconciles to Elmhurst EXACTLY: SAP value 38.8426 (=Elmhurst 38.8426 -> 39), total cost £1317.0116 (=Elmhurst £1317.0116 to the penny). Same `mev_kwh_for_cost_split` feeds the CO2 + PE cascades, so all three split consistently. 0 corpus impact (all 3 corpus MVHR certs are standard tariff); gauge unchanged 73.3% / MAE 0.774 / CO2 0.08 / PE 3.4. Pin: test_mvhr_fan_electricity_bills_at_grid2_fan_fraction_on_off_peak. pyright strict gate not run locally (pyright not installed in this container). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .claude/skills | ||
| .devcontainer | ||
| .github/workflows | ||
| .idea | ||
| .vscode | ||
| applications | ||
| asset_list | ||
| backend | ||
| backlog | ||
| datatypes | ||
| deployment/terraform | ||
| docs | ||
| domain | ||
| epr_data_exports | ||
| etl | ||
| harness | ||
| infrastructure | ||
| model_data/requirements | ||
| orchestration | ||
| recommendations | ||
| repositories | ||
| sap worksheets | ||
| 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 | ||
| next_claude_prompt.txt | ||
| P960-0001-001431-2.pdf | ||
| package-lock.json | ||
| package.json | ||
| playground.py.local-backup | ||
| pyproject.toml | ||
| pyrightconfig.json | ||
| pytest.ini | ||
| README.md | ||
| run_lambda_local.sh | ||
| serverless.yml | ||
| Summary_001431-3.pdf | ||
| 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