Per SAP 10.2 spec p.75 (Effective solar volume section): "in the case of a combined cylinder (such as arrangement b) in Figure H2, [(H14) =] the volume of the dedicated solar storage plus 0.3 times the volume of the remainder of the cylinder." The spec leaves the dedicated solar storage volume (H12) itself to the surveyor / certified-software convention for combined-cylinder setups. Empirical pattern across 4 Elmhurst worksheets establishes the combined-cylinder default H12 = 1/3 × cylinder volume (H13): cert 000565 worksheet: H12 = 53 L, H13 = 160 L (ratio 0.331) cert A worksheet: H12 = 37 L, H13 = 110 L (ratio 0.336) cert B worksheet: H12 = 37 L, H13 = 110 L (ratio 0.336) cert C worksheet: H12 = 37 L, H13 = 110 L (ratio 0.336) This matches the broader f-chart literature convention for "solar pre-heat zone" sizing in stratified tanks: roughly the lower third of the cylinder is reserved for solar pre-heat, the upper two-thirds for boiler-heated water. The Elmhurst-certified rounding is to the nearest integer litre (53.33 → 53; 36.67 → 37). `_solar_hw_monthly_override` now derives H12/H13 from `epc.has_hot_water_cylinder + sap_heating.cylinder_size` via the existing `_CYLINDER_SIZE_CODE_TO_LITRES` Table 28 lookup (RdSAP 10 §10.5). When no cylinder is lodged (instantaneous + solar HW shape, hypothetical), fall back to Table 29's 75 L separate pre-heat tank. Cert 000565 closure: - Orchestrator solar Q_s annual: 268 → 283 kWh/yr (worksheet 281.35, Δ +1.73, 0.6% error). Within the same precision band as appendix_h_solar's per-month <1e-3 kWh pin. - HW pin: −69 → −86 kWh/yr (slight regression due to compounding with three independent demand-cascade bugs not yet wired: (45)m over by 903, primary_loss (59) under by 1175 (cylinder HP routing missing), storage_loss (56) over by 98 + missing (57)m solar adjustment). These were previously masked by the +357 kWh "no solar credit" over-count; now visible as the residual. Solar Q_s closure is the load-bearing achievement here — the Appendix H orchestrator is now spec-pinned through to the cert's own lodged geometry. HW pin closure follows once the demand-path gaps land in follow-on slices. Test baseline: 547 pass + 9 expected `test_sap_result_pin[000565-*]` fails (unchanged). Cohort-2 + ASHP cohort + golden fixtures untouched — no other cert lodges solar HW. Pyright net-zero (34 errors baseline → 34 errors post-change). 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