mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
roughly implemented hot water insulation jacket tank insulation
This commit is contained in:
parent
6933678810
commit
9f205e3dce
4 changed files with 64 additions and 3 deletions
|
|
@ -35,6 +35,7 @@ def app():
|
|||
|
||||
cleaned_data = {}
|
||||
epc_directories = [entry for entry in EPC_DIRECTORY.iterdir() if entry.is_dir()]
|
||||
|
||||
for directory in tqdm(epc_directories):
|
||||
data = pd.read_csv(directory / "certificates.csv", low_memory=False)
|
||||
# Rename the columns to the same format as the api returns
|
||||
|
|
|
|||
|
|
@ -980,3 +980,21 @@ class Costs:
|
|||
"labour_hours": 4,
|
||||
"labour_days": 1,
|
||||
}
|
||||
|
||||
def hot_water_tank_insulation(self):
|
||||
"""
|
||||
Calculate the cost of installing hot water tank insulation
|
||||
"""
|
||||
|
||||
# The £50 cost is a rough estimate based on internet research
|
||||
total_cost = 50
|
||||
subtotal_before_vat = total_cost / (1 + self.VAT_RATE)
|
||||
vat = total_cost - subtotal_before_vat
|
||||
|
||||
return {
|
||||
"total": total_cost,
|
||||
"subtotal": subtotal_before_vat,
|
||||
"vat": vat,
|
||||
"labour_hours": 0,
|
||||
"labour_days": 0,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,47 @@ class HotwaterRecommendations:
|
|||
self.property = property_instance
|
||||
self.costs = Costs(self.property)
|
||||
|
||||
self.recommendation = []
|
||||
self.recommendations = []
|
||||
|
||||
def recommend(self):
|
||||
pass
|
||||
def recommend(self, phase):
|
||||
"""
|
||||
There are maybe a number of recommendations that are simultaneously applicable to the property.
|
||||
If this is true then the phase may need to be incrememnted from within this recommendation
|
||||
|
||||
:param phase:
|
||||
:return:
|
||||
"""
|
||||
# Reset the recommendations
|
||||
self.recommendations = []
|
||||
|
||||
# This first iteration of the recommender will provide very basic recommendation
|
||||
# We recommend heating controls based on the main heating system
|
||||
if (self.property.hotwater["heater_type"] in ["electric immersion"]) & \
|
||||
(self.property.data["hot-water-energy-eff"] == "Very Poor"):
|
||||
self.recommend_tank_insulation(phase=phase)
|
||||
return
|
||||
|
||||
def recommend_tank_insulation(self, phase):
|
||||
"""
|
||||
If the home has a very poor hot water system, this is often indicative of a lack of insulation on the hot water
|
||||
tank. This is a very simple and cost effective improvement that can be made to the home.
|
||||
"""
|
||||
|
||||
recommendation_cost = self.costs.hot_water_tank_insulation()
|
||||
|
||||
self.recommendations.append(
|
||||
{
|
||||
"phase": phase,
|
||||
"parts": [
|
||||
# TODO
|
||||
],
|
||||
"type": "hot_water_tank_insulation",
|
||||
"description": "Insulate the hot water tank with an insulation jacket",
|
||||
"starting_u_value": None,
|
||||
"new_u_value": None,
|
||||
"sap_points": None,
|
||||
**recommendation_cost,
|
||||
"simulation_config": {"hot_water_energy_eff_ending": "Average"}
|
||||
}
|
||||
)
|
||||
return
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ from recommendations.LightingRecommendations import LightingRecommendations
|
|||
from recommendations.SolarPvRecommendations import SolarPvRecommendations
|
||||
from recommendations.WindowsRecommendations import WindowsRecommendations
|
||||
from recommendations.HeatingRecommender import HeatingRecommender
|
||||
from recommendations.HotwaterRecommendations import HotwaterRecommendations
|
||||
from backend.ml_models.AnnualBillSavings import AnnualBillSavings
|
||||
|
||||
|
||||
|
|
@ -42,6 +43,7 @@ class Recommendations:
|
|||
self.windows_recommender = WindowsRecommendations(property_instance=property_instance, materials=materials)
|
||||
self.solar_recommender = SolarPvRecommendations(property_instance=property_instance)
|
||||
self.heating_recommender = HeatingRecommender(property_instance=property_instance)
|
||||
self.hotwater_recommender = HotwaterRecommendations(property_instance=property_instance)
|
||||
|
||||
def recommend(self):
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue