Testing alternative routes using Graphhopper 2.0 latest release.
Drawn multiple custom routes between two points in singapore near changi from (1.3507678, 103.961269) to 1.3471661, 103.9718394.
found only 3 routes between these two points.
Our graph is small graph having multi routes. At any point of time we need 3 best paths. But at some places path having only 3 alternative paths, in that case we need to retrieve all paths. when i given max_paths 20 expecting to retrieve all paths in the graph between two points. Tested with changing values of max_share_factor, max_exploration_factor, min_plateau_factor and max_weight_factor, but only retrieved 4 paths. So plan is if retrieve all paths then we can choose best 3 from them. Is any way to retrieve all paths, please advise.
there is NetworkX library in link which you shared, it is a python library but graphhopper is in java, how to use that library in graphhopper code?
please advise
Like I said this is feature is not supported by GraphHopper. The alternative route calculation has a different goal and using it for your scenario is just a (not very well working) workaround.
Please find attached AlternativeRoute.java file.
Played around this file and got all possible routes from starting point
And enabled edge based routing
But having another problem, when vehicle moving forward we need to show possible routes. One path is missing in below screenshot when vehicle move forward.
If we fix this one our problem will resolve.
Please help on this issue.
As per my understanding, if n possible routes are available, then n-1 alternative routes we should get.
This issue is fixed ,
Getting duplicate paths in actual graph because of duplicate segments drawn. After deleting duplicate segment from graph, getting all paths as expected.