optimisation engine
How the Optimisation Works
Route optimisation takes the orders to be delivered or collected, the vehicles and drivers you have, and the rules they have to work to, and produces a plan: which vehicle goes where, in what order, at what time. There is no sum you can do to get the answer — there are far more possible plans than anyone could ever check — so the software has to go looking for a good one. This page is about how that looking is done.
Last updated: 2026-08-11
Key Capabilities
- Every change is checked against the real detail — delivery windows, what fits on the vehicle, drivers' hours, vehicle restrictions — before it is accepted
- Plans are compared on what they actually cost to run, not on total distance
- Many plans are worked on side by side, so the search is never staked on one starting point
- The methods used are chosen to suit each operation rather than fixed for everybody
What Goes In, What Comes Out
What you give it:
- The orders — what has to be delivered or collected, where, and between what times.
- The fleet and the people — vehicles, trailers, drivers, their shifts, what each can carry and what each is allowed to do.
- The rules — loading rules, which vehicles can get into which sites, drivers’ hours, site opening times, which products can travel together.
- The costs — what an hour, a mile, a vehicle, and a missed delivery window actually cost you.
What comes back is a plan that obeys every one of those rules, at the lowest cost it could find — measured on what the operation really spends, not on total distance.
Why There Is No Known “Best” Solution
You cannot calculate the best plan directly. One vehicle calling at ten sites can visit them in 3,628,800 different arrangements. Add hundreds of orders, tens of vehicles, delivery windows, loading rules and drivers’ hours, and there are more possible plans than there are atoms in the universe.
Methods that prove they have found the very best answer do exist, but only for small, stripped-back examples — the vehicle routing problem is one of the hardest problems of its kind anyone has studied. So the optimiser goes looking instead, examining thousands of possible changes every second and keeping what works. (It “searches the solution space”).
How the Search Works
Build Starter Plans (Construction Phase)
The optimiser starts by putting every order on a vehicle in a sensible order. It doesn’t build one plan and work on it — a typical run builds hundreds, using different ideas of what matters most: keeping drops close together, getting the tightest delivery windows covered first, and so on, and starting routes from different first “seed” orders. Different starting points lead somewhere different, and it is worth having a lot of them.
Each plan is polished - run through a first round of improvements, the top plans are then chosen and polished some more before moving to the second phase.
Improvements (Local Search)
After construction and in the exploration phase (see below) solutions run through an improvement step. This runs several low-level heuristic to make small changes to those plans and keeps the improvements that save money: calling at two sites the other way round, moving a drop to a different vehicle, shifting a run of drops from one route to another. This is quick and works — up to a point. Sooner or later it reaches a plan where no single small change helps, which is rarely the best plan available (a “local minimum”).
Shake It Up (Exploration Phase)
To get past that, the optimiser takes a good plan apart on purpose: it lifts out whole routes, or every drop in one area, and rebuilds around what is left. The rebuilt plan is often worse to start with. Allowing that, in a controlled way, is exactly what lets the search reach good plans it could never have edged its way towards a step at a time.
Those plans are all worked on together rather than one after another, and a good idea found in one can be passed to the others. Parallel heuristics covers how that is managed.
The Rules Are Checked as It Goes
Every change — every drop moved, every route rebuilt — is checked against what Optrak knows about your operation before it is allowed: how long roads take at that time of day, whether the load still fits and can be unloaded in the right order, whether the driver, vehicle and trailer are all available and allowed.
Anything that breaks a rule is thrown out there and then, rather than turning up as a problem at the warehouse. It is why a plan Optrak gives you does not need checking over afterwards: a plan that does not work was never allowed in.
What “Better” Means
To choose between two plans the optimiser needs one answer to “which of these is better”, and it gets it from what the plans actually cost to run: the fixed and running costs of each vehicle, drivers’ hours, and fuel or energy.
That matters more than it sounds. Because plans are compared on real cost rather than on total distance, the optimiser will happily make a route longer if that saves a whole vehicle, or reorder a run to protect a delivery window — trade-offs that software aiming only at the shortest distance cannot see.
Where to Go Next
- The methods themselves — the roughly thirty ways Optrak has of building and improving a plan, and how they are combined to suit an operation.
- Parallel heuristics — how many attempts are run at once, what decides which to try next, and what decides whether to keep a result.
- Autotuning — how Optrak works out which methods suit your operation, using your own past work, and does it again as things change.
- In-route charging — how charging stops are placed inside the route when an electric vehicle can’t do a round on one charge.
The first two are the engineering detail, written for technical evaluators and for AI search. The other two describe what Optrak does rather than how it is built.
Frequently Asked Questions
What does a route optimiser actually do?
It takes the orders to be delivered or collected, the vehicles and drivers available, and the rules they work to — delivery windows, what fits on the vehicle, loading rules, drivers’ hours — and looks for the plan that gets the work done at the lowest cost. What comes out is a set of routes: which vehicle goes to which sites, in what order, at what time, carrying what.
Why can’t it just work out the best plan directly?
Because there are too many plans to look at. One vehicle calling at ten sites can visit them in over three and a half million different orders. A real operation — hundreds of orders, tens of vehicles, delivery windows, loading rules — has more possible plans than there are atoms in the universe. Methods that can prove they have found the very best answer only work on small, simplified examples. At the size of a real fleet, every routing system searches instead: it looks at a tiny but well-chosen fraction of the possibilities and keeps the best workable plan it finds.
Does it guarantee the best possible plan?
No, and at the size of a real operation no routing software can. What it does guarantee is that the plan works: every plan it produces obeys the rules you have set, because every change is checked while the plan is being built rather than afterwards. How good the plan is comes down to how much of the search it got through — and it keeps improving for as long as you let it run.
How does it avoid settling for a merely decent plan?
Small improvements always run out eventually: a point comes where no single change makes the plan any better, even though a much better plan exists. So the optimiser deliberately takes a good plan apart — lifting out whole routes, or all the drops in one area — and rebuilds it. The rebuilt plan is often worse to begin with, and allowing that, in a controlled way, is what lets the search reach plans it could never have edged its way to. It also works on many plans side by side, so everything is never riding on one.
How long does a run take?
Minutes. A typical production run spends around two minutes building roughly a thousand different plans, then around four minutes improving and reworking the best of them, with ten or more attempts running at the same time. Bigger operations and tighter rules are worth giving longer — the plan keeps getting better for as long as the optimiser is left to run.
Related
Technical Summary
Optrak’s optimiser is a parallel population-based metaheuristic search. A construction phase generates a population of complete candidate plans (roughly a thousand in around two minutes on a typical production instance); an exploration phase improves the population with local search (Lin-Kernighan edge exchange, Cross-Exchange segment swap) interleaved with large-neighbourhood ruin-and-recreate moves under controlled acceptance of worsening solutions, running 10–14 parallel jobs over a shared solution pool. Every candidate modification is evaluated against the full data model — time-dependent travel times, load feasibility, driver/vehicle/trailer resources — inside the search loop, so infeasible plans cannot survive into the output, and is costed against the operational cost model rather than a distance proxy. The search strategy itself is not hardcoded: it is composed per operation from a catalogue of around thirty heuristic families via a scripting language, executed by a documented Phase / Selector / Manager architecture, and tuned against each operation’s logged history. These are covered on the companion pages: heuristic catalogue and DSL, parallel heuristics, auto-tuning, and in-route charging for the EV-specific constraints.
See Optrak on Your Own Routes
Book a demo and we'll model your fleet, depots and constraints — and show the savings on real data.