Member-only story
Modern Route Optimization with Python
Shortest Path, Traveling Salesman Problem, Vehicle Routing Problem, Plotting Maps and Animations
In this article, I will use Python to address the following problem: what is the optimal route for 1 or more vehicles in order to deliver to a set of customers?
Summary
Route Optimization is the process of determining the most cost-efficient route. It doesn’t necessarily mean finding the shortest path between two points, as it includes all relevant factors (i.e. profit, number of locations, time windows).
This topic was first addressed mathematically in the 1930s to solve a school bus routing problem. It was called the Traveling Salesman Problem, which consists of finding the shortest way for a driver to visit all the locations, given the distances between them.
The Traveling Salesman Problem can be generalized into the Vehicle Routing Problem: the issue of mapping routes for vehicles while minimizing an objective function composed of operating costs and user preferences. It’s the main problem in logistics transportation. For instance, if at night there is a lot of traffic (or high tolls) on the shortest path, it might not be the optimal route for dinner deliveries.