GraphHopper.com | Forum | GitHub | Maps | Blog

Add delay in arrival time with constraint strategy


#1

Is it possible to update the arrival time value in the constraint? The goal is to simulate more than one vehicle break.

Ex:
int newActArrTime = Double.valueOf(prevActDepTime + costMatrix.getTransportTime(prevAct.getLocation(), newAct.getLocation(), prevActDepTime, iFacts.getNewDriver(), iFacts.getNewVehicle())).intValue();
newActArrTime += 3600; // Example offset.
newAct.setArrTime(newActArrTime); // this works?