mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-30 13:10:47 +00:00
Created draught proofing recommendations
This commit is contained in:
parent
00f3a175fa
commit
8e8961a89d
2 changed files with 57 additions and 0 deletions
49
recommendations/DraughtProofingRecommendations.py
Normal file
49
recommendations/DraughtProofingRecommendations.py
Normal file
|
|
@ -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
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
@ -14,6 +14,7 @@ from recommendations.WindowsRecommendations import WindowsRecommendations
|
||||||
from recommendations.HeatingRecommender import HeatingRecommender
|
from recommendations.HeatingRecommender import HeatingRecommender
|
||||||
from recommendations.HotwaterRecommendations import HotwaterRecommendations
|
from recommendations.HotwaterRecommendations import HotwaterRecommendations
|
||||||
from recommendations.SecondaryHeating import SecondaryHeating
|
from recommendations.SecondaryHeating import SecondaryHeating
|
||||||
|
from recommendations.DraughtProofingRecommendations import DraughtProofingRecommendations
|
||||||
from backend.ml_models.AnnualBillSavings import AnnualBillSavings
|
from backend.ml_models.AnnualBillSavings import AnnualBillSavings
|
||||||
from backend.apis.GoogleSolarApi import GoogleSolarApi
|
from backend.apis.GoogleSolarApi import GoogleSolarApi
|
||||||
import backend.app.assumptions as assumptions
|
import backend.app.assumptions as assumptions
|
||||||
|
|
@ -58,6 +59,7 @@ class Recommendations:
|
||||||
self.ventilation_recomender = VentilationRecommendations(
|
self.ventilation_recomender = VentilationRecommendations(
|
||||||
property_instance=property_instance, materials=materials
|
property_instance=property_instance, materials=materials
|
||||||
)
|
)
|
||||||
|
self.draught_proofing_recommender = DraughtProofingRecommendations(property_instance=property_instance)
|
||||||
self.fireplace_recommender = FireplaceRecommendations(property_instance=property_instance)
|
self.fireplace_recommender = FireplaceRecommendations(property_instance=property_instance)
|
||||||
self.lighting_recommender = LightingRecommendations(property_instance=property_instance, materials=materials)
|
self.lighting_recommender = LightingRecommendations(property_instance=property_instance, materials=materials)
|
||||||
self.windows_recommender = WindowsRecommendations(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
|
# This is a recommendatin that typically comes from an energy assessment
|
||||||
property_recommendations.append(self.ventilation_recomender.recommend_trickle_vents())
|
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:
|
if "floor_insulation" in measures:
|
||||||
self.floor_recommender.recommend(phase=phase, measures=measures)
|
self.floor_recommender.recommend(phase=phase, measures=measures)
|
||||||
if self.floor_recommender.recommendations:
|
if self.floor_recommender.recommendations:
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue