Added non-intrusive rec to leds

This commit is contained in:
Khalim Conn-Kowlessar 2024-09-05 15:18:17 +01:00
parent 607b150070
commit 304e19fca4
3 changed files with 20 additions and 6 deletions

View file

@ -1279,9 +1279,11 @@ class Property:
"""
exclusions = [] if exclusions is None else exclusions
if "air_source_heat_pump" in exclusions:
return self.current_energy_consumption
# If the property currently has an ASHP, we don't gain from any efficiency improvements
if not self.is_ashp_valid(exclusions=exclusions):
if not self.is_ashp_valid(measures=["air_source_heat_pump"]):
return self.current_energy_consumption
# If the property currently has an electric boiler, it will still benefit from the ASHP efficiency gain

View file

@ -66,6 +66,11 @@ class LightingRecommendations:
if self.property.lighting["low_energy_proportion"] == 100:
return
leds_recommendation_config = next(
(r for r in self.property.non_invasive_recommendations if r["type"] == "low_energy_lighting"),
{}
)
number_lighting_outlets = self.property.number_lighting_outlets
# Number non lel outlets
@ -79,6 +84,9 @@ class LightingRecommendations:
return
# Get the cost of the fittings
if leds_recommendation_config.get("cost"):
raise NotImplementedError("Costs from for low energy lighting have not been implemented")
cost_result = self.costs.low_energy_lighting(
number_of_lights=number_non_lel_outlets,
number_current_lel_lights=number_lighting_outlets - number_non_lel_outlets,
@ -97,6 +105,12 @@ class LightingRecommendations:
cost_result = override_costs(cost_result)
description = "Low energy lighting has already been installed, no further action required"
if leds_recommendation_config.get("sap_points") is not None:
# This could be zero points
sap_points = leds_recommendation_config["sap_points"]
else:
sap_points = round(2 * (number_non_lel_outlets / number_lighting_outlets), 2)
self.recommendation = [
{
"phase": phase,
@ -108,13 +122,14 @@ class LightingRecommendations:
"already_installed": already_installed,
# 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),
"sap_points": sap_points,
"kwh_savings": heat_demand_change,
"co2_equivalent_savings": carbon_change,
"description_simulation": {
"lighting-energy-eff": "Very Good",
"lighting-description": "Low energy lighting in all fixed outlets",
},
**cost_result
**cost_result,
"survey": leds_recommendation_config.get("survey", False)
}
]

View file

@ -73,9 +73,6 @@ class Recommendations:
Determines the set of measures to be included in recommendations
"""
if self.property_instance.non_invasive_recommendations:
raise Exception("IMPLEMENT ME")
# Generally, inclusions is a global option and will overrule specific property non-invasive recommendations.
# This is done so that we can use inclusions to specify scenarios.