The "vehicle routing problem" is a combinatorial optimization problem which asks "What is the optimal set of routes for a fleet of vehicles to traverse in order to deliver to a given set of customers?". It generalises the travelling salesman problem.
Questions tagged [vehicle-routing]
258 questions
2
votes
1 answer
Pickup and delivery VSP with aggregation points
I'm trying to solve a simple pickup and delivery VRP for one vehicle only using or-tools.
I was following the docs https://developers.google.com/optimization/routing/pickup_delivery, and it seems that everything works as expected when all the pickup…

user1013607
- 115
- 2
- 13
2
votes
1 answer
set costs for orders in or-tools
We minimize the fuel consumed by the vehicles in terms of cost. Some customers may sometimes need an extra staff member while purchasing their products. These extra staffs have a fixed daily cost. This cost + fuel consumption should be minimized.
In…

Beyhan Gul
- 1,191
- 1
- 15
- 25
2
votes
1 answer
Time taken to solve a Vehicle Routing Problem (CVRPTW) using Google OR Tools depends on the ordering of vehicle capacity
I have tried to create a CVRPTW solution by combining CVRP and VRPTW from examples provided in the official documentation.
Since the code is big I cannot paste it here, so I am sharing a colab notebook demonstrating a short example reproducing the…

aniketsharma00411
- 35
- 1
- 7
2
votes
1 answer
OR-TOOLS: PCVRP with delivery patterns
Please help me on my periodic capacitated vehicle routing problem.
Find the same question here on google-groups.
What I am trying to model:
1 depot
multiple customers (let's assume 4)
multiple days (let's assume 3)
Multiple vehicle types with…

Thomas 1234
- 53
- 5
2
votes
1 answer
Capacitated Vehicle Routing Problem - Google OR tools
I am running VRP with capacity constraints. Here is my code.
List orders =. getOrders()
final DataModel data = new DataModel();
data.distanceMatrix = distanceMatrix.constructDistanceMatrix(orders);
…
2
votes
0 answers
How to utilise each vehicle in Vehicle Routing Problem
I am trying to solve a capacitated pickup and delivery problem using ortools. Each vehicle has a capacity of 1 and, provided that the number of deliveries/jobs > number of vehicles, has to be utilised at least once. Of course, there has to be a…

D.Wies
- 53
- 5
2
votes
1 answer
Vehicle Routing Problem - How to finish/determine when certain locations are visited?
I have VRP problem. I have vehicles starting positions and I have distance matrix. I want solution to be terminated/finished when certain locations are visited.
So I don't want it to actually visit each index of location_matrix but if visiting…

paypaytr
- 199
- 1
- 1
- 12
2
votes
1 answer
or-tools: dirrerent slack_max for some locations
In my project I use or-tools for solving VRPTW problem.
I need to set different waiting time for different nodes.
For example. I have 6 locations.
Depot of vehicle. With max time window (0, 1440)
Pickup point for client 1. Time window (0,…

Dmitry Ermichev
- 397
- 4
- 12
2
votes
2 answers
How to graph Google OR Tools Vehicle Routing Problem Solution?
I am using Google OR tools to solve a simple vehicle routing problem in Python. I want to plot the solution that the solver returns in the way similar to the Google tutorial:
Google OR Tools Vehicle Routing Problem Tutorial Solution
This is the code…

JT-12
- 23
- 6
2
votes
2 answers
How do I interpret the Vehicle Routing Problem solution returned from Google OR Tools?
I have a working Vehicle Routing Problem solution implemented using Google's OR Tools python library. I have a time matrix of 9 locations, and time windows for each location. All values are in units of seconds.
(For example, the first time window is…

Josh Kautz
- 459
- 3
- 5
- 31
2
votes
0 answers
How to make every vehicle do something in Or Tools?
In several problems of the VRP, when informing the total number of vehicles, it is compromised that all are used and that at least they visit a node. In reality, this may not even be the best, but I would like to understand why and how to adapt…

Marcelo Alves
- 67
- 5
2
votes
0 answers
Solving VRP based on least demand or less distance. Optimizing routes for other variables
I'm trying to model a node coverage problem, and in my case I'm using capacity per vehicle routing.AddDimensionWithVehicleCapacity but I want to change the solution based on optimal route or route that uses least of the capacity. The use case is…

knownasilya
- 5,998
- 4
- 36
- 59
2
votes
0 answers
How to implement custom soft constraints in OR-Tools Routing Solver?
I've been working with the OR-Tools routing solver in Python for a couple of months and I still not understand how to implement custom soft constraints or even if it's possible in the routing solver.
I know that the following methods add penalties…

Rafael Henriques
- 21
- 2
2
votes
1 answer
Multiple Depot Vehicle Routing Problem Optaplanner
I am trying to customize Optaplanner for my particular use-case. I have been successful so far but now I am struck at the point where I need to have multiple depot and multiple location. Their main use-case seems to be under the assumption that all…

Silverfang
- 349
- 1
- 8
2
votes
1 answer
Vehicle Routing Problem using Or-Tools - auto decide initial start point
Vehicle Routing Problem using Or-Tools (PYTHON) - Auto decide initial start point.
I referred this https://developers.google.com/optimization/routing/vrp
I want to create a pickup drop service for employees with multiple location.
i want CVRP to…

Arun Maurya
- 91
- 1
- 10