问题
I need to solve this routing problem: two nodes cannot share the same route.
I.e.: if vehicle stop at node A, it shouldn't be allowed to stop also at node B, that means that node A and node B cannot be on the same route.
Any ideas? Thanks in advance for your help.
Fabio
回答1:
Did you try:
routing.solver().Add(routing.VehicleVar(index_a) != routing.VehicleVar(index_b))
来源:https://stackoverflow.com/questions/61405089/google-ortools-nodes-that-cant-share-the-same-route