mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-07-12 13:29:04 +00:00
fixed setting of walls insulation thickness
This commit is contained in:
parent
46fd33d74c
commit
47058984d4
4 changed files with 27 additions and 4 deletions
|
|
@ -741,6 +741,9 @@ async def build_mds(body: PlanTriggerRequest):
|
||||||
for p in tqdm(input_properties):
|
for p in tqdm(input_properties):
|
||||||
|
|
||||||
p.get_components(cleaned, photo_supply_lookup, floor_area_decile_thresholds)
|
p.get_components(cleaned, photo_supply_lookup, floor_area_decile_thresholds)
|
||||||
|
# [{'external_wall_insulation': 'EWI (Trad Const)'}, {'loft_insulation': 'LI'}, {'air_source_heat_pump':
|
||||||
|
# 'ASHP Htg'}, {'solar_pv': 'Solar PV'}]
|
||||||
|
# p.measures = [{'external_wall_insulation': 'EWI (Trad Const)'}]
|
||||||
|
|
||||||
mds = Mds(property_instance=p, materials=materials)
|
mds = Mds(property_instance=p, materials=materials)
|
||||||
property_representative_recommendations, errors = mds.build()
|
property_representative_recommendations, errors = mds.build()
|
||||||
|
|
@ -788,6 +791,15 @@ async def build_mds(body: PlanTriggerRequest):
|
||||||
all_predictions[key] = pd.concat([all_predictions[key], scored])
|
all_predictions[key] = pd.concat([all_predictions[key], scored])
|
||||||
|
|
||||||
# We now produce a table of results for the mds report
|
# We now produce a table of results for the mds report
|
||||||
|
from utils.s3 import read_dataframe_from_s3_parquet
|
||||||
|
z = read_dataframe_from_s3_parquet(
|
||||||
|
bucket_name="retrofit-data-dev",
|
||||||
|
file_key="sap_change_model/2024-05-28-19-08-25/dataset_rooms.parquet"
|
||||||
|
)
|
||||||
|
|
||||||
|
# TODO: 1) walls_insulation_thickness_ending is not being set in the recommendations_scoring_data,
|
||||||
|
# insulation_thickness_ending is being set instead
|
||||||
|
# 2)
|
||||||
|
|
||||||
# TODO: TEMP
|
# TODO: TEMP
|
||||||
for p in plan_input:
|
for p in plan_input:
|
||||||
|
|
|
||||||
|
|
@ -78,6 +78,11 @@ def app():
|
||||||
savepoint = pd.DataFrame(result)
|
savepoint = pd.DataFrame(result)
|
||||||
savepoint.to_csv(f"savepoint_index_{i}.csv", index=False)
|
savepoint.to_csv(f"savepoint_index_{i}.csv", index=False)
|
||||||
|
|
||||||
|
# TODO: Testing Jina AI - didn't work but maybe one of the alternatives might work:
|
||||||
|
# https://www.youtube.com/watch?v=QxHE4af5BQE
|
||||||
|
response = requests.get("https://r.jina.ai/https://www.zoopla.co.uk/property/uprn/41222761/")
|
||||||
|
response.text
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
app()
|
app()
|
||||||
|
|
|
||||||
|
|
@ -102,7 +102,7 @@ class WallRecommendations(Definitions):
|
||||||
part
|
part
|
||||||
for part in materials
|
for part in materials
|
||||||
if part["type"]
|
if part["type"]
|
||||||
in ["iwi_wall_demolition", "iwi_vapour_barrier", "iwi_redecoration"]
|
in ["iwi_wall_demolition", "iwi_vapour_barrier", "iwi_redecoration"]
|
||||||
]
|
]
|
||||||
|
|
||||||
self.external_wall_insulation_materials = [
|
self.external_wall_insulation_materials = [
|
||||||
|
|
@ -113,7 +113,7 @@ class WallRecommendations(Definitions):
|
||||||
part
|
part
|
||||||
for part in materials
|
for part in materials
|
||||||
if part["type"]
|
if part["type"]
|
||||||
in ["ewi_wall_demolition", "ewi_wall_preparation", "ewi_wall_redecoration"]
|
in ["ewi_wall_demolition", "ewi_wall_preparation", "ewi_wall_redecoration"]
|
||||||
]
|
]
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
|
|
||||||
|
|
@ -756,17 +756,23 @@ def calculate_cavity_age(newest_epc, older_epcs, cleaned):
|
||||||
return cavity_age
|
return cavity_age
|
||||||
|
|
||||||
|
|
||||||
def check_simulation_difference(old_config, new_config, prefix=""):
|
def check_simulation_difference(old_config, new_config, prefix="", keys_with_prefix=None):
|
||||||
"""
|
"""
|
||||||
Given two dictionaries, that describe the heating control configurations, this method will compare the two
|
Given two dictionaries, that describe the heating control configurations, this method will compare the two
|
||||||
and pick out the differences. These differences will be things that have been added and things that have been
|
and pick out the differences. These differences will be things that have been added and things that have been
|
||||||
removed. This will be used to determine how we should be updating the configuration in the simulation
|
removed. This will be used to determine how we should be updating the configuration in the simulation
|
||||||
:return:
|
:return:
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
keys_with_prefix = (
|
||||||
|
["is_assumed", "thermal_transmittance", "insulation_thickness"] if keys_with_prefix is None
|
||||||
|
else keys_with_prefix
|
||||||
|
)
|
||||||
|
|
||||||
differences = {}
|
differences = {}
|
||||||
for key in new_config:
|
for key in new_config:
|
||||||
if old_config[key] != new_config[key]:
|
if old_config[key] != new_config[key]:
|
||||||
new_key = prefix + key + "_ending" if key in ["is_assumed", "thermal_transmittance"] else key + "_ending"
|
new_key = prefix + key + "_ending" if key in keys_with_prefix else key + "_ending"
|
||||||
differences[new_key] = new_config[key]
|
differences[new_key] = new_config[key]
|
||||||
|
|
||||||
return differences
|
return differences
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue