mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-07-12 13:29:04 +00:00
adding non-invasive recommendations for iwi
This commit is contained in:
parent
304e19fca4
commit
33482b6504
1 changed files with 26 additions and 2 deletions
|
|
@ -454,6 +454,16 @@ class WallRecommendations(Definitions):
|
||||||
|
|
||||||
lowest_selected_u_value = None
|
lowest_selected_u_value = None
|
||||||
recommendations = []
|
recommendations = []
|
||||||
|
|
||||||
|
iwi_non_invasive_recommendations = next(
|
||||||
|
(r for r in self.property.non_invasive_recommendations if r["type"] == "internal_wall_insulation"), {}
|
||||||
|
)
|
||||||
|
ewi_non_invasive_recommendations = next(
|
||||||
|
(r for r in self.property.non_invasive_recommendations if r["type"] == "external_wall_insulation"), {}
|
||||||
|
)
|
||||||
|
if ewi_non_invasive_recommendations:
|
||||||
|
raise NotImplementedError("Implement ewi non-invasive recommendations")
|
||||||
|
|
||||||
for _, insulation_material_group in insulation_materials.groupby("description"):
|
for _, insulation_material_group in insulation_materials.groupby("description"):
|
||||||
|
|
||||||
for _, material in insulation_material_group.iterrows():
|
for _, material in insulation_material_group.iterrows():
|
||||||
|
|
@ -486,6 +496,15 @@ class WallRecommendations(Definitions):
|
||||||
)
|
)
|
||||||
|
|
||||||
if material["type"] == "internal_wall_insulation":
|
if material["type"] == "internal_wall_insulation":
|
||||||
|
|
||||||
|
if iwi_non_invasive_recommendations.get("cost") is not None:
|
||||||
|
raise NotImplementedError(
|
||||||
|
"Not handled passing costs from non-invasive recommendations for iwi"
|
||||||
|
)
|
||||||
|
|
||||||
|
sap_points = iwi_non_invasive_recommendations.get("sap_points", None)
|
||||||
|
survey = iwi_non_invasive_recommendations.get("survey", False)
|
||||||
|
|
||||||
cost_result = self.costs.internal_wall_insulation(
|
cost_result = self.costs.internal_wall_insulation(
|
||||||
wall_area=self.property.insulation_wall_area,
|
wall_area=self.property.insulation_wall_area,
|
||||||
material=material.to_dict(),
|
material=material.to_dict(),
|
||||||
|
|
@ -503,6 +522,10 @@ class WallRecommendations(Definitions):
|
||||||
)
|
)
|
||||||
|
|
||||||
elif material["type"] == "external_wall_insulation":
|
elif material["type"] == "external_wall_insulation":
|
||||||
|
|
||||||
|
sap_points = ewi_non_invasive_recommendations.get("sap_points", None)
|
||||||
|
survey = ewi_non_invasive_recommendations.get("survey", False)
|
||||||
|
|
||||||
cost_result = self.costs.external_wall_insulation(
|
cost_result = self.costs.external_wall_insulation(
|
||||||
wall_area=self.property.insulation_wall_area,
|
wall_area=self.property.insulation_wall_area,
|
||||||
material=material.to_dict(),
|
material=material.to_dict(),
|
||||||
|
|
@ -553,13 +576,14 @@ class WallRecommendations(Definitions):
|
||||||
"starting_u_value": u_value,
|
"starting_u_value": u_value,
|
||||||
"new_u_value": new_u_value,
|
"new_u_value": new_u_value,
|
||||||
"already_installed": already_installed,
|
"already_installed": already_installed,
|
||||||
"sap_points": None,
|
"sap_points": sap_points,
|
||||||
"simulation_config": simulation_config,
|
"simulation_config": simulation_config,
|
||||||
"description_simulation": {
|
"description_simulation": {
|
||||||
"walls-description": new_description,
|
"walls-description": new_description,
|
||||||
"walls-energy-eff": simulation_config["walls_energy_eff_ending"]
|
"walls-energy-eff": simulation_config["walls_energy_eff_ending"]
|
||||||
},
|
},
|
||||||
**cost_result
|
**cost_result,
|
||||||
|
"survey": survey
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue