From 89c75dcd5a2e3f1bf0d097cf7c1b36a024e56c32 Mon Sep 17 00:00:00 2001 From: Khalim Conn-Kowlessar Date: Wed, 22 Nov 2023 11:56:03 +0000 Subject: [PATCH] Added in loft insulation method --- recommendations/Costs.py | 33 ++++++++++++++------------------- 1 file changed, 14 insertions(+), 19 deletions(-) diff --git a/recommendations/Costs.py b/recommendations/Costs.py index efa22fd8..6dc2e7aa 100644 --- a/recommendations/Costs.py +++ b/recommendations/Costs.py @@ -84,7 +84,7 @@ class Costs: "labour_hours": labour_hours } - def cavity_wall_insulation(self, material): + def loft_insulation(self, material): """ Calculates the total cost for cavity wall insulation based on material and labor costs, including contingency, preliminaries, profit, and VAT. @@ -92,26 +92,21 @@ class Costs: :return: A dictionary containing detailed cost breakdown. """ # Cost per m2 - material = { - "description": "Crown Dritherm Cavity Slab 37 (Thermal conductivity 0.037 W/mK) glass fibre batt or other " - "equal; as full or partial cavity fill; including cutting and fitting around wall ties and " - "retaining discs", - "depth": 75, - "thermal_conductivity": 0.037, - "prime_cost": 5.17, - "material_cost": 5.62, - "labour_cost": 2.25, - "labour_hours": 0.13 - } + # material = { + # "description": "Crown Loft Roll 44 glass fibre roll", + # "depth": 270, + # "thermal_conductivity": 0.044, + # "prime_cost": None, + # "material_cost": 5.91938, + # "labour_cost": 1.96, + # "labour_hours": 0.11 + # } material_cost_per_m2 = material["material_cost"] - wall_area = self.property.insulation_wall_area + floor_area = self.property.floor_area - # This is the amount of material required in m3, assuming a standard 75mm depth - volume = 0.075 * wall_area - - base_material_cost = material_cost_per_m2 * wall_area - labour_cost = material["labour_cost"] * wall_area + base_material_cost = material_cost_per_m2 * floor_area + labour_cost = material["labour_cost"] * floor_area subtotal_before_profit = base_material_cost + labour_cost @@ -125,7 +120,7 @@ class Costs: total_cost = subtotal_before_vat + vat_cost - labour_hours = material["labour_hours"] * wall_area + labour_hours = material["labour_hours"] * floor_area return { "total": total_cost,