genetic-algorithmor-toolsvehicle-routing

Using Google OR-Tools to solve a Vehicle Routing Problem (VRP) for UAVs


I have tried to use OR-Tools to solve a VRP. The problem is that I don't want to find the shortest routes for every vehicle, but the ones that uses the least energy. Explanation on that: If a vehicle has to do a turn it would be consum more energy than a vehicle that would drive in a straight line. This problem was described for a Traveling salesman problem in this paper: https://par.nsf.gov/servlets/purl/10192402.

I used this documentation: https://developers.google.com/optimization/routing/vrp to get a first VRP solver.

The documentation in the paper suggests a genetic algorithm approach, but I don't really understand how OR-Tools solves the problem and where I can change variables to achieve my goal.

I conclusion I really don't understand how OR-Tools solves the VRP even after reading the whole documentation.

Any help and explenations are welcome.

Max


Solution

  • When using multiple vehicles, the OR-Tools routing library solves a VRP, not a TSP. The difference is that in a TSP, the distance matrix describes the graph, with a finite distance between two nodes when there is an arc between these two nodes, and an infinite distance if the two nodes are not connected.

    If the VRP, the distance matrix is mostly dense and represent the shortest distance between these two nodes.

    The implication is that when planning a fleet of truck, the cost of turning (left in the US for instance) must be integrated in the shortest path between any two nodes.

    Now the problem of planning a path onto a road network to maximize efficiency is a different problem, not relevant for the VRP problem solved by the routing library, and ultimately not well solved by the tool.