Model/recommendations/FireplaceRecommendations.py
2023-11-28 12:39:11 +00:00

51 lines
1.6 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 = 300
def __init__(
self,
property_instance: Property,
):
self.property = property_instance
self.has_ventilaion = None
self.recommendation = None
def recommend(self):
"""
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
estimated_cost = number_open_fireplaces * self.COST_OF_WORK
# We recommend installing two mechanical ventilation systems
self.recommendation = [
{
"parts": [],
"type": "sealing_open_fireplace",
"description": "Seal %s open fireplaces" % str(number_open_fireplaces),
"starting_u_value": None,
"new_u_value": None,
"sap_points": None,
"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
}
]