mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-30 13:10:47 +00:00
handle all plans having zero cost 🟩
This commit is contained in:
parent
a8d3ce599d
commit
0e279b15ce
1 changed files with 9 additions and 5 deletions
|
|
@ -94,11 +94,15 @@ def choose_cheapest_relevant_plan(
|
||||||
for plan in eligible_plans
|
for plan in eligible_plans
|
||||||
)
|
)
|
||||||
|
|
||||||
cheapest_plans: List[Plan] = [
|
if all(p.record.cost_of_works == 0 for p in eligible_plans):
|
||||||
plan
|
cheapest_plans = eligible_plans
|
||||||
for plan in eligible_plans
|
|
||||||
if (plan.record.cost_of_works or float("inf")) == min_cost
|
else:
|
||||||
]
|
cheapest_plans: List[Plan] = [
|
||||||
|
plan
|
||||||
|
for plan in eligible_plans
|
||||||
|
if (plan.record.cost_of_works or float("inf")) == min_cost
|
||||||
|
]
|
||||||
|
|
||||||
for priority_scenario_id in scenario_priority_order:
|
for priority_scenario_id in scenario_priority_order:
|
||||||
for plan in cheapest_plans:
|
for plan in cheapest_plans:
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue