Merge pull request #932 from Hestia-Homes/feature/ara-rebaselining

simulating hhrsh with Good efficiency as per sap10
This commit is contained in:
KhalimCK 2026-03-31 12:02:39 +01:00 committed by GitHub
commit 7fd8f38fd7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 7 additions and 4 deletions

View file

@ -32,7 +32,6 @@ from backend.ml_models.api import ModelApi
from backend.ml_models.Valuation import PropertyValuation
from backend.Property import Property
from backend.apis.GoogleSolarApi import GoogleSolarApi
from backend.addresses.Addresses import Addresses
from recommendations.optimiser.CostOptimiser import CostOptimiser
from recommendations.optimiser.GainOptimiser import GainOptimiser
@ -642,7 +641,9 @@ async def model_engine(body: PlanTriggerRequest):
epc_records = patch_epc(patch, epc_records)
prepared_epc = EPCRecord(epc_records=epc_records, run_mode="newdata", cleaning_data=cleaning_data)
prepared_epc = EPCRecord(
epc_records=epc_records, run_mode="newdata", cleaning_data=cleaning_data, address_metadata=addr
)
input_properties.append(
Property(

View file

@ -566,6 +566,7 @@ class EPCRecord:
"multi_glaze_proportion": addr.landlord_multi_glaze_proportion,
"construction_age_band": addr.landlord_construction_age_band,
}
landlord_remapping = {k: v for k, v in landlord_remapping.items() if v is not None}
# Sanity check - ensure valid keys
if any(k not in self._prepared_epc for k in landlord_remapping):
@ -573,6 +574,7 @@ class EPCRecord:
self.landlord_differences = {} # Anything actaully changed
for k, v in landlord_remapping.items():
if k == "total_floor_area":
existing = self._prepared_epc.get(k)
if existing is not None and v is not None and abs(existing - v) > 1: # 1m tolerance

View file

@ -1062,8 +1062,8 @@ class HeatingRecommender:
**hot_water_simulation_config
}
# This upgrade will only take the heating system to average energy efficiency
if self.property.epc_record.mainheat_energy_eff in ["Very Poor", "Poor"] and not self.dual_heating:
heating_simulation_config["mainheat_energy_eff_ending"] = "Average"
if self.property.epc_record.mainheat_energy_eff in ["Very Poor", "Poor", "Average"] and not self.dual_heating:
heating_simulation_config["mainheat_energy_eff_ending"] = "Good"
else:
heating_simulation_config["mainheat_energy_eff_ending"] = self.property.epc_record.mainheat_energy_eff