diff --git a/backend/engine/engine.py b/backend/engine/engine.py index 18b93ec7..50ed0772 100644 --- a/backend/engine/engine.py +++ b/backend/engine/engine.py @@ -1118,7 +1118,7 @@ async def model_engine(body: PlanTriggerRequest): p=p, input_measures=input_measures, budget=body.budget, - target_gain=gain - already_installed_sap, + target_gain=gain, enforce_heat_pump_insulation=True, enforce_fabric_first=body.enforce_fabric_first, already_installed_sap=already_installed_sap, # To be passed to output diff --git a/etl/customers/peabody/Nov 2025 Consulting Project/n_fixing_already_installed_bug.py b/etl/customers/peabody/Nov 2025 Consulting Project/n_fixing_already_installed_bug.py index 5a3aad3f..4bd11a1b 100644 --- a/etl/customers/peabody/Nov 2025 Consulting Project/n_fixing_already_installed_bug.py +++ b/etl/customers/peabody/Nov 2025 Consulting Project/n_fixing_already_installed_bug.py @@ -11,14 +11,13 @@ from etl.customers.cambridge.surveys import current_epc with db_session() as session: # We need installed measures, where the measure type is ewi or iwi installed_measures = session.query(InstalledMeasure).filter( - InstalledMeasure.measure_type.in_(["external_wall_insulation", "internal_wall_insulation"]) + InstalledMeasure.measure_type.in_(["cavity_wall_insulation"]) ).all() # Get the uprns installed_uprns = [x.uprn for x in installed_measures] installed_uprns = list(set(installed_uprns)) -# This is 21425 properties. # We then create a portfolio of properties we need to re-run import pandas as pd @@ -33,7 +32,7 @@ needing_retry = sal[sal["epc_os_uprn"].isin(installed_uprns)] # Store needing_retry.to_excel( "/Users/khalimconn-kowlessar/Documents/hestia/Customers/Peabody/Nov 2025 Consulting Project/Final " - "SAL/properties_needing_retry_20260115.xlsx", + "SAL/properties_needing_retry_20260115 - cavity wall insulation.xlsx", sheet_name="Standardised Asset List", index=False )