Adding new heating recommendation test

This commit is contained in:
Khalim Conn-Kowlessar 2024-09-16 13:11:08 +01:00
parent 9b08d49b85
commit c4ab7f5a2c
5 changed files with 49 additions and 26 deletions

View file

@ -767,5 +767,7 @@ def app():
on="row_id",
how="left"
)
archetyping_data.to_csv("/Users/khalimconn-kowlessar/Documents/hestia/Customers/AIHA/archetyping_data.csv",
index=False)
archetyping_data.to_csv(
"/Users/khalimconn-kowlessar/Documents/hestia/Customers/AIHA/archetyping_data.csv",
index=False
)

View file

@ -121,7 +121,7 @@ class HeatingControlRecommender:
self.recommendation.append(
{
"description": "upgrade heating controls to High Heat Retention Storage Heater Controls",
"description": "Upgrade heating controls to High Heat Retention Storage Heater Controls",
**self.costs.celect_type_controls(),
"simulation_config": simulation_config,
"description_simulation": description_simulation
@ -192,7 +192,7 @@ class HeatingControlRecommender:
has_trvs=has_trvs
)
description = "upgrade heating controls to Room thermostat, programmer and TRVs"
description = "Upgrade heating controls to Room thermostat, programmer and TRVs"
already_installed = "heating_control" in self.property.already_installed
if already_installed:

View file

@ -137,8 +137,6 @@ class HeatingRecommender:
if hhr_valid:
# Recommend high heat retention storage heaters
# TODO: We need to allow for the possibility that the property aleady has storage heaters, but just
# needs the controls
self.recommend_hhr_storage_heaters(phase=phase, system_change=True, heating_controls_only=False)
gas_boiler_suitable, has_boiler = self.is_boiler_upgrade_suitable(
@ -474,12 +472,8 @@ class HeatingRecommender:
}
controls_description = controls_recommendations[0]['description']
# Make the first letter of the description lowercase
controls_description = (
controls_description[0].lower() + controls_description[1:]
)
recommendation_description = f"{description} and {controls_description}"
recommendation_description = f"{description} {controls_description}"
already_installed = "heating_controls" in self.property.already_installed
if already_installed:
@ -555,6 +549,14 @@ class HeatingRecommender:
We will recommend upgrading to a high heat retention storage system, if the current system is not already
high heat retention storage
If the property currently has electric storage heaters, with automatic charge control, we allow for a high
heat retention stoarage heaters recommendation. This is because the automatic charge control is not the same
as the high heat retention storage heaters. HHR storage heaters aren't guaranteed to be more efficient but
we can at least present the option to the end user and they can decide if they want to go ahead with the
recommendation or not. There's a useful guide by quidos, describing the differences between some of the
different storage heater options:
https://www.quidos.co.uk/wp-content/uploads/2017/04/Technical-Bulletin-010417-Storage-Heatersv2.pdf
:param phase: The phase of the recommendation
:param system_change: Indicates if we are recommending a different type of heating system, compared to the
current system
@ -600,7 +602,15 @@ class HeatingRecommender:
costs = self.costs.high_heat_electric_storage_heaters(
number_heated_rooms=number_heated_rooms
)
description = "Install high heat retention electric storage heaters"
description = "Install high heat retention electric storage heaters."
# We check the existing heating system and controls
if (
self.property.main_heating["has_electric_storage_heaters"] and
self.property.main_heating_controls["charging_system"] in ["automatic charge control"]
):
description += (" The current electric heaters may be retrofit with high heat retention storage controls"
" however this is dependent on the existing system and may not be possible.")
heating_description_simulation = {
"mainheat-description": new_heating_description,

View file

@ -144,11 +144,20 @@ testing_examples = [
'tenure': 'owner-occupied', 'fixed-lighting-outlets-count': 6.0, 'low-energy-fixed-light-count': 4.0,
'uprn': 100090311351.0, 'uprn-source': 'Address Matched', 'property-type_y': None, 'built-form_y': None,
},
"heating_recommendation_descriptions": [],
"heating_recommendation_descriptions": [
'Install high heat retention electric storage heaters. The current electric heaters may be retrofit with '
'high heat retention storage controls however this is dependent on the existing system and may not be '
'possible. Upgrade heating controls to High Heat Retention Storage Heater Controls',
'Install an air source heat pump, and upgrade heating controls to Smart Thermostats, room sensors and '
'smart radiator valves (time & temperature zone control). The cost includes the £7500 boiler upgrade '
'scheme grant'
],
"heating_controls_recommendation_descriptions": [],
"notes": "This test has electric storage heaters with automatic charge control - this case should be researched"
"and checked that a high heat retention storage recommendation is actually sensible. If it's not, "
"we should adjust accordingly or perhaps have just a control recommendation"
"notes": "This test has electric storage heaters with automatic charge control - we recommend hhr storage"
"heaters in this case, but because there are already electic storage heaters in place, we "
"note, in the description of the recommendation, that this upgrade may be possible by retrofitting"
"the existing storage heaters, but that dependes on the model of the existing heaters"
},
{
"epc": {
@ -188,9 +197,18 @@ testing_examples = [
'tenure': 'owner-occupied', 'fixed-lighting-outlets-count': None, 'low-energy-fixed-light-count': None,
'uprn': 100021560521.0, 'uprn-source': 'Address Matched',
},
"heating_recommendation_descriptions": [],
"heating_controls_recommendation_descriptions": [],
"notes": ""
"heating_recommendation_descriptions": [
'Upgrade to a new condensing boiler'
],
"heating_controls_recommendation_descriptions": [
'Upgrade heating controls to Room thermostat, programmer and TRVs',
'Upgrade heating controls to Smart Thermostats, room sensors and smart radiator valves (time & '
'temperature zone control)'
],
"notes": "Because of this property is a maisonette, which already has a boiler (but an inefficient one due to "
"the current water heating efficiency) the only recommendation we expect is for "
"a boiler upgrade. The heating controls are programmer and thermostat, so we can also recommend"
"better heating controls"
},
{
"epc": {

View file

@ -54,13 +54,6 @@ class TestHeatingRecommendations:
:return:
"""
if test_case["epc"]["uprn"] == 100090311351:
raise Exception(
"This test has electric storage heaters with automatic charge control - this case should be researched"
"and checked that a high heat retention storage recommendation is actually sensible. If it's not, "
"we should adjust accordingly or perhaps have just a control recommendation"
)
if test_case["epc"]["uprn"] == 100021560521:
raise Exception("Finish this test - could do so while on the train")