else throw new IllegalStateException("type " + type + " is not supported. Use 'pickupShipment' or 'deliverShipment' here");
}
}
routes.add(routeBuilder.build());
}
VehicleRoutingProblemSolution solution = new VehicleRoutingProblemSolution(routes, cost);
List<HierarchicalConfiguration> unassignedJobConfigs = solutionConfig.configurationsAt("unassignedJobs.job");
for(HierarchicalConfiguration unassignedJobConfig : unassignedJobConfigs){
String jobId = unassignedJobConfig.getString("[@id]");
Job job = getShipment(jobId);
if(job == null) job = getService(jobId);
if(job == null) throw new IllegalStateException("cannot find unassignedJob with id " + jobId);
solution.getUnassignedJobs().add(job);
}
solutions.add(solution);
}
}