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
|
|
|
|
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.")
|
|
|
|
|
|
|
|
dhn_creator.plot_network_graph()
|