mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
48 lines
1.3 KiB
Python
48 lines
1.3 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,
|
|
}
|
|
]
|