Calculate endActivity arrival time on insertion of new job

For a particular activity hard constraint I need value of end activity arrival time (i.e: arrival time at end if return to depot is true and departure time of final activity if return to depot is false). How to I calculate it?

What is the use case you are solving?
Can you little bit more details?Maybe I can help you?

I wanted to limit the time between first delivery and end of route. i.e: Limiting total working operation duration, but time before first delivery is ignored.

I achieved it using calculating total addition time using new insertion and Future_Waiting_Time state.

don’t forget the vehicle switching issue if you have different vehicles - you need a vehicle dependent version of the state updater for future waiting time, etc., in that case.

Thanks @jie31best for pointing that out.
Luckily in my case all vehicles start at same time and travel duration is vehicle independent. Hence I won’t have to use vehicle dependent version of state updater.

1 Like