Model/recommendations/HeatingRecommender.py
2024-02-19 13:02:43 +00:00

57 lines
2.9 KiB
Python

from recommendations.Costs import Costs
from backend.Property import Property
class HeatingRecommender:
def __init__(self, property_instance: Property):
self.property = property_instance
self.costs = Costs(self.property)
self.recommendations = []
def recommend(self, phase=0):
# This first iteration of the recommender will provide very basic recommendation
if self.property.main_heating == "Room heaters, electric":
self.recommend_room_heaters_electric(phase=phase)
return
def recommend_room_heaters_electric(self, phase):
"""
If the home has Room heaters, electric, we start by identifying potential heating controls that could
be upgraded, that would provide a practical impact. This will be the least invasive improvement.
We can then consider the heating system itself
:return:
"""
if self.property.data["mainheat-energy-eff"] in ["Poor", "Very Poor"]:
# We recommend Programmer and appliance thermostats as the heating control. This has an average energy
# efficiency rating, and is likely to be more efficient than the current heating controls. if the
# rating is poor or very poor, the home may have a Programmer and room thermostat, which is less efficient
# than a Programmer and appliance thermostats, because it allows for much more granular control at not
# just a room level but individual heater/appliance level
# Note: A room thermostat is commonly placed in a hallway, and it measures the temperature of the air
# surrounding it. It then sends a signal to the heating system to turn on or off, depending on the
# temperature. An appliance thermostat, on the other hand, is placed on the heater/appliance itself, and
# measures the temperature of the heater/appliance. This allows for much more granular control, and
# prevents overheating.
# In order to cost, we check if the property already has a programmer, and therefor we will just need to
# add the cost of the appliance thermostats
has_programmer = self.property.main_heating_controls["switch_system"] == "programmer"
self.recommendations.append(
{
"phase": phase,
"parts": [
# TODO
],
"type": "heating_control",
"description": "Upgrade heating controls to Programmer and Appliance or Smart"
"Thermostats for more precise heating control, and prevention of overheating",
"starting_u_value": None,
"new_u_value": None,
"sap_points": None,
**self.costs.programmer_and_appliance_thermostat(has_programmer=has_programmer)
}
)