mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
Merge pull request #932 from Hestia-Homes/feature/ara-rebaselining
simulating hhrsh with Good efficiency as per sap10
This commit is contained in:
commit
7fd8f38fd7
3 changed files with 7 additions and 4 deletions
|
|
@ -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(
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue