mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
removing bug
This commit is contained in:
parent
5f2bc596ca
commit
8ad2c002fd
2 changed files with 3 additions and 4 deletions
|
|
@ -1118,7 +1118,7 @@ async def model_engine(body: PlanTriggerRequest):
|
||||||
p=p,
|
p=p,
|
||||||
input_measures=input_measures,
|
input_measures=input_measures,
|
||||||
budget=body.budget,
|
budget=body.budget,
|
||||||
target_gain=gain - already_installed_sap,
|
target_gain=gain,
|
||||||
enforce_heat_pump_insulation=True,
|
enforce_heat_pump_insulation=True,
|
||||||
enforce_fabric_first=body.enforce_fabric_first,
|
enforce_fabric_first=body.enforce_fabric_first,
|
||||||
already_installed_sap=already_installed_sap, # To be passed to output
|
already_installed_sap=already_installed_sap, # To be passed to output
|
||||||
|
|
|
||||||
|
|
@ -11,14 +11,13 @@ from etl.customers.cambridge.surveys import current_epc
|
||||||
with db_session() as session:
|
with db_session() as session:
|
||||||
# We need installed measures, where the measure type is ewi or iwi
|
# We need installed measures, where the measure type is ewi or iwi
|
||||||
installed_measures = session.query(InstalledMeasure).filter(
|
installed_measures = session.query(InstalledMeasure).filter(
|
||||||
InstalledMeasure.measure_type.in_(["external_wall_insulation", "internal_wall_insulation"])
|
InstalledMeasure.measure_type.in_(["cavity_wall_insulation"])
|
||||||
).all()
|
).all()
|
||||||
# Get the uprns
|
# Get the uprns
|
||||||
installed_uprns = [x.uprn for x in installed_measures]
|
installed_uprns = [x.uprn for x in installed_measures]
|
||||||
|
|
||||||
installed_uprns = list(set(installed_uprns))
|
installed_uprns = list(set(installed_uprns))
|
||||||
|
|
||||||
# This is 21425 properties.
|
|
||||||
# We then create a portfolio of properties we need to re-run
|
# We then create a portfolio of properties we need to re-run
|
||||||
import pandas as pd
|
import pandas as pd
|
||||||
|
|
||||||
|
|
@ -33,7 +32,7 @@ needing_retry = sal[sal["epc_os_uprn"].isin(installed_uprns)]
|
||||||
# Store
|
# Store
|
||||||
needing_retry.to_excel(
|
needing_retry.to_excel(
|
||||||
"/Users/khalimconn-kowlessar/Documents/hestia/Customers/Peabody/Nov 2025 Consulting Project/Final "
|
"/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",
|
sheet_name="Standardised Asset List",
|
||||||
index=False
|
index=False
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue