add: calculate time of the simulation

This commit is contained in:
Majid Rezaei 2024-06-10 10:53:43 -04:00
parent 885491e39a
commit e1f0add43e
4 changed files with 52995 additions and 1942 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

12
main.py
View File

@ -1,12 +1,20 @@
from DistrictHeatingNetworkCreator import DistrictHeatingNetworkCreator
from Scripts.road_processor import road_processor
from pathlib import Path
import time
roads_file = road_processor(-73.61038745537758, 45.484399882086215, 0.001)
start_time = time.perf_counter()
roads_file = road_processor(-73.62785596251456, 45.4868575174825, 0.005)
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()

File diff suppressed because one or more lines are too long