updating innovation rate for fireplaces

This commit is contained in:
Khalim Conn-Kowlessar 2025-08-18 11:56:34 +01:00
parent 999a258d62
commit 3688985152

View file

@ -8,17 +8,18 @@ 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,
materials: list = None,
):
self.property = property_instance
self.has_ventilaion = None
self.recommendation = None
self.materials = [m for m in materials if m["type"] == "sealing_fireplace"]
if len(self.materials) != 1:
raise ValueError("Incorrect number of sealing fireplace materials specified")
def recommend(self, phase=0):
"""
@ -32,14 +33,16 @@ class FireplaceRecommendations(Definitions):
if number_open_fireplaces == 0:
return
material = self.materials[0]
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
estimated_cost = number_open_fireplaces * material["total_cost"] if not already_installed else 0
# We recommend installing two mechanical ventilation systems
self.recommendation = [
{
"phase": phase,
"parts": [],
"parts": [material],
"type": "sealing_open_fireplace",
"measure_type": "sealing_open_fireplace",
"description": "Seal %s open fireplaces" % str(number_open_fireplaces),
@ -53,6 +56,7 @@ class FireplaceRecommendations(Definitions):
"labour_days": 6 * number_open_fireplaces / 8, # Assume 8 hour day
"description_simulation": {
"number-open-fireplaces": 0
}
},
"innovation_rate": material["innovation_rate"],
}
]