Same Vehicle #2769
Unanswered
GuyBenhaim
asked this question in
Routing (and legacy CP) questions
Same Vehicle
#2769
Replies: 2 comments
-
|
Also can one of the nodes also be a certain vehicle's start node? E.g. routing.Start(v1) |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Need to revisit and see if still behaves this way ... |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
This follows #1093 which is closed. I've added:
model.AddSoftSameVehicleConstraint(new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }, 600000);
With 2 vehicles and 20 orders, the solver uses 2 vehicles to serve 20 orders, but the above 10 common-orders are evenly split between them (and not served by one vehicle, as expected).
The solution cost reflects an additional cost of 600,000, since it uses 2 vehicles to serve the common-orders.
When I force using 4 vehicles (vehicle capacity now is 5 units), the solver uses all 4 vehicles to serve 20 orders, and uses only 2 of these to serve the common-orders. Again, with an additional cost of 600,000. In this case, the solver 'tries' to use fewer vehicles for serving common-orders. But, with 2 vehicles it insists on splitting the common-orders between the 2 vehicles.
Any experience with this feature?
Beta Was this translation helpful? Give feedback.
All reactions