double[] doubles, Integer startTime, TSPPlan[] stops,
Integer timeSpentOnStop) {
try {
TSPPlan[] tspplan = new TSPPlan[stops.length];
RoutingServiceStub rss = new RoutingServiceStub(
LogicConstants
.get("URL_ROUTING",
"http://46.105.24.58:8080/openLS/services/RoutingService.RoutingServiceHttpSoap12Endpoint/"));
for (int i = 0; i < tspplan.length; i++) {
final TSPPlan tspPlan2 = new TSPPlan();
tspPlan2.setDistance(-1);
tspPlan2.setOrigin(doubles);
tspPlan2.setTime(-1);
tspPlan2.setWay(null);
tspPlan2.setStops(stops[i].getStops());
tspplan[i] = tspPlan2;
GetTravellingSalesmanPlan param = new GetTravellingSalesmanPlan();
param.setMaxDistance(maxDistance);
param.setMaxTime(maxTime);
param.setStartTime(startTime);
param.setTimeSpentOnStop(timeSpentOnStop);
param.setParam(tspplan[i]);
try {
GetTravellingSalesmanPlanResponse res = rss
.getTravellingSalesmanPlan(param);
tspplan[i] = res.get_return();
} catch (Throwable t) {
log.error("error computing " + i + " plan", t);
}