diff --git a/backend/engine/engine.py b/backend/engine/engine.py index 04860add..db3b6d0d 100644 --- a/backend/engine/engine.py +++ b/backend/engine/engine.py @@ -877,7 +877,10 @@ async def model_engine(body: PlanTriggerRequest): else: if body.budget: - optimiser = GainOptimiser(input_measures, max_cost=body.budget, max_gain=gain) + optimiser = GainOptimiser( + input_measures, max_cost=body.budget, max_gain=gain, + allow_slack=body.goal == "Increasing EPC" + ) else: # The minimum gain is the minimum number of SAP points required to get to the target SAP band # If the gain is negative, the optimiser will return an empty solution