mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
Added overrides
This commit is contained in:
parent
b052c9925f
commit
1ee115fa7e
4 changed files with 34 additions and 2 deletions
|
|
@ -1,5 +1,6 @@
|
|||
from backend.Property import Property
|
||||
from recommendations.Costs import Costs
|
||||
from recommendations.recommendation_utils import override_costs
|
||||
|
||||
|
||||
class HotwaterRecommendations:
|
||||
|
|
@ -41,6 +42,13 @@ class HotwaterRecommendations:
|
|||
|
||||
recommendation_cost = self.costs.hot_water_tank_insulation()
|
||||
|
||||
is_override = "hot_water_tank_insulation" in self.property.override
|
||||
if is_override:
|
||||
recommendation_cost = override_costs(recommendation_cost)
|
||||
description = "Insulation tank has already been insulated, no further action required"
|
||||
else:
|
||||
description = "Insulate hot water tank"
|
||||
|
||||
self.recommendations.append(
|
||||
{
|
||||
"phase": phase,
|
||||
|
|
@ -48,10 +56,11 @@ class HotwaterRecommendations:
|
|||
# TODO
|
||||
],
|
||||
"type": "hot_water_tank_insulation",
|
||||
"description": "Insulate the hot water tank with an insulation jacket",
|
||||
"description": description,
|
||||
"starting_u_value": None,
|
||||
"new_u_value": None,
|
||||
"sap_points": None,
|
||||
"is_override": is_override,
|
||||
**recommendation_cost,
|
||||
"simulation_config": {"hot_water_energy_eff_ending": "Average"}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
from backend.Property import Property
|
||||
from typing import List
|
||||
from recommendations.Costs import Costs
|
||||
from recommendations.recommendation_utils import override_costs
|
||||
|
||||
|
||||
class LightingRecommendations:
|
||||
|
|
@ -91,6 +92,11 @@ class LightingRecommendations:
|
|||
|
||||
heat_demand_change, carbon_change = self.estimate_lighting_impact(number_non_lel_outlets)
|
||||
|
||||
is_override = "low_energy_lighting" in self.property.override
|
||||
if is_override:
|
||||
cost_result = override_costs(cost_result)
|
||||
description = "Low energy lighting has already been installed, no further action required"
|
||||
|
||||
self.recommendation = [
|
||||
{
|
||||
"phase": phase,
|
||||
|
|
@ -99,6 +105,7 @@ class LightingRecommendations:
|
|||
"description": description,
|
||||
"starting_u_value": None,
|
||||
"new_u_value": None,
|
||||
"is_override": is_override,
|
||||
# For SAP points, we use the fact that lighting is usually worth 2 points and we scale this to
|
||||
# the proportion of lights that will be set to low energy
|
||||
"sap_points": round(2 * (number_non_lel_outlets / number_lighting_outlets), 2),
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
from recommendations.Costs import Costs
|
||||
from recommendations.recommendation_utils import override_costs
|
||||
from backend.Property import Property
|
||||
|
||||
|
||||
|
|
@ -38,15 +39,24 @@ class SecondaryHeating:
|
|||
n_rooms = 0
|
||||
|
||||
costs = self.costs.heater_removal(n_rooms=n_rooms)
|
||||
|
||||
is_override = "secondary_heating" in self.property.override
|
||||
if is_override:
|
||||
costs = override_costs(costs)
|
||||
description = "Secondary heating system has already been removed, no further action required"
|
||||
else:
|
||||
description = "Remove the secondary heating system"
|
||||
|
||||
self.recommendation.append(
|
||||
{
|
||||
"phase": phase,
|
||||
"parts": [],
|
||||
"type": "secondary_heating",
|
||||
"description": "Remove the secondary heating system",
|
||||
"description": description,
|
||||
"starting_u_value": None,
|
||||
"new_u_value": None,
|
||||
"sap_points": None,
|
||||
"is_override": is_override,
|
||||
**costs,
|
||||
"simulation_config": {
|
||||
"secondheat_description_ending": "None"
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
import numpy as np
|
||||
from recommendations.Costs import Costs
|
||||
from recommendations.recommendation_utils import override_costs
|
||||
|
||||
|
||||
class SolarPvRecommendations:
|
||||
|
|
@ -110,6 +111,10 @@ class SolarPvRecommendations:
|
|||
description = (f"Install a {kw} kilowatt-peak (kWp) solar photovoltaic (PV) p"
|
||||
f"anel system on {round(roof_coverage_percent)}% the roof.")
|
||||
|
||||
is_override = "solar_pv" in self.property.override
|
||||
if is_override:
|
||||
cost_result = override_costs(cost_result)
|
||||
|
||||
self.recommendation.append(
|
||||
{
|
||||
"phase": phase,
|
||||
|
|
@ -119,6 +124,7 @@ class SolarPvRecommendations:
|
|||
"starting_u_value": None,
|
||||
"new_u_value": None,
|
||||
"sap_points": None,
|
||||
"is_override": is_override,
|
||||
**cost_result,
|
||||
# This is required for simulating the SAP impact. solar_pv_percentage is between 0 & 1 so we scale
|
||||
# back up here
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue