Model/recommendations/FireplaceRecommendations.py
2024-10-03 10:43:06 +01:00

58 lines
2 KiB
Python

import pandas as pd
from BaseUtility import Definitions
from backend.Property import Property
class FireplaceRecommendations(Definitions):
"""
For properties that have open fireplaces, we recommend sealing the fireplaces
"""
# This is our base assumption for the cost of the work
COST_OF_WORK = 235
def __init__(
self,
property_instance: Property,
):
self.property = property_instance
self.has_ventilaion = None
self.recommendation = None
def recommend(self, phase=0):
"""
Based on the number of open fireplcaes found, we recommend sealing each one at a cost of
around £500
:return:
"""
number_open_fireplaces = int(self.property.data["number-open-fireplaces"])
if number_open_fireplaces == 0:
return
already_installed = "sealing_open_fireplace" in self.property.already_installed
estimated_cost = number_open_fireplaces * self.COST_OF_WORK if not already_installed else 0
# We recommend installing two mechanical ventilation systems
self.recommendation = [
{
"phase": phase,
"parts": [],
"type": "sealing_open_fireplace",
"measure_type": "sealing_open_fireplace",
"description": "Seal %s open fireplaces" % str(number_open_fireplaces),
"starting_u_value": None,
"new_u_value": None,
"sap_points": None,
"already_installed": already_installed,
"total": estimated_cost,
# Take a very basic estimate of 6 hours, multipled by the number of open fireplaces to seal
"labour_hours": 6 * number_open_fireplaces,
"labour_days": 6 * number_open_fireplaces / 8, # Assume 8 hour day
"description_simulation": {
"number-open-fireplaces": 0
}
}
]