Model/recommendations/FireplaceRecommendations.py
Khalim Conn-Kowlessar b052c9925f Added heating override
2024-04-12 15:41:52 +01:00

54 lines
1.8 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, 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
is_override = "sealing_open_fireplace" in self.property.override
estimated_cost = number_open_fireplaces * self.COST_OF_WORK if not is_override else 0
# We recommend installing two mechanical ventilation systems
self.recommendation = [
{
"phase": phase,
"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,
"is_override": is_override,
"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
}
]