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:
parent
9d78874c22
commit
d00f159404
1 changed files with 5 additions and 0 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue