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:
parent
e8fe642e16
commit
39ed96341a
1 changed files with 1 additions and 1 deletions
|
|
@ -109,7 +109,7 @@ public class MaxTimeInVehicleConstraint implements HardActivityConstraint {
|
||||||
double directNextActStart = Math.max(directArrTimeNextAct, nextAct.getTheoreticalEarliestOperationStartTime());
|
double directNextActStart = Math.max(directArrTimeNextAct, nextAct.getTheoreticalEarliestOperationStartTime());
|
||||||
double additionalTimeOfNewAct = (nextActStart - prevActDepTime) - (directNextActStart - prevActDepTime);
|
double additionalTimeOfNewAct = (nextActStart - prevActDepTime) - (directNextActStart - prevActDepTime);
|
||||||
if (additionalTimeOfNewAct > minSlack) {
|
if (additionalTimeOfNewAct > minSlack) {
|
||||||
if (newActIsPickup) return ConstraintsStatus.NOT_FULFILLED_BREAK;
|
if (newActIsPickup) return ConstraintsStatus.NOT_FULFILLED;
|
||||||
else return ConstraintsStatus.NOT_FULFILLED;
|
else return ConstraintsStatus.NOT_FULFILLED;
|
||||||
}
|
}
|
||||||
if (newActIsDelivery) {
|
if (newActIsDelivery) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue