84 if (routeManager ==
null) {
85 System.err.println(
"RouteManager not initialized");
89 if (routeListener ==
null)
return;
93 routeManager.addRouteListener(routeListener);
98 routeManager.setGraphTag(
"main");
103 String currentGraphTag = routeManager.getGraphTag();
104 System.out.println(
"Current graph tag: " + currentGraphTag);
109 List<String> graphTags = routeManager.getGraphTags();
110 System.out.println(
"Available graph tags: " + graphTags);
121 RoutePath routePath = routeManager.makeRoute(startLocationPoint, endLocationPoint);
122 System.out.println(
"Route created with length: " + routePath.getLength() +
" meters");
127 List<LocationPoint> destinations =
new ArrayList<>();
130 List<RoutePath> routePaths = routeManager.makeRoutes(startLocationPoint, destinations);
131 System.out.println(
"Created " + routePaths.size() +
" routes");
136 routeManager.setTarget(endLocationPoint);
142 routeManager.addTarget(additionalTarget);
147 routeManager.cancelTarget();
152 routeManager.clearTargets();
444 System.out.println(
"=== Route Planning Simulation ===");
446 if (routeManager ==
null) {
451 List<LocationPoint> targets =
new ArrayList<>();
458 routeManager.setTarget(targets.get(0));
461 System.out.println(
"Set target 1: " + targets.get(0));
465 }
catch (InterruptedException e) {
466 Thread.currentThread().interrupt();
471 for (
int i = 1; i < targets.size(); i++) {
472 routeManager.addTarget(targets.get(i));
473 System.out.println(
"Added target " + (i + 1) +
": " + targets.get(i));
476 }
catch (InterruptedException e) {
477 Thread.currentThread().interrupt();
484 routeManager.cancelTarget();
485 System.out.println(
"Cancelled current target");
490 }
catch (InterruptedException e) {
491 Thread.currentThread().interrupt();
496 routeManager.clearTargets();
497 System.out.println(
"Cleared all targets");