added mds cavity wall insulation

This commit is contained in:
Khalim Conn-Kowlessar 2024-05-21 11:49:17 +01:00
parent f91cbec883
commit 8d6085be0f
4 changed files with 50 additions and 7 deletions

View file

@ -150,6 +150,10 @@ class PropertyValuation:
] ]
# Additional sources:
# https://superhomes.org.uk/wp-content/uploads/2024/05/The-Impact-of-Retrofit-on-Residential-Property-Market
# -Values-7-rotated-1.pdf
EPC_BANDS = ["G", "F", "E", "D", "C", "B", "A"] EPC_BANDS = ["G", "F", "E", "D", "C", "B", "A"]
@classmethod @classmethod

View file

@ -312,7 +312,7 @@ class HeatingRecommender:
return output return output
def recommend_hhr_storage_heaters(self, phase, system_change, heating_controls_only): def recommend_hhr_storage_heaters(self, phase, system_change, heating_controls_only, _return=False):
""" """
We will recommend upgrading to a high heat retention storage system, if the current system is not already We will recommend upgrading to a high heat retention storage system, if the current system is not already
high heat retention storage high heat retention storage
@ -321,6 +321,8 @@ class HeatingRecommender:
:param system_change: Indicates if we are recommending a different type of heating system, compared to the :param system_change: Indicates if we are recommending a different type of heating system, compared to the
current system current system
:param heating_controls_only: Indicates if we should include a recommendation for just heating controls :param heating_controls_only: Indicates if we should include a recommendation for just heating controls
:param _return: Indicates if we should return the recommendations, rather than appending them to the
recommendations list
:return: :return:
""" """
@ -374,6 +376,8 @@ class HeatingRecommender:
heating_controls_only=heating_controls_only, heating_controls_only=heating_controls_only,
system_change=system_change system_change=system_change
) )
if _return:
return recommendations
self.heating_recommendations.extend(recommendations) self.heating_recommendations.extend(recommendations)

View file

@ -10,6 +10,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.Recommendations import Recommendations
class Mds: class Mds:
@ -57,6 +58,8 @@ class Mds:
if any([m in not_implemented_measures for m in measure_config_list]): if any([m in not_implemented_measures for m in measure_config_list]):
raise NotImplementedError("Not implemented measure in the property - implement me") raise NotImplementedError("Not implemented measure in the property - implement me")
mds_recommendations = []
if "external_wall_insulation" in measure_config_list: if "external_wall_insulation" in measure_config_list:
raise Exception("check me out") raise Exception("check me out")
self.wall_recommender.recommend(phase=0) self.wall_recommender.recommend(phase=0)
@ -65,10 +68,9 @@ class Mds:
# TODO: Insert the recommendation identifier into this recommendation # TODO: Insert the recommendation identifier into this recommendation
if "cavity_wall_insulation" in measure_config_list: if "cavity_wall_insulation" in measure_config_list:
raise Exception("check me out 2") recs = self.wall_recommender.mds_recommend_cavity_wall_insulation(phase=0)
# TODO: get cwi recs = self.insert_recommendation_id(recs, measures, "cavity_wall_insulation")
self.wall_recommender.recommend(phase=0) mds_recommendations.append(recs)
cwi_recommendations = self.wall_recommender.recommendations
if "loft_insulation" in measure_config_list: if "loft_insulation" in measure_config_list:
raise Exception("check me out 3") raise Exception("check me out 3")
@ -91,8 +93,11 @@ class Mds:
self.heating_recommender.recommend(phase=0) self.heating_recommender.recommend(phase=0)
if "electric_storage_heaters" in measure_config_list: if "electric_storage_heaters" in measure_config_list:
raise Exception("check me out 8") recs = self.heating_recommender.recommend_hhr_storage_heaters(
self.heating_recommender.recommend(phase=0) phase=0, system_change=True, heating_controls_only=False, _return=True
)
recs = self.insert_recommendation_id(recs, measures)
mds_recommendations.append(recs)
if "low_energy_lighting" in measure_config_list: if "low_energy_lighting" in measure_config_list:
raise Exception("check me out 9") raise Exception("check me out 9")
@ -137,3 +142,16 @@ class Mds:
if "room_in_roof_insulation" in measure_config_list: if "room_in_roof_insulation" in measure_config_list:
raise Exception("check me out 19") raise Exception("check me out 19")
self.roof_recommender.recommend(phase=0) self.roof_recommender.recommend(phase=0)
property_representative_recommendations = Recommendations.create_representative_recommendations(
mds_recommendations, non_invasive_recommendations=[]
)
@staticmethod
def insert_recommendation_id(recommendations, measures, measure_name):
# Insert the recommendation identifier into this recommendation
measure_config = [m for m in measures if measure_name in m][0]
for r in recommendations:
r["recommendation_id"] = list(measure_config.values())[0]
return recommendations

View file

@ -103,6 +103,23 @@ class WallRecommendations(Definitions):
return True return True
def mds_recommend_cavity_wall_insulation(self, phase=None):
# Function specifically for cavity wall insulation, for usage in the mds report
self.recommendations = []
insulation_thickness = self.property.walls["insulation_thickness"]
u_value = get_wall_u_value(
clean_description=self.property.walls["clean_description"],
age_band=self.property.age_band,
is_granite_or_whinstone=self.property.walls["is_granite_or_whinstone"],
is_sandstone_or_limestone=self.property.walls["is_sandstone_or_limestone"],
)
# Test filling cavity
self.find_cavity_insulation(u_value, insulation_thickness, phase)
return self.recommendations
def recommend(self, phase=0): def recommend(self, phase=0):
# if building built after 1990 + we're able to identify U-value + # if building built after 1990 + we're able to identify U-value +
# U-value less than 0.18 and if in or close to a conversation area, # U-value less than 0.18 and if in or close to a conversation area,