예제 #1
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;
 }
예제 #2
0
 private double transportCost(TourActivity activity) {
   return transportCost.getTransportCost(
       prevAct.getLocation(),
       activity.getLocation(),
       prevActDeparture,
       route.getDriver(),
       route.getVehicle());
 }
예제 #3
0
 private double c(TourActivity from, TourActivity to, Vehicle vehicle) {
   return vrp.getTransportCosts()
       .getTransportCost(
           from.getLocation(),
           to.getLocation(),
           from.getEndTime(),
           DriverImpl.noDriver(),
           vehicle);
 }
예제 #4
0
 @Override
 public void finish() {
   double distance =
       distanceCalculator.getDistance(prevAct.getLocation(), route.getEnd().getLocation());
   sum_distance += distance;
   stateManager.putRouteState(route, distance_id, sum_distance);
 }
예제 #5
0
 private double distance(TourActivity activity) {
   return distanceCalculator.getDistance(prevAct.getLocation(), activity.getLocation());
 }