𝕏 in ⎘
← All posts

Engineering

Route optimization keeps improving. It still can’t see what drivers see.

5 Min Read
Two side-by-side maps of the same delivery route: the clean five-stop plan the routing system uses, and the same route covered in a driver’s handwritten notes about traffic, access codes and parking

One morning this summer, a box truck was idling at the curb outside our office, so I asked the driver what he thought of the route plan he’d been given. He told me he doesn’t follow it. His run includes a hospital where traffic backs up early and parking runs out, and handoffs there drag in the morning in a way they don’t later in the day. So he does his other stops first and circles back to the hospital. None of that is in the plan he gets each morning.

His plan wasn’t one of ours, but we hear some version of that answer from fleet after fleet. The driver is doing what the plan can’t: reading the road, adjusting, and remembering for next time. At Nash, autonomic is our word for a system that does all three on its own. It acts, learns, and acts better tomorrow than it did today, against the goal you set and inside the rules you define.

The solver is rarely the problem

Modern routing solvers are good at the math. Give one accurate inputs and you’ll get back near-optimal routes that respect every constraint. When a plan falls apart on the road, it’s usually because nobody told the solver something the driver or planner already knew.

The starting point: what our plans know, and what the driver knows

What our plans know at the startordersprovidedvansprovideddelivery windowsprovidedservice timeestimatedtravel timeestimatedrulesonly what was initially giventhe drivernever reachesthe planWhat the driver knowsthe hospital runjams before 9amthe hospital itselfslow to serve before 10amthe north sitedock is busy until 11amone customernever in on Mondaysthe depotback gate is fasterWhat our plans know at the startordersprovidedvansprovideddelivery windowsprovidedservice timeestimatedtravel timeestimatedrulesonly what was initially givennever reaches the planthe driverWhat the driver knowsthe hospital runjams before 9amthe hospital itselfslow to serve before 10amthe north sitedock is busy until 11amone customernever in on Mondaysthe depotback gate is faster
The plan before it learns anything from the road. Its shakiest estimates are the ones the driver could correct. An illustration, not a real route.

In our experience, what’s missing falls into three gaps: some rules never reach the solver, travel and service times are only estimates, and some patterns only drivers ever see. We’ve been working through them in that order.

Past plans show which constraints bend

Customers hand us their operating rules at onboarding: stop limits, start times, vehicle zones. Then we look at their past plans and often find those same rules broken, usually for good reason. Planners know which constraints are hard and how far the soft ones stretch. The rules file doesn’t.

When we pointed an AI agent at a customer’s spreadsheets, it turned their rules into 59 constraints in 13 minutes, each traced to the cell it came from. Then we check them against the customer’s past plans and go through every difference with their team. That conversation is usually where the real rules come out.

The rules file, the record, and the rule that holds

The rules file saysPast plans showSettled with their teamMax 14 stops per routefrom the rules file, row 6Busy depots run 16 stops14, or 16 at busy depotsVans leave by 7amfrom the rules file, row 3Some leave at 8am by agreement7am, or 8am with sign-offTrucks stay in their zonefrom the zones tabSome cross over on busy daysAdjacent zones on peak daysShifts last 9 hours at mostfrom the drivers tabLong routes run to 10 hoursHolds; long routes are splitMax 14 stops per routefrom the rules file, row 6past plansBusy depots run 16 stopssettled14, or 16 at busy depotsVans leave by 7amfrom the rules file, row 3past plansSome leave at 8am by agreementsettled7am, or 8am with sign-offTrucks stay in their zonefrom the zones tabpast plansSome cross over on busy dayssettledAdjacent zones on peak daysShifts last 9 hours at mostfrom the drivers tabpast plansLong routes run to 10 hourssettledHolds; long routes are split
The kinds of gaps we settle with a customer’s team. Either the bend becomes the rule or the plans change to meet it. Illustrative, not any one customer’s data.

A second agent builds a route plan from those constraints and flags anything that breaks one. A person still approves every plan it proposes before it goes out.

Recorded drives show where the map is wrong

Timing is the second gap, and his hospital run hits it twice. Our plans start from a road-network travel-time matrix, which knows the distance to the hospital and typical road speeds. It can’t see that the drive jams up before 9am, and no map is going to tell you the morning handoff drags.

To check the map against the road, we trained a model on recorded drives. It compares each actual drive time with the map’s prediction and learns where the two diverge by hour, day of week, and area. The map turned out to underestimate short hops and overestimate long drives, so no single fudge factor was ever going to fix it. On held-out drives the model cut typical travel-time error from 29% to 24%, and the map’s habit of predicting drives too short nearly disappeared. The biggest gain came on the shortest hops, where the map was furthest off. The model also held up on a second customer’s drives.

The map is most wrong on the shortest hops

