Skip to content
← All work

Cutting dispatch planning from 3 hours to 20 minutes

A dispatch team was planning 140 daily deliveries in a spreadsheet. We replaced it with a routing service and a screen the planners actually wanted to use.

Client
Lagoon Logistics
Year
2026
Discipline
Software
Published
14 May 2026

Stack

  • Next.js
  • TypeScript
  • Postgres
  • OR-Tools
  • Fly.io

Planning time down 89%. Fuel spend down 14% in the first quarter.

The problem

Every morning a two-person team spent three hours assigning 140 deliveries to 18 vans. The tool was a spreadsheet that had grown for six years. It worked, mostly, and it lived in one person's head — which was the actual risk.

What we found in the scoping week

The routing maths was not the hard part. The hard part was that the planners had a dozen rules nobody had written down: which driver knew which neighbourhood, which customers would refuse a delivery after 3pm, which van couldn't take the coast road.

An optimiser that ignores those rules produces routes that get overridden by hand, which is worse than no optimiser at all. So we spent the first week writing the rules down.

What we built

  • A constraint solver that takes the written rules as hard and soft constraints
  • A planning screen showing proposed routes on a map, with every override logged
  • An override review, so rules the planners keep breaking get promoted into the model

Why no AI here

The client asked about AI in the first call. The honest answer was that this is a constraint satisfaction problem with a known-good solver, and a language model would have been slower, more expensive, and non-deterministic. We said so and built the boring thing.

Result

Planning now takes about 20 minutes. Fuel spend fell 14% in the first quarter, mostly from fewer backtracking routes. The rules are in version control instead of one person's memory.