Freight Distribution - Jupyter Notebooks

In the following notebooks, we learn to solve the travelling salesman problem (TSP) and vehicle routing problem (VRP) using different algorithms.

Notebook 6.1 - Travelling Salesman Problem - MTZ Formulation

This notebook gives an overview of solving the travelling salesman problem using the Miller-Tucker-Zemlin (MTZ) formulation. We will be back to using PuLP.

Notebook 6.2 - Travelling Salesman Problem - Brenchmarking the MTZ model

The solution time for MTZ models of different problem sizes increase drastically. So, in this notebook, we learn to benchmark the performance of the MTZ model for varying problem sizes.

Notebook 6.3 - Travelling Salesman Problem - Nearest Neighbour Heuristic

Using the nearest neighbour method learned in class, we learn to solve the travelling salesperson problem.

Notebook 6.4 - Travelling Salesman Problem - Genetic Algorithm

We solve the travelling salesperson problem using genetic algorithm (GA).

Notebook 6.5 - Travelling Salesman Problem - Solution Comparison

We compare different methods of solving the travelling salesperson problem.

Notebook 6.6 - Multiple Travelling Salesman Problem

In this notebook, we explore the travelling salesperson problem with multiple salespeople.

Notebook 6.7 - Capacitated Vehicle Routing Problem

We solve the capacitated vehicle routing problem to improve on the solution of the multiple travelling salesperson problem.

Notebook 6.8 - Sweep Method

To solve the vehicle routing problem quickly, perhaps even at the cost of not having the best solution, we apply the sweep method, as learned in class.

Notebook 6.9 - Savings Method

We solve the vehicle routing problem, we apply the savings method, as learned in class.

Notebook 6.10 - Vehicle Routing Problem - Genetic Algorithm

We again apply the genetic algorithm, but this time to solve the vehicle routing problem.

We encourage you to have a look at the notebooks and understand the differences between the various algorithms to solve the travelling salesperson problem and the vehicle routing problem.

You can download all notebooks for Session 6 along with the data used in the notebook 6.3 from the link below.