mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
`_plan_for` now scores the baseline + every cumulative prefix once (`cascade_scores`, best-practice order) and reuses those Scores for both the role-3 marginal attribution and a per-measure bill cascade: bill each prefix at one Fuel Rates snapshot and take consecutive Bill deltas as each measure's marginal delivered-kWh and £ saving. Saving is signed (ventilation is negative) and telescopes exactly to the Plan headline savings, because the Plan's baseline/post Bills are now the same cascade endpoints (`bills[0]` / `bills[-1]`) — which also drops the redundant standalone baseline `calculate`. `recommendation.kwh_savings` / `energy_cost_savings` are filled from these. Adds `Bill.total_consumption_kwh` (shared by Plan + the orchestrator). Pinned end-to-end on the real calculator: Σ per-measure savings == the Plan totals (ADR-0014 amendment). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| applications | ||
| datatypes | ||
| domain | ||
| infrastructure | ||
| orchestration | ||
| repositories | ||
| utilities | ||
| __init__.py | ||
| conftest.py | ||
| test_lambda_packaging.py | ||