from pathlib import Path name_gml = '2050 bp_20buildings' name_cli = 'inseldb_New_York_City.cli' name_weather = 'inseldb_New_York_City.dat' example_path = (Path(__file__).parent / 'examples/NYC_20buildings').resolve() full_path_gml = (example_path / 'inputs' / (name_gml + '.gml')).resolve() full_path_cli = (example_path / 'inputs' / name_cli).resolve() full_path_weather = (example_path / 'inputs' / name_weather).resolve() outputs_path = (example_path / 'outputs').resolve() keep_files = True #this is another test # Initialize the city model and add thermal- and usage-related parameters # todo: add several steps: # - simplification of the data model (for all work-flows) # - internal zoning of buildings (for dynamic simulation only) #city = Init(full_path_gml).city # Climate-related parameters # todo: define full_path_cli and any other weather related parameter according to the city_name in city #hourly_temperatures = Wt(full_path_weather).weather_temperatures sra_working_path = (example_path / 'third_parties_files/simplified_radiosity_algorithm').resolve() sra_file_name = name_gml + '_SRA' #sra = Sra(sra_working_path, sra_file_name, full_path_cli, city.city_objects, lower_corner=city.lower_corner) # todo: change this with if sra_file_exists. Using it now only internally. sra_calculated = True #if sra_calculated: # sra.results() #else: # sra.call_sra(keep_files=keep_files) #sra.set_irradiance_surfaces(city) # Demand calculation (one model per building) #for city_object in city.city_objects: # content = templates.generate_dem(city_object, usageParameters, temperatures) # inselFile = InsF(path, name_insel, content) # inselFile.save() # Run INSEL # runInsel(inselFile.full_path)