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

assert direct path with new vehicle does not break condition

This commit is contained in:
Stefan Schroeder 2013-12-05 18:18:19 +01:00
parent 9d78874c22
commit d00f159404

View file

@ -51,6 +51,11 @@ import org.apache.log4j.Logger;
if(arrTimeAtNextAct > latestArrTimeAtNextAct){
return ConstraintsStatus.NOT_FULFILLED;
}
double arrTimeAtNextOnDirectRouteWithNewVehicle = prevActDepTime + routingCosts.getTransportCost(prevAct.getLocationId(), nextAct.getLocationId(), prevActDepTime, iFacts.getNewDriver(), iFacts.getNewVehicle());
//if vehicle cannot even manage direct-route - break
if(arrTimeAtNextOnDirectRouteWithNewVehicle > latestArrTimeAtNextAct){
return ConstraintsStatus.NOT_FULFILLED_BREAK;
}
return ConstraintsStatus.FULFILLED;
}
}