1
0
Fork 0
mirror of https://github.com/graphhopper/jsprit.git synced 2020-01-24 07:45:05 +01:00

improve max-time-in-vehicle

This commit is contained in:
oblonski 2017-11-08 19:07:51 +01:00
parent e8fe642e16
commit 39ed96341a
No known key found for this signature in database
GPG key ID: 179DE487285680D1

View file

@ -109,7 +109,7 @@ public class MaxTimeInVehicleConstraint implements HardActivityConstraint {
double directNextActStart = Math.max(directArrTimeNextAct, nextAct.getTheoreticalEarliestOperationStartTime());
double additionalTimeOfNewAct = (nextActStart - prevActDepTime) - (directNextActStart - prevActDepTime);
if (additionalTimeOfNewAct > minSlack) {
if (newActIsPickup) return ConstraintsStatus.NOT_FULFILLED_BREAK;
if (newActIsPickup) return ConstraintsStatus.NOT_FULFILLED;
else return ConstraintsStatus.NOT_FULFILLED;
}
if (newActIsDelivery) {