Commit c72090d9 authored by Julian Zobel's avatar Julian Zobel
Browse files

WiP: Adaptions to maximal path calculation for OSM Movement

parent b8398839
......@@ -219,7 +219,8 @@ public class RealWorldStreetsMovement extends AbstractLocalMovementStrategy {
req.getHints().put(Routing.BLOCK_AREA, blockedAreas);
}
if(allowAlternativeRoutes) {
req.setAlgorithm(Parameters.Algorithms.ALT_ROUTE);
req.setAlgorithm(Parameters.Algorithms.ALT_ROUTE);
req.getHints().put(Parameters.Algorithms.AltRoute.MAX_PATHS, "5");
}
......@@ -244,6 +245,10 @@ public class RealWorldStreetsMovement extends AbstractLocalMovementStrategy {
if(allowAlternativeRoutes && rsp.hasAlternatives() && rsp.getBest().getDistance() > 50) {
// alternative route is taken with a certain chance
if(random.nextDouble() <= probabilityForAlternativeRoute) {
List<PathWrapper> paths = rsp.getAll();
System.out.println(paths.size());
pointList = rsp.getAll().get(1).getPoints();
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment