mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
fixing the case where we recommend a boiler and new heating controls, as well as an improved electrical system
This commit is contained in:
parent
6942414951
commit
014d51c060
1 changed files with 18 additions and 18 deletions
|
|
@ -278,6 +278,7 @@ class HeatingRecommender:
|
|||
# We now recommend boiler upgrades, if applicable
|
||||
simulation_config = {}
|
||||
boiler_costs = {}
|
||||
boiler_recommendation = {}
|
||||
if self.property.data["mainheat-energy-eff"] in ["Very Poor", "Poor", "Average"]:
|
||||
boiler_size = self.estimate_boiler_size(
|
||||
property_type=self.property.data["property-type"],
|
||||
|
|
@ -290,10 +291,12 @@ class HeatingRecommender:
|
|||
# We recommend a combi boiler under the following conditions
|
||||
# 1) If there are 4 or fewer rooms (we don't use heqted rooms because none of the rooms could be
|
||||
# heated if there is no existing heating system).
|
||||
# 2) There is more than 1 bathroom
|
||||
# 2) There 1 or fewer bathrooms
|
||||
# Otherwise, we recommend a gas condensing boiler, which will server a larger property, that has multiple
|
||||
# bathrooms
|
||||
is_combi = (
|
||||
(self.property.data["number-heated-rooms"] <= 4) or
|
||||
(self.property.n_bathrooms not in [None, 0, 1])
|
||||
(self.property.n_bathrooms in [None, 0, 1])
|
||||
)
|
||||
if is_combi:
|
||||
description = "Upgrade to a new combi boiler"
|
||||
|
|
@ -328,21 +331,19 @@ class HeatingRecommender:
|
|||
|
||||
boiler_costs = self.costs.low_carbon_boiler(is_combi=is_combi, size=f"{boiler_size}kw")
|
||||
|
||||
self.recommendations.append(
|
||||
{
|
||||
"phase": recommendation_phase,
|
||||
"parts": [
|
||||
# TODO
|
||||
],
|
||||
"type": "heating",
|
||||
"description": description,
|
||||
"starting_u_value": None,
|
||||
"new_u_value": None,
|
||||
"sap_points": None,
|
||||
"simulation_config": simulation_config,
|
||||
**boiler_costs
|
||||
}
|
||||
)
|
||||
boiler_recommendation = {
|
||||
"phase": recommendation_phase,
|
||||
"parts": [
|
||||
# TODO
|
||||
],
|
||||
"type": "heating",
|
||||
"description": description,
|
||||
"starting_u_value": None,
|
||||
"new_u_value": None,
|
||||
"sap_points": None,
|
||||
"simulation_config": simulation_config,
|
||||
**boiler_costs
|
||||
}
|
||||
|
||||
# We recommend the heating controls
|
||||
# If the property did not previously have a boiler, we combine
|
||||
|
|
@ -355,7 +356,6 @@ class HeatingRecommender:
|
|||
|
||||
if system_change:
|
||||
# We combine the heating and controls recommendations, in the case of a system change
|
||||
boiler_recommendation = self.recommendations[0].copy()
|
||||
combined_recommendations = []
|
||||
for controls_recommendation in controls_recommender.recommendation:
|
||||
combined_recommendation = self.combine_heating_and_controls(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue