Ejemplo n.º 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);
 }
Ejemplo n.º 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;
 }
Ejemplo n.º 3
0
 private double distance(TourActivity activity) {
   return distanceCalculator.getDistance(prevAct.getLocation(), activity.getLocation());
 }