示例#1
0
 private Map<Job, VehicleRoute> map(Collection<VehicleRoute> vehicleRoutes) {
   Map<Job, VehicleRoute> map = new HashMap<Job, VehicleRoute>(vrp.getJobs().size());
   for (VehicleRoute r : vehicleRoutes) {
     for (Job j : r.getTourActivities().getJobs()) {
       map.put(j, r);
     }
   }
   return map;
 }
示例#2
0
 private void verifyThatRouteContainsAct(TourActivity activity, VehicleRoute route) {
   if (!route.getTourActivities().hasActivity(activity)) {
     throw new IllegalArgumentException(
         "specified route does not contain specified activity " + activity);
   }
 }