In my application I have a single driver and many vehicles. i.e, he can drive the next vehicle after the end of the previous trip in term of constraint it is something like
routing.solver().AddConstraint(
time_dimension.CumulVar(routing.End(int(pre_vehicle_id))) <=
time_dimension.CumulVar(routing.Start(int(vehicle_id)))
)
after many tries I found that such constraint works only if I set the first solution strategy to PARALLEL_CHEAPEST_INSERTION.
Here, I have some problems:
- sometimes it failed with no reason, or it takes very long time to get the first solution. is it a bug? or I do something wrong. What is the correct way to implement such constraint