added adjust cost differences

This commit is contained in:
Khalim Conn-Kowlessar 2024-07-09 17:37:37 +01:00
parent 4c57b74d96
commit af66744979

View file

@ -527,6 +527,32 @@ class Recommendations:
new_heat_demand
)
# We now estimate the adjusted cost savings for the recommendation
predicted_heating_cost_reduction = (
heating_cost_phase_impact[heating_cost_phase_impact["phase"] == previous_phase][
"adjusted_cost"
].values[0] - new_heating_cost
)
predicted_heating_cost_reduction = (
0 if predicted_heating_cost_reduction < 0 else predicted_heating_cost_reduction
)
predicted_hot_water_cost_reduction = (
hot_water_cost_phase_impact[hot_water_cost_phase_impact["phase"] == previous_phase][
"adjusted_cost"
].values[0] - new_hot_water_cost
)
predicted_hot_water_cost_reduction = (
0 if predicted_hot_water_cost_reduction < 0 else predicted_hot_water_cost_reduction
)
# Only lighting recommendations can have an impact here
predicted_lighting_cost_reduction = 0 if rec["type"] != "lighting" else (
lighting_cost_phase_impact[lighting_cost_phase_impact["phase"] == previous_phase][
"adjusted_cost"
].values[0] - new_lighting_cost
)
if rec["type"] == "low_energy_lighting":
# For the moment, we cap the number of SAP points that can be achieved by ventilation at 2
rec["sap_points"] = min(predicted_sap_points, LightingRecommendations.SAP_LIMIT)