Hello,
there is a little misunderstanding with initial routes.
After creating initial routing, changing arrive and leave time
VehicleRoutingProblem.Builder vrpBuilder;
VehicleRoute initialRoute;
//My object with detail info about stop (arrive and leave time for example 19:45:00 - 20:00:00)
InitialRoute userRoute;
List<TourActivity> activities = initialRoute.getTourActivities().getActivities();
for (TourActivity ta : activities) {
String id = ((TourActivity.JobActivity) ta).getJob().getId();
for(Stop stop: userRoute.getServices()) {
if(id.equals(stop.getId())) {
Service job = (Service)getJob(id, vrpBuilder);
if(job != null) {
ta.setArrTime(stop.getArrivalTime()); //19:45:00
ta.setTheoreticalEarliestOperationStartTime(job.getTimeWindow().getStart());//16:30:00
ta.setEndTime(stop.getLeaveTime()); //20:00:00
ta.setTheoreticalLatestOperationStartTime(job.getTimeWindow().getEnd());//20:00:00
}
break;
}
}
}
service time window is 16:30:00 - 20:00:00
real time of arrival for initial route (19:45:00 - 20:00:00) service time is 15 min
in result of optimization, we have a arriving on service in time out of time window ((20:03:00 - 20:18:00))
can you clarify how algoritm work with initial route, why constraint not working in this case ?
Thanks for answer