Weighted Objective Functions — An Interactive Transport Planning Model
Change what the planner is told to value, and watch the “best” route plan change with it. An objective function is a policy decision disguised as arithmetic.
Open simulation →Simulation
Step through a 1964 routing heuristic one merge at a time and watch out-and-back trips collapse into sensible shared runs across West Yorkshire.
The Vehicle Routing Problem is easy to state and brutally hard to solve exactly: given a depot, a set of drops, and vehicles with finite capacity, what is the cheapest set of routes that serves everyone? The number of possible answers grows faster than any computer can enumerate, so commercial systems do not look for the perfect answer. They look for a very good one, quickly.
Clarke and Wright published the classic way of doing that in 1964, and versions of it are still running inside transport optimisation software today. The idea is almost embarrassingly simple. Start from the worst sensible plan: send a separate vehicle out and back for every single drop. Then, for every pair of drops, work out how much distance you would save by serving them on one trip instead of two. Sort those savings from largest to smallest and work down the list, merging routes whenever capacity allows.
This simulator lets you watch that happen on a West Yorkshire map, one merge at a time, with the savings table visible beside it.
Press Step merge repeatedly rather than jumping straight to Auto run. The first few merges are the interesting ones: they are the large, obvious consolidations that any experienced planner would spot immediately, and seeing the algorithm find them in the same order is what makes the heuristic feel reasonable rather than magical.
Then use the two controls to break it deliberately.
Drop Vehicle capacity and re-run. Merges that were previously top of the savings list become infeasible, so the algorithm skips them and takes the next best option. The resulting plan is worse, but not because the algorithm got worse — the constraint changed. This is the single most common source of “why did the routes change overnight?” questions in real operations.
Adjust Planning speed to slow the animation down and read the Earl explanation panel as each merge lands. It narrates why that particular pair was chosen at that particular moment.
Two things are worth noticing. First, the algorithm is greedy: it takes the best available saving right now and never reconsiders. That makes it fast and explainable, and it also means the final plan is usually good but rarely optimal — which is the gap that Two-Opt, Simulated Annealing, and Tabu Search exist to close.
Second, the savings list is a ranking of pairs, not a plan. The plan is what emerges after capacity, time windows, and vehicle rules have filtered that ranking. When a planner says the system “made a stupid decision”, it is usually the filter rather than the ranking that did it.
Plan Earl and Randy's UK delivery run from a Leeds depot. Start with one route per customer, calculate the saving from joining pairs, then merge the best feasible routes without breaking vehicle capacity.
| Pair | Saving | Load | Status |
|---|
Each customer starts as a separate out-and-back journey. The algorithm then asks which two journeys should be connected first.
Change one input at a time, run the model, and compare the result with the starting state. Then repeat the experiment with a different constraint or strategy so you can see which relationships drive the outcome.
Look for trade-offs, thresholds, feedback loops, and points where a locally attractive decision produces a worse system-wide result. The simulation is intended to make the article's idea observable, not to predict a real operation.
This is a deliberately simplified model. It omits the data quality, exceptions, human judgement, and operational constraints of a live system, so treat its behaviour as an illustration of a mechanism rather than as a planning recommendation.
Read: Earl learns about a man called Clarke →
Explore the complete Transport Optimisation Explained series