CVRP with Multiple Trips, Unload Location and Depot

224 views
Skip to first unread message

Eredin Bréacc Glas

unread,
Mar 17, 2021, 3:24:39 AM3/17/21
to or-tools-discuss
Hi everyone, 

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: Depot 1: Unloading Location 2, 3, 4, 5, 6, 7: Nodes to pick up demand 

0 > 2 > 3 > 4 > 1 (unload) > 5 > 6 > 7 > 1 (unload) > 0 

0 > 2 > 3 > 4 > 1 (unload) > 5 > 6 > 7 > 0 This is the result cvrp_reload returns.


-----

I've created duplicate instances for the 0 (depot) and for the 1 (unloading location). Yet, couldn't figure out how to make vehicles visit unloading location before the depot. You can see the python code in github link. I've posted on github discussions and stackoverflow too but this group seems more active. Any help is appreciated.

Mizux Seiha

unread,
Mar 17, 2021, 6:49:50 AM3/17/21
to or-tools-discuss
Reply all
Reply to author
Forward
0 new messages