Model/tests/domain
Khalim Conn-Kowlessar 77983caed8 feat(modelling): Optimiser core — exact grouped knapsack (#1160)
Slice 1 of #1160. Recycles the GainOptimiser/CostOptimiser formulation
(≤1 Option per Recommendation, maximise SAP gain subject to budget) as a
clean typed DDD function — but as an exact pure-Python multiple-choice
knapsack rather than the legacy `mip` MILP, since mip's CBC backend does
not load on aarch64 (so the legacy solver path can't run / be tested
here). At retrofit scale the candidate space Π(|group|+1) is tiny, so
exhaustive enumeration is exact and instant; ADR-0016 only needs the
knapsack as a warm-start signal anyway (the truthful figure comes from
the whole-package re-score + repair, next slice).

`optimise(groups, budget) -> list[ScoredOption]`: maximise total gain,
tie-break toward lower cost, skip-per-group covers "select none". 6 tests
(budget-bound selection, ≤1/group, unconstrained, budget-too-small,
empty groups, partial-affordability); pyright strict clean.

Multi-phase remains descoped (ADR-0005) — single-phase optimiser.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-03 12:39:47 +00:00
..
addresses standardist Address 2026-05-22 10:13:32 +00:00
fuel_rates feat(fuel-rates): FuelRates snapshot + repository foundation (ADR-0014) 2026-06-02 09:29:07 +00:00
modelling feat(modelling): Optimiser core — exact grouped knapsack (#1160) 2026-06-03 12:39:47 +00:00
property feat(property): Property aggregate + PropertyRepository (#1132) 2026-06-01 16:28:48 +00:00
property_baseline feat(baseline): Rebaseliner returns RebaselineResult carrying the SapResult 2026-06-02 18:37:13 +00:00
sap10_calculator Merge branch 'main' of https://github.com/Hestia-Homes/Model into feature/bill-derivation 2026-06-03 08:52:36 +00:00
tasks tests framework completed 2026-05-20 14:00:19 +00:00
__init__.py added postcode splitter rewrite to ddd 2026-05-19 16:35:09 +00:00
test_building_geometry.py feat(modelling): floor Recommendation Generator + ground-floor-area geometry 2026-06-03 09:12:29 +00:00
test_postcode.py tests framework completed 2026-05-20 14:00:19 +00:00