This link in the docs might help:
Specifically, you should study and understand the part:
“Quantities at a node are represented by "cumul" variables and the increase or decrease of quantities between nodes are represented by "transit" variables. These variables are linked as follows: if j == next(i), cumul(j) = cumul(i) + transit(i) + slack(i) where slack is a positive slack variable (can represent waiting times for a time dimension). “
So you have to be careful which node you use for service time when calling that fn.
I always think like this: the cumul(i) is the state when the vehicle arrives at i. The service time at i is added after it arrives, and then the travel time to j is added, plus slack needed, then you get cumul(j).
It sounds to me like you’re using the wrong node when calling for service time. I’m on my phone so this is likely to be unreadable, but…
def tottime(i, j):
return traveltime(i, j) + servicetime(j)
(But hard to give good advice without seeing code.)
James
We did the similar but then it reaches earlier than pickup time. So if pickup time is 7 am and location service time is 15 minutes. It reaches there at 6.45 am instead of 7 am.