diff --git a/recommendations/Recommendations.py b/recommendations/Recommendations.py index fcdd513f..0469f501 100644 --- a/recommendations/Recommendations.py +++ b/recommendations/Recommendations.py @@ -782,6 +782,11 @@ class Recommendations: } } + # Prevent from being negative + predicted_sap_points = 0 if predicted_sap_points < 0 else predicted_sap_points + predicted_co2_savings = 0 if predicted_co2_savings < 0 else predicted_co2_savings + predicted_heat_demand = 0 if predicted_heat_demand < 0 else predicted_heat_demand + 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)