Resources
Logistics is: The right product, at the right place, at the right time. Transportation problems solve the place.
Transportation Problems
To facilitate supply network planning (decentralized global production planning), cross-docking, or the redistribution of empty containers or shared mobility systems, transportation problems can be solved using an optimization model:
- sources with capacity
- sinks with demand
- Transportation costs per unit from source to sink
- Decision variable : number of units transported from source to sink
- Constraints on capacity and demand, and non-negativity of decision variables.
- The objective is to minimize total transportation costs:
This can generally be solved using Simplex or heuristic methods (north-west corner, matrix minimum).

Single-Route Optimization
Traveling Salesman (TSP)
The simplest transportation optimization problem. It doesn’t consider source/sink or capacity constraints, but rather the shortest route to visit all nodes (cities) and return to the starting point. Easy for small instances, but NP-hard for larger ones.
It minimizes the cost of trips from to with distances :
- where every location is reached and left: and
- where subtours are eliminated (no smaller loops around position ):
- where variables are binary:
On paper, the traveling salesman can be solved using heuristics like nearest neighbor (start anywhere, then go to closest unvisited) or successive insertion (insert any unvisited node into the existing tour at the cheapest position). This solution can then be improved using 2-Opt.
Königsberg Bridge Problem
The problem of finding a walk through the city of Königsberg that would cross each of its seven bridges once and only once. It was solved by Euler in 1736, laying the foundation for graph theory.
Successive Insertion
A heuristic for constructing a tour by starting with a small subset of nodes and iteratively inserting the remaining nodes into the tour at the position that minimizes the increase in total distance.
Doing the process by hand is simple:
- Start with a small tour (e.g., two nodes).
- For each remaining node, calculate the cost of inserting it between every pair of consecutive nodes in the current tour.
- Insert the node at the position that results in the smallest increase in total distance.
- Repeat until all nodes are included in the tour.
2-Opt
An algorithm to iteratively improve a given route by removing two edges and reconnecting the two paths in a different way to reduce the total distance. The iteration stops when no further improvements can be made.

Two variants of 2-Opt exist:
- Steepest Descent: Optimize for the largest improvement in each iteration. First, all possible edge pairs are evaluated, and the best swap is performed.
- Decent Procedure: Optimize for the first improvement found. The algorithm stops as soon as a better solution is found, which is then used as the new starting point for the next iteration.
To perform 2-Opt by hand:
- Start with an initial tour (e.g., from the nearest neighbor heuristic).
- Identify all pairs of edges in the tour.
- For each pair of edges, calculate the total distance if the edges are swapped (i.e., the two edges are removed and the two paths are reconnected in the opposite way).
- If any swap results in a shorter total distance, perform the swap and update the tour.
- Repeat steps 2-4 until no further improvements can be made.
Multi-Route Logistics
Vehicle Routing (VRP)
A generalization of the TSP where multiple vehicles are used to service a set of customers. Each vehicle has a capacity limit, and the goal is to minimize the total distance traveled while ensuring that all customer demands are met.
Each tour is performed by one vehicle and must start and end at a depot. In the standard problem, multiple depots, plannings periods, asymmetric (e.g. time-dependent) node distances, different vehicles, or time windows are not considered, but it can be extended to more complex variants.
In our simplified model, there is one depot (node ), customers with demand and distances who are served by identical vehicles with capacity for volume or number of customers and a time restriction . The decision variables are:
- The assignment of customer to tour , expressed by boolean variable
- Sequence variables (just like with TSP) determine if there is a trip from to on tour , expressed as boolean variable
The objective function, of course, is to minimize the total distance:
Capacitated VRP Model
Objective:
Constraints:
- Inflow to node:
- Outflow from node:
- Subtour elimination:
- Node assignment:
- Depot departures:
- Demand capacity:
- Route duration/distance:
Bounds:
- Domains:
To solve this problem, different heuristic solution methods may be applied:
- Route First, Cluster Second: Solve one large TSP for all customers, then split the route whenever the vehicle capacity is exceeded.
- Sweep Method: Cluster first, route second. Customers are assigned to vehicles based on their polar coordinates relative to the depot, and then each cluster is solved as a TSP.
- Savings Method: Parallel clustering and routing. Start with each customer being served by a separate vehicle, then iteratively merge routes based on the savings in distance achieved by combining them.
Sweep Method
The sweep method is a heuristic for solving the VRP by clustering customers based on their angular position relative to the depot.
- Each customer is added, in order of their angle from the depot, to a vehicle route until the vehicle’s capacity is reached.
- Check if the route can be improved by reordering the customers in the route (e.g., using 2-Opt).
- If there is capacity left after improving the route, repeat from 1 for this route, otherwise start a new route with the next unassigned customer.
- Continue until all customers are assigned to a route.
When properly computing the sweep method (not on paper), all possible starting nodes would be tested. We’re just choosing one for simplicity.

See slide 36 and 38 for an example solution.
Savings Method
The savings method is a heuristic for solving the VRP by iteratively merging routes based on the savings in distance achieved by combining them.
- Start with each customer being served by a separate vehicle route.
- Calculate the savings for each pair of customers and as (Clarke-Wright savings formula):
where and are the distances from the depot to customers and , and is the distance between customers and . - Create a savings matrix that lists the savings for each pair of customers.
- For each entry in the matrix, sorted by descending savings, check if they can be merged into a single route without violating vehicle capacity or other constraints. If they can be merged, combine their routes.
- If a point is in the middle of a route, it cannot be merged with another route; only the first and last points are checked for possible merging.
- Repeat step 4 until no more merges can be made.

See slide 44 for an example solution.
Outlook: Complex Variants
Real-world, complex routing problems often include additional factors and constraints, such as road gradient, velocity (including traffic lights), acceleration, electric power and charging demand. They might also include additional objectives like minimizing emissions in addition to cost.