diff --git a/backend/Property.py b/backend/Property.py index 584f1b23..e0d00427 100644 --- a/backend/Property.py +++ b/backend/Property.py @@ -1211,6 +1211,11 @@ class Property: self.hot_water_energy_source = heater_type_to_fuel[self.hotwater["heater_type"]] else: fuel = system_type_modification[self.hotwater["system_type"]] + + if self.hotwater["extra_features"] == "plus solar": + self.hot_water_energy_source = self.heating_energy_source + " + Solar Thermal" + return + if fuel in ['Main System', "Community Scheme"]: self.hot_water_energy_source = self.heating_energy_source else: diff --git a/backend/ml_models/AnnualBillSavings.py b/backend/ml_models/AnnualBillSavings.py index 50945874..e41dd01c 100644 --- a/backend/ml_models/AnnualBillSavings.py +++ b/backend/ml_models/AnnualBillSavings.py @@ -274,7 +274,7 @@ class AnnualBillSavings: return (kwh / cop) * cost_per_kwh - if fuel == "Wood": + if fuel == "Wood Logs": price_data = cls.FUEL_DATA[cls.FUEL_DATA["Fuel"] == "Pellets (Bagged)"].squeeze() cost_per_kwh = cls.cost_per_kwh( price_data["Price (p)"], price_data["Energy Content, Net Calorific value (kWh/unit)"] diff --git a/recommendations/Recommendations.py b/recommendations/Recommendations.py index 93abdcae..636a43e1 100644 --- a/recommendations/Recommendations.py +++ b/recommendations/Recommendations.py @@ -28,7 +28,10 @@ DESCRIPTIONS_TO_FUEL_TYPES = { "Electric immersion, standard tariff": {"fuel": 'Electricity', "cop": 1}, "Portable electric heaters assumed for most rooms": {"fuel": 'Electricity', "cop": 1}, "Boiler and radiators, LPG": {"fuel": 'LPG', "cop": 0.9}, - "Room heaters, dual fuel (mineral and wood)": {"fuel": 'Wood', "cop": 1}, + "Room heaters, dual fuel (mineral and wood)": {"fuel": 'Wood Logs', "cop": 1}, + "Room heaters, mains gas": {"fuel": 'Natural Gas', "cop": 0.9}, + "Warm air, mains gas": {"fuel": 'Natural Gas', "cop": 0.9}, + "Boiler, mains gas": {"fuel": 'Natural Gas', "cop": 0.9}, } STARTING_DUMMY_ID_VALUE = -9999 @@ -518,12 +521,21 @@ class Recommendations: mapped = DESCRIPTIONS_TO_FUEL_TYPES[heating_description] heating_fuel = mapped["fuel"] - if hotwater_description in ["From main system", "From main system, no cylinder thermostat"]: + if hotwater_description in [ + "From main system", "From main system, no cylinder thermostat", + ]: return { "heating_fuel_type": heating_fuel, "hotwater_fuel_type": heating_fuel, "heating_cop": mapped["cop"], "hotwater_cop": mapped["cop"] } + if hotwater_description == "From main system, plus solar": + # The fuel is + return { + "heating_fuel_type": heating_fuel, "hotwater_fuel_type": heating_fuel + " + Solar Thermal", + "heating_cop": mapped["cop"], "hotwater_cop": 1 + } + mapped_hotwater = DESCRIPTIONS_TO_FUEL_TYPES[hotwater_description] return {