mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
fixed edge case where we have an appliance heating system and are unable to map a fuel type for hot water
This commit is contained in:
parent
e8f99b6c14
commit
981e0d5c93
4 changed files with 22 additions and 5 deletions
|
|
@ -1168,7 +1168,8 @@ class Property:
|
|||
'heat pump': 'Electricity',
|
||||
'solid fuel boiler': 'Solid Fuel',
|
||||
'solid fuel range cooker': 'Solid Fuel',
|
||||
'room heaters': 'Varied' # Could be any fuel, further specifics needed based on context
|
||||
'room heaters': 'Varied', # Could be any fuel, further specifics needed based on context
|
||||
"single-point gas": "Natural Gas"
|
||||
}
|
||||
|
||||
# Define a mapping from system types to general categories or modifications of fuel types
|
||||
|
|
@ -1179,6 +1180,11 @@ class Property:
|
|||
'community scheme': 'Community Scheme'
|
||||
}
|
||||
|
||||
hotwater_appliance_to_fuel = {
|
||||
'gas range cooker': 'Natural Gas',
|
||||
'oil range cooker': 'Oil'
|
||||
}
|
||||
|
||||
self.heating_energy_source = list({
|
||||
fuel for key, fuel in heating_fuel_mapping.items() if self.main_heating.get(key, False)
|
||||
})
|
||||
|
|
@ -1216,8 +1222,7 @@ class Property:
|
|||
if self.hotwater["extra_features"] == "plus solar":
|
||||
self.hot_water_energy_source = self.heating_energy_source + " + Solar Thermal"
|
||||
return
|
||||
|
||||
else:
|
||||
elif self.hotwater["system_type"] is not None:
|
||||
fuel = system_type_modification[self.hotwater["system_type"]]
|
||||
|
||||
if self.hotwater["extra_features"] == "plus solar":
|
||||
|
|
@ -1232,6 +1237,8 @@ class Property:
|
|||
self.hot_water_energy_source = assumptions.DESCRIPTIONS_TO_FUEL_TYPES[secondary_heating]["fuel"]
|
||||
else:
|
||||
raise Exception("Investiage me")
|
||||
else:
|
||||
self.hot_water_energy_source = hotwater_appliance_to_fuel[self.hotwater["appliance"]]
|
||||
|
||||
def is_ashp_valid(self, measures):
|
||||
|
||||
|
|
|
|||
|
|
@ -89,7 +89,8 @@ costs_by_floor_area = costs_by_floor_area.groupby("current-energy-efficiency")[
|
|||
["lighting-cost-current_scaled", "heating-cost-current_scaled", "hot-water-cost-current_scaled"]
|
||||
].mean().reset_index()
|
||||
|
||||
sample_epc_data = epc_data.drop_duplicates("UPRN").sample(1000).reset_index(drop=True)
|
||||
sample_epc_data = epc_data[pd.to_datetime(epc_data["LODGEMENT_DATE"]) >= "2015-01-01"].drop_duplicates("UPRN").sample(
|
||||
1000).reset_index(drop=True)
|
||||
|
||||
# Load the input properties
|
||||
input_properties = []
|
||||
|
|
@ -173,6 +174,8 @@ for p in input_properties:
|
|||
p.set_features(cleaned=cleaned, kwh_client=kwh_client, kwh_predictions=mocked_kwh_predictions) for p in
|
||||
input_properties
|
||||
]
|
||||
for p in input_properties:
|
||||
p.set_features(cleaned=cleaned, kwh_client=kwh_client, kwh_predictions=mocked_kwh_predictions)
|
||||
|
||||
# Run the recommendations
|
||||
recommendations = {}
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ class HotWaterAttributes(Definitions):
|
|||
'solid fuel range cooker',
|
||||
'room heaters', # Generic/unspecified category
|
||||
'electric multipoint',
|
||||
'single-point gas',
|
||||
]
|
||||
|
||||
# SYSTEM_TYPES refer to the larger system within which the heater operates.
|
||||
|
|
@ -29,6 +30,7 @@ class HotWaterAttributes(Definitions):
|
|||
# The hot water is provided by a secondary (or supplementary) heating system in the building
|
||||
'from second main heating system', # Same as 'from secondary system'
|
||||
'community scheme', # The hot water is provided by a community heating system
|
||||
"water heater",
|
||||
]
|
||||
|
||||
# THERMOSTAT_CHARACTERISTICS refer to features related to temperature control in the system.
|
||||
|
|
|
|||
|
|
@ -222,6 +222,11 @@ hotwater_cases = [
|
|||
{'original_description': 'Electric multipoint', 'heater_type': 'electric multipoint', 'system_type': None,
|
||||
'thermostat_characteristics': None,
|
||||
'heating_scope': None, 'energy_recovery': None, 'tariff_type': None, 'extra_features': None, 'chp_systems': None,
|
||||
'distribution_system': None, 'no_system_present': None, 'appliance': None, 'assumed': False}
|
||||
'distribution_system': None, 'no_system_present': None, 'appliance': None, 'assumed': False},
|
||||
{'original_description': 'Single-point gas water heater, standard tariff',
|
||||
'heater_type': 'single-point gas', 'system_type': "water heater", 'thermostat_characteristics': None,
|
||||
'heating_scope': None, 'energy_recovery': None, 'tariff_type': 'standard tariff', 'extra_features': None,
|
||||
'chp_systems': None, 'distribution_system': None, 'no_system_present': None, 'appliance': None
|
||||
}
|
||||
|
||||
]
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue