allow slightly negative impact on cost savings

This commit is contained in:
Khalim Conn-Kowlessar 2026-02-24 00:32:03 +00:00
parent 40f3c36dbb
commit b14c81fa83

View file

@ -79,14 +79,14 @@ def prepare_input_measures(
# if recs[0]["type"] == "solar_pv":
# recs = [r for r in recs if ~r["has_battery"]]
# Only include measures with non-negative cost savings
# Only include measures with non-negative cost savings - we allow for a minor negative impact
if eco_measures:
recs_to_append = [
rec for rec in recs if (rec["energy_cost_savings"] >= 0) or (rec["measure_type"] in eco_measures)
rec for rec in recs if (rec["energy_cost_savings"] >= -10) or (rec["measure_type"] in eco_measures)
]
else:
recs_to_append = [
rec for rec in recs if (rec["energy_cost_savings"] >= 0)
rec for rec in recs if (rec["energy_cost_savings"] >= -10)
]
if not recs_to_append:
continue