mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
align processing of solar hot water flag between engine and model
This commit is contained in:
parent
3cf13c651c
commit
807e6d5047
4 changed files with 6 additions and 20 deletions
|
|
@ -65,20 +65,6 @@ async def trigger_plan(body: PlanTriggerRequest):
|
|||
bucket_name=get_settings().DATA_BUCKET, file_key="sap_change_model/cleaning_dataset.parquet",
|
||||
)
|
||||
|
||||
# For testing:
|
||||
# plan_input.extend(
|
||||
# [
|
||||
# {'address': '73 Long Chaulden', 'postcode': 'HP1 2HX', 'Notes': ''},
|
||||
# {'address': '8 Lindlings', 'postcode': 'HP1 2HA', 'Notes': ''},
|
||||
# {'address': '44 Lindlings', 'postcode': 'HP1 2HE', 'Notes': ''},
|
||||
# {'address': '46 Chaulden Terrace', 'postcode': 'HP1 2AN', 'Notes': ''},
|
||||
# {'address': '4, Heather Shaw', 'postcode': 'BA14 7JS', 'Notes': ''},
|
||||
# {'address': '16 Glastonbury Road', 'postcode': 'M32 9PE', 'Notes': ''},
|
||||
# {'address': '31 Loddon Way', 'postcode': 'BA15 1HG', 'Notes': ''},
|
||||
# {'address': '62 Pearmain Drive', 'postcode': 'NG3 3DJ', 'Notes': ''},
|
||||
# ]
|
||||
# )
|
||||
|
||||
input_properties = []
|
||||
for config in plan_input:
|
||||
# We validate each record in the file. If the record is NOT valid, we need to handle this accordingly
|
||||
|
|
@ -159,8 +145,6 @@ async def trigger_plan(body: PlanTriggerRequest):
|
|||
recommender = Recommendations(property_instance=p, materials=materials)
|
||||
property_recommendations = recommender.recommend()
|
||||
|
||||
recommender.wall_recomender.estimated_u_value
|
||||
|
||||
if not property_recommendations:
|
||||
continue
|
||||
|
||||
|
|
|
|||
|
|
@ -549,10 +549,10 @@ class EPCRecord:
|
|||
raise ValueError("EPC Recrod doesn not contain epc data")
|
||||
|
||||
value_map = {
|
||||
"Y": True,
|
||||
"N": False,
|
||||
"": None,
|
||||
None: None
|
||||
"Y": "Y",
|
||||
"N": "N",
|
||||
"": "N",
|
||||
None: "N"
|
||||
}
|
||||
|
||||
self.prepared_epc['solar-water-heating-flag'] = value_map[self.prepared_epc['solar-water-heating-flag']]
|
||||
|
|
|
|||
|
|
@ -109,6 +109,7 @@ class FloorRecommendations(Definitions):
|
|||
insulation_thickness=self.property.floor["insulation_thickness"],
|
||||
wall_type=self.property.wall_type
|
||||
)
|
||||
|
||||
self.estimated_u_value = u_value
|
||||
|
||||
if u_value < self.BUILDING_REGULATIONS_PART_L_MAX_U_VALUE:
|
||||
|
|
|
|||
|
|
@ -91,6 +91,7 @@ class RoofRecommendations:
|
|||
raise NotImplementedError("Implement me")
|
||||
|
||||
u_value = get_roof_u_value(**{**self.property.roof, "age_band": self.property.age_band})
|
||||
|
||||
self.estimated_u_value = u_value
|
||||
if u_value <= self.BUILDING_REGULATIONS_PART_L_MAX_U_VALUE:
|
||||
# The Roof is already compliant
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue