Route Optimization Issue: Unexpected Behavior with dimension evaluator of 0 #4509
Unanswered
oscaroca
asked this question in
Routing (and legacy CP) questions
Replies: 2 comments 1 reply
-
0 is not a node. You need to use StartVar(vehicle). |
Beta Was this translation helpful? Give feedback.
0 replies
-
If you want to use a callback per vehicle type you need to first register them all THEN call this method once after the loop or-tools/ortools/routing/routing.h Lines 698 to 701 in c330aec notice the first argument, an array of registered callback indices... note: since it is an array of callback indices you could use the same callback for vehicle sharing the same properties... |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
What version of OR-Tools and what language are you using?
Version: main (9.11.4210)
Language: Python
Which solver are you using
Routing Solver
What operating system?
Ubuntu 22.04.4 LTS
What did you do?
Steps to reproduce the behavior:
Working on a route optimisation problem involving depots and deliveries, using multiple vehicles. The implementation concept is to make the depots have the vehicle load 0 units, and use a very large slack so that it can load everything necessary.
In the case of deliveries the slack is reduced to 0 so that the corresponding load is reduced.
What did you expect to see
Ideally, vehicles arriving at the depot would load what they need and deliveries would be made.
What did you see instead?
The problem is that it only generates the route for 1 vehicle.
I have tried changing the load that a depot gives to 1 and everything works as expected, (the problem is that it generates errors with vehicles without capacities, or that already have the maximum load. That's why it should be 0).
I was wondering why it behaves so differently using 0 or a number other than 0.
Beta Was this translation helpful? Give feedback.
All reactions