On this page
01
What is route optimization?
Route optimization is choosing the best order to visit a set of stops, given where you start and where you need to end. "Best" usually means the shortest distance or the least driving time. For a business with several vehicles it also means deciding which vehicle visits which stops.
It works alongside navigation, not instead of it. Your navigation app finds the best roads from one stop to the next; route optimization decides which stop comes next. The two get confused because both end with a line on a map.
02
What happens when you press Optimize?
Every route optimizer, from a free web tool to an enterprise dispatch system, runs some version of the same four steps.
| Step | What it does | Why it matters |
|---|---|---|
| 1. Geocoding | Turns each address into a latitude and longitude | A wrong pin gets a perfect route to the wrong place |
| 2. Distance matrix | Measures the distance, or time, from every stop to every other stop | Every order is scored with these numbers |
| 3. Ordering | Searches for the order with the least total distance or time | This is where the savings come from |
| 4. Directions | Follows real roads for the chosen order and measures each leg | Turns an order into a route you can drive |
1. Geocoding
Each address is matched against a database of streets and address points and becomes a pair of coordinates. It's the step people forget and the one behind most bad routes: a stop pinned in the wrong town drags the whole order with it. See why addresses land in the wrong place.
2. The distance matrix
Next comes a table of the distance between every pair of stops: 20 stops make a 20 × 20 grid with 380 entries that matter. Some optimizers fill it with road distances or drive times from a routing service. Others use straight-line distance, which is instant and ranks nearby stops much the same way in built-up areas. Road-based tables take longer to build and handle rivers, highways and one-way systems better.
3. Ordering
The hard part: finding a short order without checking every possible one. The next section covers how.
4. Directions
Finally the chosen order goes through a road-routing engine, the same kind your navigation app uses, which returns the line along real roads, the length of each leg and an estimated driving time.
03
How do optimizers find a good order so fast?
They don't try every order; there are far too many. A round trip through 15 places already has over 43 billion. Instead they use heuristics: methods that build a good route quickly and then improve it, trading a guarantee of perfection for an answer in a moment that's usually very close to the best.
- 1
Build a first route
Nearest neighbour starts at the base and always drives to the closest stop not yet visited. It's quick and sensible but greedy: it tends to leave scattered stops for the end, and the route crosses itself. Insertion methods instead grow a loop by adding each stop where it costs the least.
- 2
Improve it with swaps
2-opt takes two legs of the route and reverses the stretch between them whenever that makes the trip shorter. That removes crossings, and it repeats until no swap helps. Or-opt moves a short run of one to three stops to a better spot in the route.
- 3
Search further, if there's time
Heavier methods such as Lin–Kernighan, best known through the LKH program, chain many swaps together. Metaheuristics like simulated annealing, tabu search and genetic algorithms sometimes accept a worse route on purpose to escape a dead end. Exact solvers can prove the best possible route, at a much higher cost in computing time.
04
How much does route optimization save?
It depends on how scrambled the stops were to begin with. Across our 48 example routes of 7–12 stops on real roads in 24 cities, optimizing stops that started in a random order cut the distance by a median 39% and the driving time by a median 36%.
- Median distance saved
- 39%
- Median driving time saved
- 36%
- Example routes measured on real roads
- 48
If you already order your stops carefully by hand, expect less: the optimizer mostly catches the odd crossing or doubled-back leg. The bigger the list and the less familiar the area, the bigger the gain. Put a dollar figure on it with the route cost calculator.
05
What's the difference between TSP and VRP?
The traveling salesman problem (TSP) is one vehicle visiting every stop once by the shortest route. The vehicle routing problem (VRP) brings in a fleet: several vehicles, and a decision about which stops each one gets. Real-world versions add rules on top, and every rule makes the problem harder to solve.
| Problem | The question it answers | Typical extra data |
|---|---|---|
| TSP | In what order should one vehicle visit these stops? | A start, and a round trip or a fixed end |
| VRP | Which vehicle visits which stops, and in what order? | Number of vehicles, a shared depot |
| Capacitated VRP | The same, without overloading any vehicle | Weight, volume or parcel counts |
| VRP with time windows | The same, arriving inside each customer's window | Appointment times, opening hours, shifts |
| Pickup and delivery | The same, collecting each item before dropping it off | Paired stops |
That's a big part of why routing software ranges from free to hundreds of dollars a month. One day's stops for one vehicle is quick work for a computer. Twenty vans with time windows and capacities is genuinely hard, and it needs data you have to keep up to date: windows, visit lengths, vehicle sizes.
06
What does EZRoutePlanner's optimizer do, and not do?
EZRoutePlanner solves the single-route problem: one route at a time, in the shortest order it can find. Press Optimize Route and the stops are ordered by nearest neighbour followed by 2-opt improvements, with your start kept fixed and the end either back at the start (Round Trip) or at a stop you've pinned last.
It compares orders using the straight-line distance between stops, which is quick enough to run in your browser as you work, then draws the result on real roads with the distance of every leg. Paid plans add drive times and directions that avoid highways or tolls. Where a river or a highway separates two stops that look close, glance at the order and move a stop by hand if the roads disagree.
| Handles | Doesn't handle |
|---|---|
| Up to 30 stops per route free, 200 on paid plans | Time windows or appointment times |
| A fixed start: your base or any address | Live traffic in the ordering |
| Round trips, or a pinned last stop | Splitting stops between drivers automatically |
| Several color-coded routes on one map (paid) | Vehicle capacity, weights or volumes |
| Every leg drawn on real roads with its distance | Driver shifts, breaks or scheduling |
For several drivers you make the split yourself: lasso each area on the map into its own route, then optimize each one. For a business with a few routes in a known area, that's often quicker than setting up a full VRP. See how to plan routes for multiple drivers.