mirror of
https://github.com/graphhopper/jsprit.git
synced 2020-01-24 07:45:05 +01:00
Bug fix
This commit is contained in:
parent
92524d53b3
commit
21a1d43834
1 changed files with 1 additions and 1 deletions
|
|
@ -133,7 +133,7 @@ public class MaxTimeInVehicleConstraint implements HardActivityConstraint {
|
||||||
if (openJobsAtNextOfPickup.containsKey(openJob)) {
|
if (openJobsAtNextOfPickup.containsKey(openJob)) {
|
||||||
TourActivity pickupAct = iFacts.getAssociatedActivities().get(0);
|
TourActivity pickupAct = iFacts.getAssociatedActivities().get(0);
|
||||||
double pickupActArrTime = iFacts.getRelatedActivityContext().getArrivalTime();
|
double pickupActArrTime = iFacts.getRelatedActivityContext().getArrivalTime();
|
||||||
double pickupActEndTime = startOf(pickupAct, pickupActArrTime) + activityCosts.getActivityDuration(pickupAct, pickupActArrTime, iFacts.getNewDriver(), iFacts.getNewVehicle());
|
double pickupActEndTime = startOf(pickupAct, pickupActArrTime) + activityCosts.getActivityDuration(prevAct, pickupAct, pickupActArrTime, iFacts.getNewDriver(), iFacts.getNewVehicle());
|
||||||
double nextAfterPickupArr = pickupActEndTime + transportTime.getTransportTime(pickupAct.getLocation(), nextAfterPickup.getLocation(), pickupActArrTime, iFacts.getNewDriver(), iFacts.getNewVehicle());
|
double nextAfterPickupArr = pickupActEndTime + transportTime.getTransportTime(pickupAct.getLocation(), nextAfterPickup.getLocation(), pickupActArrTime, iFacts.getNewDriver(), iFacts.getNewVehicle());
|
||||||
additionalTimeOfNewJob += startOf(nextAfterPickup, nextAfterPickupArr) - startOf(nextAfterPickup, nextAfterPickup.getArrTime());
|
additionalTimeOfNewJob += startOf(nextAfterPickup, nextAfterPickupArr) - startOf(nextAfterPickup, nextAfterPickup.getArrTime());
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue