| Forum | GitHub | Maps | Blog

Add delay in arrival time with constraint strategy


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

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?