Beispiel #1
0
 @Override
 public void finish() {
   double distance =
       distanceCalculator.getDistance(prevAct.getLocation(), route.getEnd().getLocation());
   sum_distance += distance;
   stateManager.putRouteState(route, distance_id, sum_distance);
 }
Beispiel #2
0
 @Override
 public void visit(TourActivity activity) {
   double distance =
       distanceCalculator.getDistance(prevAct.getLocation(), activity.getLocation());
   sum_distance += distance;
   stateManager.putActivityState(activity, distance_id, sum_distance);
   prevAct = activity;
 }
Beispiel #3
0
 private double distance(TourActivity activity) {
   return distanceCalculator.getDistance(prevAct.getLocation(), activity.getLocation());
 }