Cordinated Multi Vehicle package pickup from multiple sources to a single sink with some sources also act as storage facility. #5054
Replies: 3 comments
-
|
If you are new to OR and to OR-Tools, then this is a lot to try to solve in one go. I would recommend breaking down the problem into parts, and trying to build it up slowly. Each one of your bullets will be difficult, but none is impossible. But it will definitely take a significant amount of time to level up enough to do this task. If you look through the OR-Tools code, there are excellent examples to be found. Specifically here in the root examples, and here for routing-specific sample code. I would start with just the four vehicles and 20 pickup locations randomly scattered on a square. I believe there is a sample that has random demands in it. Then play with trying to get all of the packages delivered to the depot in minimum time. The solver is focused on lowest cost route (it is a routing solver), so you will have to play with the other features to achieve your goal of minimum time across all of the deliveries. Anyway, start small, and when you hit a concrete blocker, ask here, on the forum, or on stack overflow. A general question like this is just going to get general advice like mine. |
Beta Was this translation helpful? Give feedback.
-
|
I have defined starts and ends so that each vehicle start at different locations instead of a common depot(starts==ends). vehicle 1 starts from node 0, vehicle 2 starts from node 4. If i start vehicle 3 at node 0 or node 4 and want it to travel towards node 4 or node 0(shuttle between node 0 and node 4), how can i enforce the routing model to do it. I tried using pickup_index=node0 and delivery_index=node4, but that returned no solution. one way i solved is by adding a duplicate node 5 for node 4. node 5 and node 4 are at the same location, but the distance between them is set to infinity to prevent the transit between them. Is this the best way to approach this?
|
Beta Was this translation helpful? Give feedback.
-
|
Every node in the solver formulation must be unique. I try hard to keep terms separate. In the real world I have locations. One location might be modeled as multiple nodes in the formulation. So if vehicle A starts at location X, and vehicle B ends at location X, that single location X must be transformed into two nodes, on for each visit. Put another way, you can only visit a node at most once. Without adding disjunctions, you MUST visit every node exactly once. This can be hard to wrap your head around, so ask more if it still isn’t clear. JamesOn Mar 10, 2026, at 05:45, AllenIsaacJose ***@***.***> wrote:
I have defined starts and ends so that each vehicle start at different locations instead of a common depot. starts==ends. vehicle 1 starts from node 0, vehicle 2 starts from node 4. If i start vehicle 3 at node 0 or node 4 and want it to travel towards node 4 or node 0(shuttle between node 0 and node 4), how can i enforce the routing model to do it. I tried using pickup_index=node0 and delivery_index=node4, but that returned no solution.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
As I am new to operations research, i find that a single algorithm like VRP or max-flow or assignment problem cannot solve this. Are there any suggestions to where should i focus on to solve this problem?
Beta Was this translation helpful? Give feedback.
All reactions