As anticipated at the beginning of the chapter, the VRP is a typical distribution and transport problem, which consists of optimizing the use of a set of vehicles with limited capacity to pick up and deliver goods or people to geographically distributed stations. Managing these operations in the best possible way can significantly reduce costs. Before tackling the problem with Python code, let's analyze the basic characteristics of the topic in order to understand possible solutions.
On the basis of what has been said so far, it is clear that a problem of this type is configured as a path optimization procedure that can be conveniently dealt with using graph theory.
Suppose we have the following graph, with the distances between vertices indicated on the edges (6 vertices and 7 edges):
It is easy to see that the shortest path from 0 node to 5...