Start counting latest arrival after a specific point

Hi everyone!

I am trying to solve the following problem:

I have a scenario in which I want each bus to start from it’s driver’s house (depot), visit some places in order to collect some persons and last to leave them in a location.

The problem is that I want to set a maximum route duration (by using latest arrival) without calculating the time from depot to the first place. In other words, I want the route time to start from the first service rather than from the depot. Is it possible somehow to achieve that?

Thanks,
Nikos

You have to create own MaxDrivingTimeConstraint and substract time between depot and first stop from complete route time. That should do the trick. And after that you have to do that again at the end with solution analyser, to obtain right number.

Powered by Discourse