road-network travel timeslearned from recorded drivesdistance between stopsshare of drives0%10%20%30%40%under 1 km31% of drives31%road network: 42.5%learned: 29.3%42%29%1–3 km38% of drives38%road network: 28.0%learned: 25.5%28%26%3–6 km15% of drives15%road network: 24.1%learned: 21.8%24%22%6–12 km9% of drives9%road network: 19.2%learned: 17.5%19%18%over 12 km6% of drives6%road network: 16.7%learned: 14.7%17%15%all drivesroad network: 29.2%learned: 24.3%29%24%typical error in predicted drive timeroad-network travel timeslearned from recorded drives0%20%40%under 1 km31% of drives · 42% → 29%road network: 42.5%learned: 29.3%1–3 km38% of drives · 28% → 26%road network: 28.0%learned: 25.5%3–6 km15% of drives · 24% → 22%road network: 24.1%learned: 21.8%6–12 km9% of drives · 19% → 18%road network: 19.2%learned: 17.5%over 12 km6% of drives · 17% → 15%road network: 16.7%learned: 14.7%all drives29% → 24%road network: 29.2%learned: 24.3%typical error
Typical (median) error in predicted drive time by distance between stops, on 78,895 held-out drives. Most delivery drives are short hops, so that is where the gain counts.

Service time needs its own model, because a stop is a lot more than the handoff.

The handoff itself took 40 seconds.What the plan saysservice time: 5 minWhat actually happensfind parking(lap 3)whichentrance?securitydesklift needsa badgethehandoffsignature fromsomeone on breakwalkbackdriver(huff)The handoff itself took 40 seconds.What the plan saysvs what actually happensplan5 minrealityfind parking(lap 3)which entrance?security desklift needs a badgethe handoffsignature fromsomeone on breakwalk backdriver(huff)
Five minutes is a unit of optimism.

Instead of a flat service time, our models predict each delivery’s duration from that address’s history, so a site that is always slow gets planned that way. His hospital is trickier, because it’s slow in the morning and quick later in the day, and an average hides exactly that. To get it right, the model needs the hour of the visit, not just the address.

Every new model has to survive a replay before it gets anywhere near a live plan. The replay is a backtest: it reruns a real week of one customer’s orders at production’s 15-minute planning cadence. With nothing changed, it assigned the same orders as production on all 112 shifts we tested.

The replay also showed us what caution costs. That customer pads its planned drive times on purpose, so plans assume vans drive slower than they actually do. It’s a sensible margin, but it also means turning away orders the vans could have carried. We replayed the week with the padding trimmed step by step. Once vans were planned 28% faster, the plans fit 29.7 orders per van-shift instead of 25.0, with no rise in unassigned orders. Push further and unassigned orders did rise, but only on quiet evening shifts. A near-empty route always looks like it has room, so order intake kept saying yes until the shift ran out of hours.

Planning closer to real speeds carries more orders

unassigned orders stay flatorders pervan-shiftorders leftunassignedall on quiet evening shiftstoday: 25.0 orders per van-shift25.0+10%: 26.8 orders per van-shift26.8+20%: 28.7 orders per van-shift28.7+28%: 29.7 orders per van-shift29.7+40%: 31.4 orders per van-shift31.4+55%: 32.9 orders per van-shift32.9today: 0.22% of committed orders unassigned0.22%+10%: 0.06% of committed orders unassigned0.06%+20%: 0.24% of committed orders unassigned0.24%+28%: 0.20% of committed orders unassigned0.20%+40%: 0.53% of committed orders unassigned0.53%+55%: 0.66% of committed orders unassigned0.66%today+10%+20%+28%+40%+55%planned speed with padding trimmed, vs todayunassigned stays flatorders per van-shiftunassigned ordersall on quiet evening shiftstoday: 25.0 orders per van-shift25.0+10%: 26.8 orders per van-shift26.8+20%: 28.7 orders per van-shift28.7+28%: 29.7 orders per van-shift29.7+40%: 31.4 orders per van-shift31.4+55%: 32.9 orders per van-shift32.9today: 0.22% of committed orders unassigned0.22%+10%: 0.06% of committed orders unassigned0.06%+20%: 0.24% of committed orders unassigned0.24%+28%: 0.20% of committed orders unassigned0.20%+40%: 0.53% of committed orders unassigned0.53%+55%: 0.66% of committed orders unassigned0.66%today+10%+20%+28%+40%+55%planned speed with padding trimmed, vs today
The same week at eight sites, replayed with the drive-time padding trimmed in steps. It covers the 110 shifts that ran at every setting. These are planning-time results, and on-time performance at each speed is checked separately.

Next, the plan learns from the road

Most fleets already record taps and timings at every stop. The data is noisy, and it needs real cleanup before it can teach a plan anything. But if a hospital like his is slow to serve before 10am most mornings, the plan should learn that from recent visits. It can then schedule the hospital later, the way he already does.

The autonomic cycle: how the road reaches the plan

what our plans knowconstraints · service times · travel timesWrite down the rulestraced to the source fileCheck every planbreaches are flaggedA person approvesevery agent planRun and recordtaps and timings per stopLearn from the roadtravel-time model trainedTest on replayed weeksbefore any change shipsthe driverliverolling outnextliverolling outnextWrite down the rulestraced to the source fileCheck every planbreaches are flaggedA person approvesevery agent planRun and recordtaps and timings per stopLearn from the roadtravel-time model trainedTest on replayed weeksbefore any change shipsthe driver
Four steps are live, one is rolling out, and learning from the road comes next. Anything the road teaches us must pass a replayed week before a plan relies on it.

Next we put the travel-time model into every plan, one replayed week at a time, with stop timings close behind. We keep learning new things about this problem, and it’s not one anyone solves alone. If any of this sounds familiar, reach out and tell us what you’ve learned. And when a plan finally knows about his hospital mornings, maybe the driver outside our office will actually follow it.

See it run

Built for the reality of logistics.

15 minutes. Real ops, your data.

Get a demo