private Builder addBreakInternally(Break currentBreak, TimeWindow timeWindow, Location breakLocation) { List<AbstractActivity> acts = jobActivityFactory.createActivities(currentBreak); BreakActivity act = (BreakActivity) acts.get(0); act.setTheoreticalEarliestOperationStartTime(timeWindow.getStart()); act.setTheoreticalLatestOperationStartTime(timeWindow.getEnd()); act.setLocation(breakLocation); tourActivities.addActivity(act); return this; }
List<Location> locations = Arrays.asList(prevAct.getLocation(), nextAct.getLocation()); for (Location location : locations) { breakAct2Insert.setLocation(location); breakAct2Insert.setTheoreticalEarliestOperationStartTime(breakToInsert.getTimeWindow().getStart()); breakAct2Insert.setTheoreticalLatestOperationStartTime(breakToInsert.getTimeWindow().getEnd()); breakAct2Insert.setLocation(bestLocation); insertionData.getEvents().add(new InsertBreak(currentRoute, newVehicle, breakAct2Insert, insertionIndex)); insertionData.getEvents().add(new SwitchVehicle(currentRoute, newVehicle, newVehicleDepartureTime));
private Builder addBreakInternally(Break currentBreak, TimeWindow timeWindow, Location breakLocation) { List<AbstractActivity> acts = jobActivityFactory.createActivities(currentBreak); BreakActivity act = (BreakActivity) acts.get(0); act.setTheoreticalEarliestOperationStartTime(timeWindow.getStart()); act.setTheoreticalLatestOperationStartTime(timeWindow.getEnd()); act.setLocation(breakLocation); tourActivities.addActivity(act); return this; }
List<Location> locations = Arrays.asList(prevAct.getLocation(), nextAct.getLocation()); for (Location location : locations) { breakAct2Insert.setLocation(location); breakAct2Insert.setTheoreticalEarliestOperationStartTime(breakToInsert.getTimeWindow().getStart()); breakAct2Insert.setTheoreticalLatestOperationStartTime(breakToInsert.getTimeWindow().getEnd()); breakAct2Insert.setLocation(bestLocation); insertionData.getEvents().add(new InsertBreak(currentRoute, newVehicle, breakAct2Insert, insertionIndex)); insertionData.getEvents().add(new SwitchVehicle(currentRoute, newVehicle, newVehicleDepartureTime));