mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-07-12 13:29:04 +00:00
Updated HHR storage recommendation for dual storage
This commit is contained in:
parent
08b8124d0c
commit
83d56d9bc6
2 changed files with 23 additions and 1 deletions
|
|
@ -86,6 +86,9 @@ class PlanTriggerRequest(BaseModel):
|
||||||
# exists in the portfolio, it will be ignored
|
# exists in the portfolio, it will be ignored
|
||||||
multi_plan: Optional[bool] = False
|
multi_plan: Optional[bool] = False
|
||||||
|
|
||||||
|
# if False, allows optimisation to be switched off
|
||||||
|
optimise: Optional[bool] = False
|
||||||
|
|
||||||
_allowed_goals = {"Increasing EPC"}
|
_allowed_goals = {"Increasing EPC"}
|
||||||
|
|
||||||
_allowed_housing_types = {"Social", "Private"}
|
_allowed_housing_types = {"Social", "Private"}
|
||||||
|
|
|
||||||
|
|
@ -812,20 +812,37 @@ class HeatingRecommender:
|
||||||
new_heating_description = self.DUAL_HEATING_DESCRIPTIONS[
|
new_heating_description = self.DUAL_HEATING_DESCRIPTIONS[
|
||||||
self.property.main_heating["clean_description"]
|
self.property.main_heating["clean_description"]
|
||||||
]["hhr"]["mainheating_description"]
|
]["hhr"]["mainheating_description"]
|
||||||
|
new_hot_water_description = self.property.hotwater["clean_description"] # We keep the hot water system
|
||||||
else:
|
else:
|
||||||
new_heating_description = "Electric storage heaters"
|
new_heating_description = "Electric storage heaters"
|
||||||
|
new_hot_water_description = "Electric immersion, off-peak"
|
||||||
|
|
||||||
# Set up artefacts, suitable for the simulation and regardless of controls
|
# Set up artefacts, suitable for the simulation and regardless of controls
|
||||||
heating_ending_config = MainHeatAttributes(new_heating_description).process()
|
heating_ending_config = MainHeatAttributes(new_heating_description).process()
|
||||||
heating_simulation_config = check_simulation_difference(
|
heating_simulation_config = check_simulation_difference(
|
||||||
new_config=heating_ending_config, old_config=self.property.main_heating
|
new_config=heating_ending_config, old_config=self.property.main_heating
|
||||||
)
|
)
|
||||||
|
|
||||||
|
hot_water_end_config = HotWaterAttributes(new_hot_water_description).process()
|
||||||
|
hot_water_simulation_config = check_simulation_difference(
|
||||||
|
new_config=hot_water_end_config, old_config=self.property.hotwater
|
||||||
|
)
|
||||||
|
|
||||||
|
heating_simulation_config = {
|
||||||
|
**heating_simulation_config,
|
||||||
|
**hot_water_simulation_config
|
||||||
|
}
|
||||||
# This upgrade will only take the heating system to average energy efficiency
|
# This upgrade will only take the heating system to average energy efficiency
|
||||||
if self.property.data["mainheat-energy-eff"] in ["Very Poor", "Poor"]:
|
if self.property.data["mainheat-energy-eff"] in ["Very Poor", "Poor"] and not self.dual_heating:
|
||||||
heating_simulation_config["mainheat_energy_eff_ending"] = "Average"
|
heating_simulation_config["mainheat_energy_eff_ending"] = "Average"
|
||||||
else:
|
else:
|
||||||
heating_simulation_config["mainheat_energy_eff_ending"] = self.property.data["mainheat-energy-eff"]
|
heating_simulation_config["mainheat_energy_eff_ending"] = self.property.data["mainheat-energy-eff"]
|
||||||
|
|
||||||
|
if self.property.data["hot-water-energy-eff"] in ["Very Poor", "Poor"]:
|
||||||
|
heating_simulation_config["hot_water_energy_eff_ending"] = "Average"
|
||||||
|
else:
|
||||||
|
heating_simulation_config["hot_water_energy_eff_ending"] = self.property.data["hot-water-energy-eff"]
|
||||||
|
|
||||||
# If the property is off-gas and has no heating system in place, the number of heated rooms will actually
|
# If the property is off-gas and has no heating system in place, the number of heated rooms will actually
|
||||||
# be 0, so we use the number of rooms as the figure
|
# be 0, so we use the number of rooms as the figure
|
||||||
number_heated_rooms = (
|
number_heated_rooms = (
|
||||||
|
|
@ -863,6 +880,8 @@ class HeatingRecommender:
|
||||||
heating_description_simulation = {
|
heating_description_simulation = {
|
||||||
"mainheat-description": new_heating_description,
|
"mainheat-description": new_heating_description,
|
||||||
"mainheat-energy-eff": heating_simulation_config["mainheat_energy_eff_ending"],
|
"mainheat-energy-eff": heating_simulation_config["mainheat_energy_eff_ending"],
|
||||||
|
"hotwater-description": new_hot_water_description,
|
||||||
|
"hot-water-energy-eff": heating_simulation_config["hot_water_energy_eff_ending"]
|
||||||
}
|
}
|
||||||
|
|
||||||
recommendations = self.combine_heating_and_controls(
|
recommendations = self.combine_heating_and_controls(
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue