diff --git a/recommendations/DraughtProofingRecommendations.py b/recommendations/DraughtProofingRecommendations.py new file mode 100644 index 00000000..fd6d4ee9 --- /dev/null +++ b/recommendations/DraughtProofingRecommendations.py @@ -0,0 +1,49 @@ +from backend.Property import Property + + +class DraughtProofingRecommendations: + + def __init__(self, property_instance: Property): + self.property = property_instance + + self.recommendation = [] + + def recommend(self): + """ + In some cases, we can identify the need for draught proofing from the EPC recommendations, however the initial + implementation of this class will just assume that we are picking up a non-invasive recommendation from the + survey + """ + + draught_proofing_recommendation_config = [ + r for r in self.property.non_invasive_recommendations if r["type"] == "draught_proofing" + ][0] + + description = ( + "Draught proof doors and windows to improve energy efficiency" if + not draught_proofing_recommendation_config.get("description") + else draught_proofing_recommendation_config["description"] + ) + + # We recommend installing two mechanical ventilation systems + self.recommendation = [ + { + "phase": None, + "parts": [], + "type": "draught_proofing", + "description": description, + "starting_u_value": None, + "new_u_value": None, + "already_installed": False, + "sap_points": draught_proofing_recommendation_config["sap_points"], + "heat_demand": 0, + "kwh_savings": 0, + "co2_equivalent_savings": 0, + "energy_cost_savings": 0, + "total": draught_proofing_recommendation_config["cost"], + # We use a very simple and rough estimate of 4 hours per unit + "labour_hours": draught_proofing_recommendation_config.get("labour_hours", 8), + "labour_days": draught_proofing_recommendation_config.get("labour_days", 1), # Assume 8 hour day + "survey": True + } + ] diff --git a/recommendations/Recommendations.py b/recommendations/Recommendations.py index d910ddfe..070036af 100644 --- a/recommendations/Recommendations.py +++ b/recommendations/Recommendations.py @@ -14,6 +14,7 @@ from recommendations.WindowsRecommendations import WindowsRecommendations from recommendations.HeatingRecommender import HeatingRecommender from recommendations.HotwaterRecommendations import HotwaterRecommendations from recommendations.SecondaryHeating import SecondaryHeating +from recommendations.DraughtProofingRecommendations import DraughtProofingRecommendations from backend.ml_models.AnnualBillSavings import AnnualBillSavings from backend.apis.GoogleSolarApi import GoogleSolarApi import backend.app.assumptions as assumptions @@ -58,6 +59,7 @@ class Recommendations: self.ventilation_recomender = VentilationRecommendations( property_instance=property_instance, materials=materials ) + self.draught_proofing_recommender = DraughtProofingRecommendations(property_instance=property_instance) self.fireplace_recommender = FireplaceRecommendations(property_instance=property_instance) self.lighting_recommender = LightingRecommendations(property_instance=property_instance, materials=materials) self.windows_recommender = WindowsRecommendations(property_instance=property_instance, materials=materials) @@ -135,6 +137,12 @@ class Recommendations: # This is a recommendatin that typically comes from an energy assessment property_recommendations.append(self.ventilation_recomender.recommend_trickle_vents()) + if "draught_proofing" in measures: + # This is a recommendation that in some instances we can recommend, by deducing it from the SAP + # recommendations, however we will implement this later + self.draught_proofing_recommender.recommend() + property_recommendations.append(self.draught_proofing_recommender.recommendation) + if "floor_insulation" in measures: self.floor_recommender.recommend(phase=phase, measures=measures) if self.floor_recommender.recommendations: