Why even an experienced dispatcher can't beat the algorithm

Even 10 years of experience is not enough. A driver who has driven the same route for 10 years knows it by heart. But they drive it out of habit. Meanwhile, new customers have been added, others have left and delivery times have changed. The algorithm recalculates the order of stops with every change.

How many possible sequences does one driver have with 20 stops?

2,432,902,008,176,640,000

possible sequences in which the driver can visit the stops

If you tried one sequence per second, it would take you more than 77 billion years – more than five times longer than the universe has existed.

The algorithm doesn't have to try them all. It rules out unfavorable combinations right at the start and reaches a result in a few seconds. That's why it usually sequences the stops better than a driver who has driven the route for years.

20! = 20 × 19 × 18 × … × 2 × 1

How many plans do 10 drivers have with 200 stops?

possible plans

This number has 390 digits. There are approximately 1080 atoms in the observable universe – a number with 81 digits.

Here it is no longer just about the sequence. You have to decide which stops go to which driver, whether the goods fit into the vehicle and whether the driver makes the customers' time windows. By hand this takes a dispatcher hours, and the result is still a compromise. Rinkai recalculates the whole plan in one click.

Calculation: 200! × C(199, 9), i.e. the number of ways to split 200 stops between 10 drivers so that each gets at least one, and to sequence them.

How does the algorithm solve route planning?

The algorithm starts with a quick plan and keeps improving it: it removes crossings, moves stops between vehicles and swaps entire route segments.

The task is called the traveling salesperson problem: find the shortest round trip that visits every stop exactly once. When vehicles with different capacities are added, it becomes a delivery task with multiple vehicles (the Vehicle Routing Problem).

Exact methods, such as linear programming with cutting planes, can prove that the route found is the shortest. For large problems with many constraints, however, they can take a very long time.

In practice, heuristics are therefore used. They start with a quick plan, for example using the nearest-stop rule or the savings method. On its own, however, the nearest-stop rule gives routes about 25% longer than the optimum on average for randomly placed stops. Heuristics therefore keep improving the plan: they remove crossings, move stops between vehicles and swap entire route segments.

Metaheuristics such as simulated annealing, tabu search or repeated “ruin and recreate” help escape from plans that can no longer be improved by a small change. That is also how the algorithm in the game works.

The traveling salesperson problem is almost 200 years old

Sample round trips were already shown in a German handbook for traveling salesmen in 1832, and the problem was described mathematically by Karl Menger in 1930.

  1. 1832A German handbook for traveling salesmen shows sample round trips through Germany and Switzerland. No mathematics yet.
  2. 1857William Rowan Hamilton invents the Icosian puzzle: visit all 20 vertices of a dodecahedron and return to the start.
  3. 1930Karl Menger in Vienna describes the problem mathematically and notices that the nearest-neighbor rule does not give the shortest route.
  4. 1954Dantzig, Fulkerson and Johnson find and prove the shortest route through 49 cities in the USA.
  5. 1959Dantzig and Ramser describe the planning of tank trucks supplying gas stations. The vehicle routing problem is born.
  6. 1964Clarke and Wright introduce the savings method, which many route planners still build on today.
  7. 1972Richard Karp shows that the problem is NP-hard. To this day, no fast algorithm for all cases is known.
  8. 1976Christofides' algorithm guarantees a route at most 50% longer than the optimum.
  9. 2006A provably shortest route through 85,900 points from a chip design. The computation took more than 136 years of processor time.
  10. 2025A provably shortest walking route through 81,998 bars in South Korea, the largest problem solved on a real road network.