2024-07-30 08:59:54 -04:00
|
|
|
from scripts.district_heating_network_creator import DistrictHeatingNetworkCreator
|
|
|
|
from scripts.road_processor import road_processor
|
2024-06-10 22:50:27 -04:00
|
|
|
from pathlib import Path
|
|
|
|
import time
|
2024-07-30 08:59:54 -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()
|