Model/recommendations/HotwaterRecommendations.py
2024-02-20 20:50:17 +00:00

53 lines
1.9 KiB
Python

from backend.Property import Property
from recommendations.Costs import Costs
class HotwaterRecommendations:
def __init__(self, property_instance: Property):
self.property = property_instance
self.costs = Costs(self.property)
self.recommendations = []
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