Hello
I'm solving the following (common) routing problem:
I have several nodes that I need to visit but I can't visit them all due to a capacity/time constraint.
Each node also has a profit associated, I want to maximize this profit (while minimizing the route distance).
I have found two distinct ways to model this:
1) Add a new dimension to the problem where each node i contributes with (max_profit - profit_i), and then set a positive global span cost coefficient to this dimension (SetGlobalSpanCostCoefficient() in Python).
This way the solver will try to minimize the difference between maximum possible profit and actual profit.
2) Add a disjunction to each node i (AddDisjunction([i], value_i) in Python) where value_i is the profit associated to each node. This way, the cost associated to not visiting the node is added to the global cost.
Let me know if posting the actual code for both examples would help.
Both options 1) and 2) seem to work on a dummy example but I would like to know which is better for this type of problem.
Thank you