Quantcast
Channel: OR-Tools CVRP with Multiple Trips - Stack Overflow
Viewing all articles
Browse latest Browse all 2

OR-Tools CVRP with Multiple Trips

$
0
0

I'm trying to use OR-Tools' Routing Solver to solve a Multi Trip Capacitated VRP. What I need is

  • one depot, route starts and ends here.
  • one unloading location (different from the depot)
  • set time window and demand for each node

So the vehicles should pick up the goods from each node until the capacity is filled. Then go to "unloading location", unload all their weight and keep collecting the demand from nodes until a time limit is reached or all the goods are collected. Then return back to the depot.

CVRP Reload Example seems very close but in my case, at the end of the route vehicles should visit the unloading location before the depot. In other words a vehicle can not go to the depot (starting, ending location) with load.

Example:

0: Depot1: Unloading Location2, 3, 4, 5, 6, 7: Nodes to pick up demand0 > 2 > 3 > 4 > 1 (unload) > 5 > 6 > 7 > 1 (unload) > 00 > 2 > 3 > 4 > 1 (unload) > 5 > 6 > 7 > 0 This is the result cvrp_reload returns.

I'm fairly new to or-tools, and trying to figure it out. Can you help me if you have any ideas?

  • I'm using Python and or-tools v8.2
  • This is a cross-post from github.

I think, it's possible to implement a preceding constraint before the last point (unload before depot) by using a count_dimension but I couldn't figure out how.


Viewing all articles
Browse latest Browse all 2

Latest Images

Trending Articles





Latest Images