handling property with u-values in survey which is not a new dwelling

This commit is contained in:
Khalim Conn-Kowlessar 2024-09-24 15:43:33 +01:00
parent e6fc34741c
commit 4a216fb423
4 changed files with 12 additions and 11 deletions

View file

@ -82,6 +82,7 @@ def app():
db_engine = create_engine(db_string, pool_size=5, max_overflow=5)
cwi_costs = pd.read_excel(DATA_DIRECTORY, sheet_name="cavity_wall_insulation", header=0)
ventilation_costs = pd.read_excel(DATA_DIRECTORY, sheet_name="Ventilation", header=0)
loft_insulation_costs = pd.read_excel(DATA_DIRECTORY, sheet_name="loft_insulation", header=0)
iwi_costs = pd.read_excel(DATA_DIRECTORY, sheet_name="internal_wall_insulation", header=0)
suspended_floor_costs = pd.read_excel(DATA_DIRECTORY, sheet_name="suspended_floor_insulation", header=0)
@ -95,6 +96,7 @@ def app():
costs = pd.concat(
[
cwi_costs,
ventilation_costs,
loft_insulation_costs,
iwi_costs,
suspended_floor_costs,

View file

@ -1034,17 +1034,16 @@ class HeatingRecommender:
# Overwrite the existing boiler recommendation
self.heating_recommendations.extend(combined_recommendations)
else:
# We increment the recommendation phase, since the heating controls are separate from the boiler upgrade
# but we'll only upgrade if we have a heating recommendation
has_heating_recommendation = any(
rec["type"] == "heating" for rec in self.heating_recommendations
)
if has_heating_recommendation:
recommendation_phase += 1
# The heating controls recommendation is distrinct from the boiler upgrade recommendation
# We insert phase into the recommendations for heating controls
# We consider a heating control upgrade as a measure which occures in the same phase as a boiler upgrade
# Namely, we have the following options within this phase
# 1) Boiler + heating controls
# 2) Boiler only
# 3) Heating controls only
# But they are options that are not mutually exclusive
# So, we actually set heating controls as a heating recommendation
for recommendation in controls_recommender.recommendation:
recommendation["phase"] = recommendation_phase
# recommendation["type"] = "heating"
self.heating_control_recommendations.extend(controls_recommender.recommendation)

View file

@ -132,7 +132,7 @@ class RoofRecommendations:
# The Roof is already compliant
return
if self.property.data["transaction-type"] == "new dwelling":
if self.property.data["transaction-type"] in ["new dwelling", "not sale or rental"]:
return
raise NotImplementedError("Implement me")

View file

@ -52,7 +52,7 @@ class VentilationRecommendations(Definitions):
already_installed = "cavity_wall_insulation" in self.property.already_installed
estimated_cost = n_units * part[0]["cost"] if not already_installed else 0
estimated_cost = n_units * part[0]["total_cost"] if not already_installed else 0
labour_hours = 4 * n_units if not already_installed else 0
labour_days = 4 * n_units / 8.0 if not already_installed else 0