Add new node to exist assignment with the least change #2425
-
What language and solver does this apply to? Describe the problem you are trying to solve. Describe the solution you'd like
Describe alternatives you've considered Additional context |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
routing.VechicleVar(index_N).SetValue(vehicle_X)
|
Beta Was this translation helpful? Give feedback.
Add the new node in a disjunction so you can use the previous assignment as initial solution
see: https://gist.github.com/Mizux/0bd1daadc4e64130b62492c942f163d5
force all previous node to the vehicle in the previous assignment so they won't be moved to another vehicle aka
or-tools/ortools/constraint_solver/routing.h
Lines 1043 to 1061 in fa84bc0