mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
allow slack when goal is increasing epc
This commit is contained in:
parent
2c19b89c77
commit
e7005be801
1 changed files with 4 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue