AI Route Optimization: How It Works and What It Saves
Turn this article into takeaways for your work.
Each assistant summarizes the article only for you and suggests best practices for your work.
AI route optimization is software that decides which vehicle visits which stops, in what order and at what time, so that a fleet meets its constraints (capacity, time windows, driver hours) at the lowest cost in miles, minutes or missed commitments. Most of the "AI" in it is classical optimization: a solver searching for good routes. Machine learning usually helps around the solver, by predicting travel times, service durations and cancellations, and sometimes by guiding the search itself.
This is a spoke in the logistics group of the AI for Operations collection. For the wider picture of moving goods with AI, start with the hub, AI in logistics. This piece goes deep on one question: how routes get planned, and how you'd know the plan is better than what your dispatcher does today.
Key Facts
- The vehicle routing problem (VRP) generalizes the traveling salesperson problem from one vehicle to many, and real versions add limits such as vehicle capacity and customer time windows (Google OR-Tools).
- Routing problems are inherently intractable: 10 locations allow 362,880 possible routes and 20 allow about 2.4 x 10^18, so for large instances solvers return good routes, not provably optimal ones (Google OR-Tools).
- UPS says eliminating one mile per driver per day is worth $50 million a year, and one minute is worth $14.6 million (Transport Topics).
- UPS expects its ORION system to cut 100 million miles and 10 million gallons of fuel a year, worth $300 to $400 million in the US, on routes that average about 120 stops (Transport Topics). These are the company's own expectations, reported in 2016.
- The common thread: savings come from many small decisions made consistently across every route, every day, not from one dramatic shortcut.
What Route Optimization Actually Solves
Start with the plain problem. You have a depot, a list of stops and a set of vehicles. You want to assign stops to vehicles and sequence them. With one vehicle that's the traveling salesperson problem. With several, it's the vehicle routing problem, and the official OR-Tools documentation describes it as the goal of finding optimal routes for multiple vehicles visiting a set of locations (Google OR-Tools).
Notice what "optimal" means there. It depends entirely on the objective you choose. If you only minimize total distance, the cheapest answer is often to send one vehicle everywhere. That's why real systems pick objectives like the length of the longest route (to balance workloads), total cost, or a weighted mix of distance, time and late-arrival penalties. Choosing the objective is a management decision, not a technical one, and it's where many projects quietly go wrong.
The VRP family
Real operations rarely match the textbook problem, so the VRP comes in named variants. The ones you'll hear most:
| Variant | The extra rule | Where it shows up |
|---|---|---|
| Capacitated VRP (CVRP) | Each vehicle can carry a limited load | Parcel and freight delivery |
| VRP with time windows (VRPTW) | Each stop must be served within a set interval | Appointment deliveries, field visits |
| Pickup and delivery | A pickup must happen before its matching drop-off | Couriers, returns, shared freight |
| Heterogeneous fleet | Vehicles differ in capacity, cost or skills | Mixed vans and trucks, technician teams |
| Dropped visits with penalties | Some stops may be skipped at a cost | Peak days when demand exceeds capacity |
OR-Tools covers capacity limits, time windows, resource constraints and dropped visits with penalties, which is a fair picture of what a serious routing engine must handle (Google OR-Tools).
How the Algorithms Work
A routing engine works in three stages. You can follow them without any math.
1. Model the rules. Constraints become numbers the solver can track along a route. Capacity is modeled as a load that accumulates stop by stop and can't pass the vehicle's limit; the OR-Tools capacitated example does exactly this with a demand per location and a capacity per vehicle (Google OR-Tools). Time windows work the same way with a running clock. The solver must allow waiting time at a stop when a vehicle arrives early, and each stop's window limits when the clock can read at arrival (Google OR-Tools).
2. Build a first plan quickly. Fast construction heuristics produce a decent starting set of routes. Documented options include cheapest-arc path building, insertion methods, the savings algorithm and sweep (Google OR-Tools).
3. Improve it by local search. The solver then makes small changes, such as moving a stop to another route or swapping two stops, and keeps changes that help. To avoid getting stuck, it uses metaheuristics like guided local search, simulated annealing or tabu search. The OR-Tools documentation calls guided local search generally the most efficient metaheuristic for vehicle routing (Google OR-Tools).
Two honest consequences follow. First, you set a time limit, because the search could go on indefinitely. Second, the answer is a very good plan, not a proof of the best possible plan. If a vendor promises "the optimal route" for a large, constrained fleet, ask what they mean.
Classical optimization versus machine learning
These two get blurred in marketing, so separate them.
Classical optimization (heuristics, metaheuristics, exact methods on small problems) searches for the best plan given known inputs. It's explainable: you can see which constraint forced a choice. It does the heavy lifting in nearly every production routing system.
Machine learning predicts things the solver needs as inputs, or guides the search. Typical jobs: estimating real travel times by hour and road, predicting how long a stop will take (a doorstep drop versus a loading dock), forecasting daily order volume, and scoring the odds a customer will be home. Researchers also study using learned models inside the optimization itself. A well-known survey by Bengio, Lodi and Prouvost notes that state-of-the-art combinatorial optimization algorithms depend on hand-designed heuristics for decisions that are too costly to compute exactly, and argues learning could make those decisions in a more principled way (arXiv). That's a research direction, not a reason to expect a neural network to replace the solver at your depot next quarter.
A useful rule: the better your predictions of travel and service time, the better a plain solver performs. Fixing a bad assumption about stop duration often saves more than swapping the algorithm.
Real-Time Re-Routing
Static planning builds routes once, before the vehicles leave. Real-time re-routing updates them as the day unfolds. The reasons to do it are mundane: a vehicle breaks down, a customer cancels, a rush order arrives, traffic stalls a corridor.
UPS shows how recent this shift is for even the biggest operators. Its ORION system produced a route that stayed static once the driver set out in the morning, and the company said it planned to add dynamic routing that updates through the day (Transport Topics). Static planning alone was worth a great deal at that scale.
If you're considering dynamic re-routing, plan for these trade-offs:
- Stability versus optimality. Re-optimizing everything every few minutes can reshuffle a driver's day for a tiny gain. Most teams re-plan only the affected stops, or only when the projected loss crosses a threshold.
- Trust. A driver who sees the sequence change without a reason stops following it. Show why.
- Compute and data freshness. Re-routing needs live positions and event feeds. Without them it's guessing.
What Data You Need
Route optimization is hungry for plain, boring operational data. A workable starter set:
| Data | Why the solver needs it | Common problem |
|---|---|---|
| Geocoded addresses | Distances and travel times | Bad or ambiguous addresses |
| Delivery or visit windows | Time-window constraints | Windows stored as free text |
| Order size, weight or volume | Capacity constraints | Missing or default values |
| Vehicle and driver rules | Capacity, skills, shift and break limits | Rules held in dispatchers' heads |
| Historical travel times | Realistic time matrix | Only averages, no time-of-day view |
| Service time per stop | Realistic schedules | One number used for every stop |
| Completed-route records (GPS, timestamps) | Learning and measuring | Plans never compared with what happened |
Notice the last row. Without a record of what actually happened, you can't improve the estimates or prove savings. The collection's piece on operational data for AI covers how to get these basics into shape.
Routing Across Functions
The same engine shows up in different jobs, with different constraints.
- Parcel and last-mile delivery. Hundreds of stops per day, tight capacity, narrow delivery windows. Gains come from sequence quality and clustering of nearby stops. UPS says a typical route has about 120 stops, and that ORION sometimes skips nearby stops and returns later because that's cheaper overall (Transport Topics).
- Field service and installation. Technicians have skills and parts, jobs have appointment windows and uncertain durations. See AI field service scheduling for the scheduling side.
- Sales and merchandising territories. Reps visiting accounts on a rolling cycle. The question is less "shortest path" and more "which visits are worth the drive." Our guides on route time management and beat route journey planning show how field teams think about this.
- Distribution networks. Routing sits inside a bigger design of depots, lanes and service levels, covered in logistics and distribution optimization.
- Fleet operations. Routes interact with vehicle condition, fuel and driver hours. See AI fleet management.
Illustrative Example: A Regional Food Distributor
This scenario is hypothetical, to show the method and not to promise a result.
A distributor runs 12 vans delivering to restaurants. Dispatchers build routes each afternoon from experience, and drivers know their patches well. The operations manager wants to know whether software can do better, and what "better" would be worth.
She starts with the data: addresses cleaned and geocoded, each customer's receiving window recorded, and three months of GPS records showing real stop times. She notices that unloading at large restaurants takes far longer than the 10 minutes everyone assumed, which already explains late deliveries. After correcting service times by customer, she runs the optimizer on ten past days and compares its plans with what dispatchers actually ran, using the same stops and the same vans.
The software plans fewer total miles on most days, but on two days it produces routes drivers call unworkable because it ignores a bridge weight limit. She adds that as a vehicle rule, re-runs and then pilots the plan on three vans for four weeks while the other nine run as before. The result is a comparison on the same metrics, not a feeling. Nothing in that story required advanced learning. It needed clean data, a baseline, a missing rule found by people who knew the roads, and a controlled test.
How to Implement Route Optimization, Step by Step
- Write down the objective in business terms. Lowest cost per stop? Fewest late deliveries? Balanced workloads? Rank them. The solver will trade them off exactly as you weight them.
- Capture the constraints people actually follow. Interview dispatchers and drivers. Weight limits, no-go streets, customer quirks and break rules are rarely in a system.
- Fix the data. Geocode addresses, structure delivery windows and measure real service times by stop type.
- Record your baseline. For two to four weeks, log planned versus actual miles, hours, overtime, late stops and fuel for current routing.
- Replay history first. Run the optimizer on past days with the same stops and vehicles. It costs nothing in operations and exposes missing rules fast.
- Pilot on a slice. Use a few vehicles or one depot, with the rest as a control group. Keep a dispatcher in the loop who can override and must record why.
- Decide the re-routing policy. Choose which events trigger a re-plan and who can approve changes during the day.
- Measure, then widen. Expand only after the pilot beats the control on the metrics you set in step 1.
Measuring the Savings
Savings claims are easy to inflate. Use a method that survives a skeptical finance review.
Compare like with like. Plan the same stops with the same vehicles two ways, or run a control group in parallel. Comparing this month's routes with last month's mixes in seasonality and volume.
Measure what happened, not what was planned. A plan that saves 8 miles on paper means little if drivers deviate. Use GPS and timestamps from completed routes.
Track a small set of metrics together:
- Miles and drive hours per stop
- Stops per route-hour
- On-time delivery rate against the promised window
- Overtime hours
- Fuel use per route
- Failed or rescheduled deliveries
- Dispatcher planning time
Price the result at your own numbers. Because the economics scale with route volume, even tiny per-route changes matter. UPS puts a value of $50 million a year on one mile per driver per day across its US operation (Transport Topics). Your fleet is smaller, so run your own arithmetic: miles saved per route, times routes per year, times your cost per mile. And remember that cost per mile and the cost of a late delivery aren't the same kind of number, so price both.
Pitfalls to Avoid
Optimizing the wrong objective. Minimizing distance alone can overload one driver and starve another. Include workload balance and lateness in the objective.
Hidden constraints. If the model doesn't know about the weight-limited bridge, the best route on paper is a bad route in practice. Ask drivers what the system gets wrong.
Garbage addresses and stop times. A single default service time for every stop makes every plan look cleaner than reality.
Ignoring the people. UPS notes that drivers see just the sequence while planners see more, and that it encourages drivers to use their own judgment (Transport Topics). Treat driver feedback as input to the model, not resistance to it.
Over-trusting "optimal." For large, constrained problems the answer is a good plan found within a time limit. Compare it to your baseline instead of taking the label on faith.
Re-planning too often. Constant reshuffling frustrates drivers and can erase the gains. Set thresholds.
No owner for the plan after launch. Roads, customers and fleets change. Someone must own the rules, the data and the monitoring. A control tower view helps spot drift between plan and reality.
Where to Go Next
If you only do one thing, replay a month of past routes through an optimizer using your real constraints and see what it gets wrong. That single exercise shows you the data gaps, the hidden rules and a rough size of the prize, before you commit to anything.
Frequently Asked Questions about AI Route Optimization
What is AI route optimization in simple terms?
It's software that assigns stops to vehicles and sequences them to lower cost while respecting limits like load capacity, delivery windows and driver hours. Most of the work is done by optimization algorithms, with machine learning often used to predict travel and service times.
Is route optimization really AI, or just math?
Mostly math, and that's fine. Routing engines search for good plans using heuristics and local search, techniques from operations research. Machine learning adds value by predicting inputs such as travel time and stop duration, and researchers are studying ways to use it inside the search itself.
Does the software find the best possible route?
For small problems, sometimes. For large ones it finds a very good route within a time limit. Routing problems grow explosively: 20 locations already allow about 2.4 x 10^18 possible routes, so solvers settle for good solutions rather than proven optimal ones.
How much does route optimization save?
It depends on how good your current routing is and how many routes you run. UPS says one mile less per driver per day is worth $50 million a year across its operation, which shows how small changes add up at scale. Measure your own baseline and pilot against it instead of borrowing someone else's percentage.
What data do I need to start?
Clean geocoded addresses, delivery windows, order sizes, vehicle and driver rules, historical travel times and real service times per stop. Records of completed routes with GPS and timestamps matter most, because they let you compare plans with reality.
When does real-time re-routing make sense?
When your day regularly changes after dispatch, through cancellations, rush orders, breakdowns or traffic. Re-plan only the affected stops or when the projected loss passes a threshold, and show drivers why a sequence changed so they keep following it.

Senior Operations & Growth Strategist
On this page
- Key Facts
- What Route Optimization Actually Solves
- The VRP family
- How the Algorithms Work
- Classical optimization versus machine learning
- Real-Time Re-Routing
- What Data You Need
- Routing Across Functions
- Illustrative Example: A Regional Food Distributor
- How to Implement Route Optimization, Step by Step
- Measuring the Savings
- Pitfalls to Avoid
- Where to Go Next