The route crosses itself twice and the driver has already resequenced it
In short
A stop sequence that looks illogical on a map is usually obeying something the map cannot draw — a time window, a one-way system, a loading order. Replay the route with the binding constraint named on every leg: legs with a reason are correct and need explaining, legs with no constraint are cost artefacts needing a longer search or a better matrix.
Key takeaways
- A map draws distance. It cannot draw a time window, a turn ban, a loading order or a school-run peak, which is where most apparent detours come from.
- Replay every leg with its binding constraint attached. A leg with a named reason is correct; a leg with no constraint at all is where the search or the matrix failed.
- Travel time is asymmetric. Sample 25 pairs both ways: a median gap above roughly 10 per cent means a mirrored matrix is planning routes that cannot be driven that way.
- The fix for the arguable kind is one line of text per stop, generated from the constraint record — not a better plan and not a training session.
- Never let a model invent the explanation. It phrases what the solver recorded; anything else is a plausible sentence with no relationship to the plan.
Most sequences that look wrong are right, and the ones that are genuinely wrong look identical from the cab. The separation is mechanical: replay the plan leg by leg and, for each one, record which constraint was binding at the moment the solver committed to that order. Legs that come back carrying a reason — a window that closes at 12:30, a turn that is banned, a cage that has to come off last — are correct and are being argued about because nothing on the driver's screen says so. Legs that come back with no binding constraint at all are pure cost decisions, and those are the ones worth looking at.
The distinction matters because the two failures have opposite remedies. The first is fixed by explanation and stays fixed. The second is fixed by a longer search or a more honest travel-time matrix, and re-running the optimiser on the first kind produces the same sequence and a driver who now trusts it less. This is the point in routing, dispatch and optimisation where an engineering problem turns into a communication problem without anyone announcing the transition.
Replaying the route with a reason on every leg
The replay is a checker, not a solver. Take the published sequence, walk it forwards accumulating clock time and load, and at each transition record what would have gone wrong had the next-nearest unvisited stop been served instead. Four fields per leg are enough: the reason class, the constraint that bound, the value that bound it, and the penalty the alternative would have incurred.
| Reason class recorded | What the alternative would have cost | Verdict |
|---|---|---|
| Time window | Arrival at 14:52 against a window closing at 14:30 | Correct. Explain it and stop re-optimising |
| Loading order | The cage for stop 19 sits behind four others | Correct. The physical constraint outranks the map |
| Turn restriction or one-way system | The nearer stop is 400 metres away and 11 minutes by road | Correct. The map's straight line is not a road |
| Traffic at that hour | The same leg is 9 minutes at 06:30 and 26 minutes at 08:15 | Correct if the matrix is time-dependent; suspect if it is not |
| No binding constraint | The alternative is cheaper on every dimension | Genuinely wrong. Search artefact or bad matrix |
A map draws distance. Nearly everything that decides a delivery sequence is invisible on one.
Asymmetry: the property that makes a sensible map look mad
Travel time between two points is not the same in both directions, and in dense urban networks it is routinely not close. One-way systems, banned right turns, a central reservation, a bus gate: any of them can make the return leg twice the outbound. A matrix computed once and mirrored to halve the request count encodes an average of the two, which is a value that is wrong in both directions and wrong in a way that is invisible on a screen.
- Test it directly. Sample 25 stop pairs from a live route and request both directions. A median absolute difference above roughly 10 per cent means mirroring is materially distorting your plans, and in a historic town centre the figure is often far higher.
- Test time-dependence the same way. Request the same 25 pairs at 06:30 and at 08:15. A matrix built once at the wrong hour prices the whole afternoon incorrectly, and the tiering that fixes it without exhausting a provider quota is set out in building a travel-time matrix you can afford to rebuild every morning.
- Check the profile the matrix was built for. A matrix computed for a car and used to plan a rigid does not overestimate difficulty conservatively — it routes through roads the vehicle may not legally enter, and every leg is quietly optimistic.
Three tells that the sequence is genuinely bad
Once the replay is running, the genuinely bad legs identify themselves rather than being argued about. Three patterns account for nearly all of them.
- Self-crossing legs with no reason class attached. A construction heuristic left to stand, or an improvement phase cut short, leaves crossings that a local-search move would have removed. Extend the search budget on that one instance and see whether the crossing survives; if it does not, the plan was rushed rather than constrained.
- One stop sitting far outside its own cluster. Almost always a coordinate problem — a pin on the wrong side of a motorway, a postcode centroid, a unit number matched to the wrong building. Check the coordinate against the address before checking anything in the model.
- The same leg is chosen every day and drivers reverse it every day. If the replay attaches a reason and the drivers still reverse it, the recorded constraint is wrong rather than the sequence — a receiving hour that changed two years ago, or a service time that assumes a bay the site closed.
When testing whether a driver's own order was genuinely faster, compare against their recorded trace rather than against your model — and treat the trace carefully. A stationary vehicle produces position noise that a naive comparison reads as travel, inflating the driver's apparent time, which is the failure mode described in a parked truck that keeps moving.
One line of text under each stop, and the argument stops
The deliverable from all of this is not a better plan. It is a sentence per stop on the driver's list, generated from the replay: "Before stop 41 — 41 closes at 12:30". "After stop 12 — cage order". "No turn from Mill Street". Short, specific, and derived from the constraint that actually bound. Drivers do not need the objective function; they need to know that somebody knew about the thing they can see out of the windscreen.
Loading order deserves its own treatment on that list, because it is the constraint drivers accept instantly and planners forget entirely. A plan that is feasible on weight and volume can still be physically impossible to unload in the order it specifies, and the modelling that avoids it is in modelling weight, volume, pallets and cages together.
What an explanation will not settle
- A constraint the driver knows is false. If the window on the screen is wrong, explaining it more clearly makes the plan less credible rather than more. Route the correction back into the stop record, with a name and a date attached.
- A desk that has already rebuilt the plan. Drivers resequencing and dispatchers resequencing are different symptoms with different causes, and the second is diagnosed by logging the edits rather than by annotating the legs.
- The question of who may deviate. An explanation surface makes deviation an informed choice, which is progress, but somebody still has to decide whether a driver may reorder a route and what happens to the promised windows when they do — the governance staged in putting an optimiser on a manual dispatch desk.
- Whether the plan was good. Explanation makes a plan legible, not correct. Keep measuring planned against actual, because a plan that is fully explained and consistently 20 minutes optimistic is still a plan nobody can keep.
Generating and shipping these annotations is a small, well-bounded piece of operations automation: a checker beside the solver, four fields per leg, one string rendered into the driver app. It is also the cheapest trust the plan will ever buy, and in most logistics and mobility rollouts it does more for adoption than another round of tuning.
Frequently asked questions
Short answers to the follow-ups this page tends to raise.
Why does the optimised route double back on itself?
Almost always because something other than distance is binding on that leg — a time window that opens or closes, a load that must come off in a fixed order, a turn restriction, or traffic at that specific hour. A map draws distance and none of those, so a correct plan can look absurd. Replay the route with the binding constraint recorded per leg and the doubling-back either has a reason or it does not.
Should drivers be allowed to reorder their stops?
Only once they can see why the order is what it is, otherwise every deviation is a guess about a constraint they cannot see. Ship a one-line reason under each stop generated from the solver's own record, then decide the policy separately — including what happens to promised windows when a driver deviates, which is a commercial question rather than a routing one.
How do I know whether the travel-time matrix is causing the strange sequence?
Sample around 25 stop pairs and request each direction separately, then request the same pairs at two different hours. A large gap between directions means a mirrored matrix is distorting the plan; a large gap between hours means a single static matrix is pricing part of the day wrongly. Both produce sequences that look irrational and are, from the model's point of view, entirely rational.
Can an AI explain why a route was sequenced that way?
It can phrase an explanation, but it must never generate one. The reason has to be emitted by the solver or a replay checker from the constraint that actually bound, with the value attached; a model handed a finished route will produce a fluent guess that is impossible to verify and that discredits the whole surface the first time a driver catches it out.
- route optimisation
- driver apps
- sequencing
- explainability
The work behind this page
Builds from our portfolio that this page draws on.
Read next
- The travel-time matrix: the input that decides the planThe solver never sees a road. It sees a table of durations between every pair of stops, and every mistake in that table becomes a plan that cannot be driven.definition
- The optimiser made a plan and the desk rebuilt it by hand before eightSystematic override is not resistance to change. It is an unwritten requirements document being typed into your software every morning, one drag-and-drop at a time.diagnostic
- Service time: the minutes at the kerb that decide the planEvery route plan carries an assumption about how long a stop takes. In most fleets it is one number, applied everywhere, and nobody has ever measured it.definition
- The plan came back complete and forty stops are not in itA solver that reports success while leaving forty stops unassigned is answering a different question from the one you asked. Relaxing one constraint family at a time tells you which.diagnostic
- The solve still has not finished and the first van is loadedMost teams tune the solver and wait longer. In production systems the matrix is usually the slow half, and no search parameter touches it.diagnostic
- Vehicle profile: why a car route and a truck route are different networksA consumer navigation route given to a heavy vehicle is not a rough version of the right answer. It is a route through roads the vehicle is not allowed to use.definition
Working on something in this space?
Tell us where you are in a sentence or two. We'll tell you honestly whether we're the right team, and what a sensible first slice of the work looks like.
Start the conversation