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

trasport_time_fix (#74)

This commit is contained in:
kandelirina 2018-11-28 05:54:32 +00:00 committed by GitHub
parent 3227aacae5
commit d09e9c0acf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -108,7 +108,7 @@ public class VehicleDependentTimeWindowConstraints implements HardActivityConstr
return ConstraintsStatus.NOT_FULFILLED;
}
// log.info("check insertion of " + newAct + " between " + prevAct + " and " + nextAct + ". prevActDepTime=" + prevActDepTime);
double routingFromNewToNext = routingCosts.getBackwardTransportTime(newAct.getLocation(), nextActLocation, latestArrTimeAtNextAct, iFacts.getNewDriver(), iFacts.getNewVehicle());
double routingFromNewToNext = routingCosts.getTransportTime(newAct.getLocation(), nextActLocation, latestArrTimeAtNextAct, iFacts.getNewDriver(), iFacts.getNewVehicle());
double arrTimeAtNewAct = prevActDepTime + routingCosts.getTransportTime(prevAct.getLocation(), newAct.getLocation(), prevActDepTime, iFacts.getNewDriver(), iFacts.getNewVehicle());
double endTimeAtNewAct = Math.max(arrTimeAtNewAct, newAct.getTheoreticalEarliestOperationStartTime()) + activityCosts.getActivityDuration(prevAct, newAct, arrTimeAtNewAct,iFacts.getNewDriver(),iFacts.getNewVehicle());
double savingsInNextActivityDuration =