mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
added measure type to heating recommendations
This commit is contained in:
parent
2b992fc9f5
commit
9b6f8c4864
1 changed files with 16 additions and 13 deletions
|
|
@ -220,6 +220,8 @@ class HeatingRecommender:
|
|||
for k in ["total", "subtotal", "vat", "labour_hours", "labour_days"]:
|
||||
combined_rec[k] = rec[k] + rec2[k]
|
||||
|
||||
combined_rec["measure_type"] = "+".join([rec["measure_type"], rec2["measure_type"]])
|
||||
|
||||
combined_recommendations.append(combined_rec)
|
||||
|
||||
self.heating_recommendations.extend(combined_recommendations)
|
||||
|
|
@ -512,10 +514,9 @@ class HeatingRecommender:
|
|||
|
||||
ashp_recommendation = {
|
||||
"phase": phase,
|
||||
"parts": [
|
||||
# TODO
|
||||
],
|
||||
"parts": [],
|
||||
"type": "heating",
|
||||
"measure_type": "air_source_heat_pump",
|
||||
"description": description,
|
||||
"starting_u_value": None,
|
||||
"new_u_value": None,
|
||||
|
|
@ -556,7 +557,8 @@ class HeatingRecommender:
|
|||
phase,
|
||||
heating_controls_only,
|
||||
system_change,
|
||||
system_type
|
||||
system_type,
|
||||
measure_type
|
||||
):
|
||||
"""
|
||||
Given a recommendation for heating controls, and a recommendation for the heating system, we combine the two
|
||||
|
|
@ -572,7 +574,8 @@ class HeatingRecommender:
|
|||
current system. If we have a system change and we have a heat control recommendation, we only recommend
|
||||
both heating and controls together
|
||||
:param system_type: The type of heating system we are recommending
|
||||
:return:
|
||||
:param measure_type: The type of measure we are recommending - more granular than the "type" field, allowing us
|
||||
to distinguish between different types of heating recommendations
|
||||
"""
|
||||
|
||||
# We produce recommendations with & without heating controls
|
||||
|
|
@ -616,10 +619,9 @@ class HeatingRecommender:
|
|||
|
||||
recommendation = {
|
||||
"phase": phase,
|
||||
"parts": [
|
||||
# TODO
|
||||
],
|
||||
"parts": [],
|
||||
"type": "heating",
|
||||
"measure_type": measure_type,
|
||||
"description": recommendation_description,
|
||||
"starting_u_value": None,
|
||||
"new_u_value": None,
|
||||
|
|
@ -799,7 +801,8 @@ class HeatingRecommender:
|
|||
phase=phase,
|
||||
heating_controls_only=heating_controls_only,
|
||||
system_change=system_change,
|
||||
system_type="high_heat_retention_storage_heater"
|
||||
system_type="high_heat_retention_storage_heater",
|
||||
measure_type="high_heat_retention_storage_heater"
|
||||
)
|
||||
if _return:
|
||||
return recommendations
|
||||
|
|
@ -977,10 +980,9 @@ class HeatingRecommender:
|
|||
|
||||
boiler_recommendation = {
|
||||
"phase": recommendation_phase,
|
||||
"parts": [
|
||||
# TODO
|
||||
],
|
||||
"parts": [],
|
||||
"type": "heating",
|
||||
"measure_type": "boiler_upgrade",
|
||||
"description": description,
|
||||
"starting_u_value": None,
|
||||
"new_u_value": None,
|
||||
|
|
@ -1027,7 +1029,8 @@ class HeatingRecommender:
|
|||
phase=recommendation_phase,
|
||||
heating_controls_only=False,
|
||||
system_change=True,
|
||||
system_type="boiler_upgrade"
|
||||
system_type="boiler_upgrade",
|
||||
measure_type="boiler_upgrade",
|
||||
)
|
||||
combined_recommendations.extend(combined_recommendation)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue