2024-01-24 17:39:05 -05:00
|
|
|
from DistrictHeatingNetworkCreator import DistrictHeatingNetworkCreator
|
2024-06-10 22:50:27 -04:00
|
|
|
from Scripts.road_processor import road_processor
|
|
|
|
from pathlib import Path
|
|
|
|
import time
|
2024-06-11 10:37:51 -04:00
|
|
|
from Scripts.geojson_graph_creator import networkx_to_geojson
|
2024-06-10 22:50:27 -04:00
|
|
|
location = [45.51663850312751, -73.59854314961274]
|
|
|
|
start_time = time.perf_counter()
|
|
|
|
roads_file = road_processor(location[1], location[0], 0.001)
|
|
|
|
|
|
|
|
buildings_file = Path('./input_files/buildings.geojson').resolve()
|
|
|
|
|
|
|
|
dhn_creator = DistrictHeatingNetworkCreator(buildings_file, roads_file)
|
|
|
|
network_graph = dhn_creator.run()
|
|
|
|
end_time = time.perf_counter()
|
|
|
|
|
|
|
|
elapsed_time = end_time - start_time
|
|
|
|
|
|
|
|
print(f"The simulation took {elapsed_time:.4f} seconds to run.")
|
|
|
|
|
2024-06-11 10:37:51 -04:00
|
|
|
networkx_to_geojson(network_graph)
|
2024-06-11 09:01:35 -04:00
|
|
|
|
2024-06-10 22:50:27 -04:00
|
|
|
dhn_creator.plot_network_graph()
|