commit bf041d99bd0b06aa80ee4781bb8ad57d85313af4 Author: Alireza Adli Date: Mon Jul 15 15:06:44 2024 -0400 Initial commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..baa9455 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +output_files/ + +*.geojson \ No newline at end of file diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..13566b8 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml new file mode 100644 index 0000000..01ea3f7 --- /dev/null +++ b/.idea/inspectionProfiles/Project_Default.xml @@ -0,0 +1,24 @@ + + + + \ No newline at end of file diff --git a/.idea/inspectionProfiles/profiles_settings.xml b/.idea/inspectionProfiles/profiles_settings.xml new file mode 100644 index 0000000..105ce2d --- /dev/null +++ b/.idea/inspectionProfiles/profiles_settings.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/.idea/lca_carbon_workflow.iml b/.idea/lca_carbon_workflow.iml new file mode 100644 index 0000000..747adc1 --- /dev/null +++ b/.idea/lca_carbon_workflow.iml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..e76b464 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..07a21c3 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/lca_carbon_workflow.py b/lca_carbon_workflow.py new file mode 100644 index 0000000..3f60a27 --- /dev/null +++ b/lca_carbon_workflow.py @@ -0,0 +1,37 @@ +""" +building_component module +Returns the summarize of envelope and energy systems +SPDX - License - Identifier: LGPL - 3.0 - or -later +Copyright © 2024 Concordia CERC group +Code contributors: Alireza Adli alireza.adli@concordia.ca +Mohammad Reza Seyedabadi mohammad.seyedabadi@mail.concordia.ca +""" + +import glob +from pathlib import Path + +from hub.imports.geometry_factory import GeometryFactory +from hub.imports.construction_factory import ConstructionFactory +from hub.helpers.dictionaries import Dictionaries + + +class LCACarbonWorkflow: + def __init__(self, city_path): + file_path = (Path(__file__).parent.parent / 'input_files' / 'output_buildings_test.geojson') + out_path = (Path(__file__).parent.parent / 'out_files') + files = glob.glob(f'{out_path}/*') + + print('[simulation start]') + city = GeometryFactory('geojson', + path=file_path, + height_field='height', + year_of_construction_field='year_of_construction', + function_field='function', + function_to_hub=Dictionaries().montreal_function_to_hub_function).city + print(f'city created from {file_path}') + ConstructionFactory('nrcan', city).enrich() + print(len(city.buildings[0].surfaces)) + + +if __name__ == '__main__': + lca_calc = LCACarbonWorkflow('output_buildings_test.geojson') \ No newline at end of file