[jgrapht-users] TransitNodeRoutingShortestPath
Brought to you by:
barak_naveh,
perfecthash
From: Mario B. <mar...@gm...> - 2021-02-11 15:55:38
|
Greetings, I have been trying to use the TransitNodeRoutingShortestPath on a graph that contains the OSM road network of Switzerland (474,687 edges) since the documentation says that this algorithm is most suited for large networks. For some reason though, everytime pre-computation is performed, the CPU usage jumps to 350% continuously and I had to stop the process after 3 hours of processing since obviously there was something wrong. It took only around 3 minutes to do a pre-computation using the ContractionHierarchyBidirectionalDijkstra algorithm using the very same graph. My code is: *private* *static* TransitNodeRoutingShortestPath<Integer, LabeledWeightedEdge> *tnrsp* = *null*; ThreadPoolExecutor executor = (ThreadPoolExecutor) Executors.*newFixedThreadPool* (3); *tnrsp* = *new* TransitNodeRoutingShortestPath<Integer, LabeledWeightedEdge>(*defaultGraph*,executor); *tnrsp*.performPrecomputation(); I tried increasing the ThreadPool but I got the same result (high CPU usage and un-ending processing). Is there anything I am doing wrong? I'd really appreciate it if someone can point out how to properly use this algorithm. Thanks. Mario |