mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
slight restructure of floor recommendations, removing repeated code
This commit is contained in:
parent
c6464801f1
commit
77b5c87fbe
1 changed files with 11 additions and 17 deletions
|
|
@ -201,20 +201,23 @@ class FloorRecommendations(BaseUtility):
|
|||
# The floor is already compliant
|
||||
return
|
||||
|
||||
# For these methods, we need to know the wall material
|
||||
# For these methods, we need to know the additional details about the property
|
||||
if self.property.walls["is_solid_brick"]:
|
||||
wall_type = "solid brick"
|
||||
else:
|
||||
raise NotImplementedError("Implement me")
|
||||
|
||||
if is_suspended:
|
||||
total_floor_area = float(self.property.data["total-floor-area"])
|
||||
number_of_rooms = float(self.property.data["number-habitable-rooms"])
|
||||
total_floor_area = float(self.property.data["total-floor-area"])
|
||||
number_of_rooms = float(self.property.data["number-habitable-rooms"])
|
||||
|
||||
if self.property.data["property-type"] == "House":
|
||||
num_floors = self._estimate_floors(total_floor_area, number_of_rooms)
|
||||
else:
|
||||
raise NotImplementedError("Implement me")
|
||||
if self.property.data["property-type"] == "House":
|
||||
num_floors = self._estimate_floors(total_floor_area, number_of_rooms)
|
||||
elif self.property.data["property-type"] == "Flat":
|
||||
num_floors = 1
|
||||
else:
|
||||
raise NotImplementedError("Implement me")
|
||||
|
||||
if is_suspended:
|
||||
|
||||
if insulation_thickness == "none":
|
||||
|
||||
|
|
@ -238,15 +241,6 @@ class FloorRecommendations(BaseUtility):
|
|||
self.recommend_floor_insulation(u_value=u_value, parts=suspended_floor_insulation_parts)
|
||||
|
||||
if is_solid:
|
||||
total_floor_area = float(self.property.data["total-floor-area"])
|
||||
number_of_rooms = float(self.property.data["number-habitable-rooms"])
|
||||
|
||||
if self.property.data["property-type"] == "House":
|
||||
num_floors = self._estimate_floors(total_floor_area, number_of_rooms)
|
||||
elif self.property.data["property-type"] == "Flat":
|
||||
num_floors = 1
|
||||
else:
|
||||
raise NotImplementedError("Implement me")
|
||||
|
||||
if insulation_thickness == "none":
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue