mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-30 13:10:47 +00:00
added mixed glazing recommendation
This commit is contained in:
parent
8e8961a89d
commit
607b150070
3 changed files with 65 additions and 3 deletions
|
|
@ -155,6 +155,10 @@ class Recommendations:
|
||||||
property_recommendations.append(self.windows_recommender.recommendation)
|
property_recommendations.append(self.windows_recommender.recommendation)
|
||||||
phase += 1
|
phase += 1
|
||||||
|
|
||||||
|
if "mixed_glazing" in measures:
|
||||||
|
# This is a recommendation that comes exclusively from an energy assessment
|
||||||
|
property_recommendations.append(self.windows_recommender.recommend_mixed_glazing())
|
||||||
|
|
||||||
if "fireplace" in measures:
|
if "fireplace" in measures:
|
||||||
self.fireplace_recommender.recommend(phase=phase)
|
self.fireplace_recommender.recommend(phase=phase)
|
||||||
if self.fireplace_recommender.recommendation:
|
if self.fireplace_recommender.recommendation:
|
||||||
|
|
|
||||||
|
|
@ -98,8 +98,7 @@ class VentilationRecommendations(Definitions):
|
||||||
else trickle_vents_recommendation_config["description"]
|
else trickle_vents_recommendation_config["description"]
|
||||||
)
|
)
|
||||||
|
|
||||||
# We recommend installing two mechanical ventilation systems
|
return [
|
||||||
self.recommendation = [
|
|
||||||
{
|
{
|
||||||
"phase": None,
|
"phase": None,
|
||||||
"parts": [],
|
"parts": [],
|
||||||
|
|
|
||||||
|
|
@ -3,8 +3,9 @@ from typing import List
|
||||||
import numpy as np
|
import numpy as np
|
||||||
|
|
||||||
from backend.Property import Property
|
from backend.Property import Property
|
||||||
|
from etl.epc_clean.epc_attributes.WindowAttributes import WindowAttributes
|
||||||
from recommendations.Costs import Costs
|
from recommendations.Costs import Costs
|
||||||
from recommendations.recommendation_utils import override_costs
|
from recommendations.recommendation_utils import override_costs, check_simulation_difference
|
||||||
|
|
||||||
|
|
||||||
class WindowsRecommendations:
|
class WindowsRecommendations:
|
||||||
|
|
@ -128,3 +129,61 @@ class WindowsRecommendations:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
|
def recommend_mixed_glazing(self):
|
||||||
|
"""
|
||||||
|
This function will recommend mixed glazing to the property. This is a more specific recommendation than
|
||||||
|
the general windows recommendation, but is almost certain to arise from a survey
|
||||||
|
:return:
|
||||||
|
"""
|
||||||
|
|
||||||
|
mixed_glazing_recommendation_config = [
|
||||||
|
r for r in self.property.non_invasive_recommendations if r["type"] == "mixed_glazing"
|
||||||
|
][0]
|
||||||
|
|
||||||
|
description = (
|
||||||
|
"Install a combination of secondary and double glazing to single glazed windows" if
|
||||||
|
not mixed_glazing_recommendation_config.get("description")
|
||||||
|
else mixed_glazing_recommendation_config["description"]
|
||||||
|
)
|
||||||
|
|
||||||
|
windows_ending_config = WindowAttributes("Multiple glazing throughout").process()
|
||||||
|
|
||||||
|
windows_simulation_config = check_simulation_difference(
|
||||||
|
new_config=windows_ending_config, old_config=self.property.windows, prefix="windows_"
|
||||||
|
)
|
||||||
|
|
||||||
|
windows_simulation_config = {
|
||||||
|
**windows_simulation_config,
|
||||||
|
"windows_energy_eff": "Average",
|
||||||
|
"glazed_type_ending": "secondary glazing"
|
||||||
|
}
|
||||||
|
|
||||||
|
return [
|
||||||
|
{
|
||||||
|
"phase": None,
|
||||||
|
"parts": [],
|
||||||
|
"type": "mixed_glazing",
|
||||||
|
"description": description,
|
||||||
|
"starting_u_value": None,
|
||||||
|
"new_u_value": None,
|
||||||
|
"already_installed": False,
|
||||||
|
"sap_points": mixed_glazing_recommendation_config["sap_points"],
|
||||||
|
"heat_demand": None, # We will predict this
|
||||||
|
"kwh_savings": None, # We will predict this
|
||||||
|
"co2_equivalent_savings": None, # We will predict this
|
||||||
|
"energy_cost_savings": None, # We will predict this
|
||||||
|
"total": mixed_glazing_recommendation_config["cost"],
|
||||||
|
# We use a very simple and rough estimate of 4 hours per unit
|
||||||
|
"labour_hours": mixed_glazing_recommendation_config.get("labour_hours", 8),
|
||||||
|
"labour_days": mixed_glazing_recommendation_config.get("labour_days", 1), # Assume 8 hour day
|
||||||
|
"survey": mixed_glazing_recommendation_config["survey"],
|
||||||
|
"simulation_config": windows_simulation_config,
|
||||||
|
"description_simulation": {
|
||||||
|
"multi-glaze-proportion": 100,
|
||||||
|
"windows-energy-eff": "Average",
|
||||||
|
"windows-description": "Multiple glazing throughout",
|
||||||
|
"glazed-type": "secondary glazing",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue