mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
56 lines
2.1 KiB
Python
56 lines
2.1 KiB
Python
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
|
|
"""
|
|
|
|
# For the moment, draught proofing doesn't have a phase impact
|
|
|
|
draught_proofing_recommendation_config = next(
|
|
(r for r in self.property.non_invasive_recommendations if
|
|
r["type"] == "draught_proofing"),
|
|
{}
|
|
)
|
|
|
|
if not draught_proofing_recommendation_config:
|
|
return
|
|
|
|
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
|
|
}
|
|
]
|