From 012b0b03bafb31f50dd30391cb35adcf996bdf47 Mon Sep 17 00:00:00 2001 From: Khalim Conn-Kowlessar Date: Thu, 9 Jul 2026 11:44:32 +0000 Subject: [PATCH] =?UTF-8?q?A=20Fabric=20First=20Scenario=20spends=20the=20?= =?UTF-8?q?budget=20on=20the=20envelope=20before=20heating=20=F0=9F=9F=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Fable 5 --- orchestration/modelling_orchestrator.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/orchestration/modelling_orchestrator.py b/orchestration/modelling_orchestrator.py index 7a30d7e82..23ac42941 100644 --- a/orchestration/modelling_orchestrator.py +++ b/orchestration/modelling_orchestrator.py @@ -19,6 +19,7 @@ from domain.modelling.optimisation.optimiser import ( OptimisedPackage, ScoredOption, optimise_package, + optimise_package_fabric_first, ) from domain.modelling.scoring.package_scorer import PackageScorer, Score from domain.modelling.plan import Plan, PlanMeasure @@ -188,7 +189,13 @@ class ModellingOrchestrator: dependencies: list[MeasureDependency] = _measure_dependencies( effective_epc, products, considered ) - package: OptimisedPackage = optimise_package( + # A Fabric First brief optimises the envelope with the full budget + # before heating / renewables are considered on top (mirroring the + # legacy engine's enforce_fabric_first). + optimise = ( + optimise_package_fabric_first if scenario.fabric_first else optimise_package + ) + package: OptimisedPackage = optimise( groups=groups, scorer=scorer, baseline_epc=effective_epc,