mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
Added limited flat roof insulaton
This commit is contained in:
parent
4537c7deab
commit
eb277b4e8a
2 changed files with 34 additions and 6 deletions
|
|
@ -123,6 +123,7 @@ class RoofRecommendations:
|
|||
for material in materials:
|
||||
|
||||
for depth, cost_per_unit in zip(material["depths"], material["cost"]):
|
||||
|
||||
# We make sure we hit a depth of 270mm. We should factor in any existing insulation if the
|
||||
# loft is already partially insulated
|
||||
if (depth + insulation_thickness) < self.MINIMUM_LOFT_ISULATION_MM:
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ flat_roof_insulation_materials = [
|
|||
'description': 'Example flat roof insulation',
|
||||
'depths': [50, 150, 220, 270, 300], 'depth_unit': 'mm', 'cost': [9, 10, 11, 12, 13],
|
||||
'cost_unit': 'gbp_sq_meter',
|
||||
'r_value_per_mm': 0.022727273, 'r_value_unit': 'square_meter_kelvin_per_watt',
|
||||
'r_value_per_mm': 0.032727273, 'r_value_unit': 'square_meter_kelvin_per_watt',
|
||||
'thermal_conductivity': 0.044, 'thermal_conductivity_unit': 'watt_per_meter_kelvin',
|
||||
'link': None, 'is_active': True
|
||||
}
|
||||
|
|
@ -343,11 +343,6 @@ class TestRoofRecommendations:
|
|||
"Insulate your room roof with 270mm of Example room roof insulation"
|
||||
|
||||
def test_flat_no_insulation(self):
|
||||
# Desriptions to handle:
|
||||
# 'Flat, limited insulation (assumed)',
|
||||
#
|
||||
# 'Flat, insulated (assumed)'
|
||||
|
||||
property_instance11 = Property(id=11, address1="fake", postcode="fake", epc_client=Mock())
|
||||
property_instance11.age_band = "D"
|
||||
property_instance11.floor_area = 150
|
||||
|
|
@ -405,3 +400,35 @@ class TestRoofRecommendations:
|
|||
roof_recommender12.recommend()
|
||||
|
||||
assert not roof_recommender12.recommendations
|
||||
|
||||
def test_flat_limited_insulation(self):
|
||||
property_instance13 = Property(id=12, address1="fake", postcode="fake", epc_client=Mock())
|
||||
property_instance13.age_band = "D"
|
||||
property_instance13.floor_area = 150
|
||||
property_instance13.roof = {
|
||||
'original_description': 'Flat, limited insulation (assumed)',
|
||||
'clean_description': 'Flat, limited insulation',
|
||||
'thermal_transmittance': None, 'thermal_transmittance_unit': None, 'is_pitched': False,
|
||||
'is_roof_room': False,
|
||||
'is_loft': False, 'is_flat': True, 'is_thatched': False, 'is_at_rafters': False, 'is_assumed': True,
|
||||
'has_dwelling_above': False, 'is_valid': True, 'insulation_thickness': 'below average'
|
||||
}
|
||||
|
||||
roof_recommender13 = RoofRecommendations(
|
||||
property_instance=property_instance13, materials=flat_roof_insulation_materials
|
||||
)
|
||||
|
||||
assert not roof_recommender13.recommendations
|
||||
|
||||
roof_recommender13.recommend()
|
||||
|
||||
assert len(roof_recommender13.recommendations) == 1
|
||||
|
||||
assert roof_recommender13.recommendations[0]["parts"][0]["depths"] == [220]
|
||||
|
||||
assert roof_recommender13.recommendations[0]["new_u_value"] == 0.14
|
||||
|
||||
assert roof_recommender13.recommendations[0]["starting_u_value"] == 2.3
|
||||
|
||||
assert roof_recommender13.recommendations[0]["description"] == \
|
||||
"Insulate the home's flat roof with 220mm of Example flat roof insulation"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue