AI route optimisation: from VRP solver to live dispatch
Last-mile delivery, field service, waste collection or courier networks: every route plan is at heart a Vehicle Routing Problem. We build custom AI route optimisation software that solves VRPTW, CVRP, dial-a-ride and multi-depot scenarios with OR-Tools, VROOM and Hexaly, fed by real-time traffic data from HERE, TomTom or Mapbox. The result: shorter routes, fewer empty kilometres, better ETAs and a dispatcher with time left over for exceptions.
Discuss your routing case View use casesWhat AI route optimisation is and isn't
Not every planning tool with a map attached is route optimisation. We build solutions that explicitly model the underlying combinatorial problem, and that problem has a name: the Vehicle Routing Problem.
Ever since Dantzig and Ramser formulated it in 1959, the Vehicle Routing Problem (VRP) has been one of the most studied optimisation problems in operations research. In practice it appears in dozens of variants. The Capacitated VRP (CVRP) accounts for the load capacity of each vehicle, the VRP with Time Windows (VRPTW) for customer arrival windows, the Multi-Depot VRP for multiple departure bases, the Pickup-and-Delivery Problem (PDP) for linked pickup and drop-off addresses, and the Dial-a-Ride Problem (DARP) for passengers who must be picked up and dropped off within travel-time quality standards. Each of them calls for a different solution strategy.
A VRP with twenty stops and one vehicle can be solved on a laptop. A daily plan for a fleet of sixty delivery vans with time windows, capacity limits, driving and rest time regulations and stochastic traffic information cannot. That is what solvers are for: open-source libraries such as OR-Tools and VROOM, or commercial engines such as Hexaly (formerly Localsolver). The trick is not in running such a solver, but in correctly modelling your operational reality and integrating the output into your existing planning and on-board computer stack.
"AI" appears in several places in this landscape. It is in the metaheuristics (simulated annealing, tabu search, Large Neighbourhood Search, genetic algorithms, Lin-Kernighan variants) that solvers use to find good solutions in limited time for problems where exact methods are too slow. It is in machine-learned ETA prediction based on historical journey times and real-time traffic. And it is in dynamic dispatching, where reinforcement learning or online optimisation decides how best to assign an incoming order to a moving vehicle without throwing the whole daily plan into disarray.
VRP variants we model
Choosing the right solver starts with the right problem formulation. Below are the variants that come up in practice in Dutch fleet and logistics operations.
VRPTW: time windows
Customers expect delivery between 09:00 and 12:00, or an engineer between 13:00 and 17:00. The VRP with Time Windows adds an earliest and latest arrival time to every stop, plus optional on-site service time. This is crucial for next-day delivery, field service planning and healthcare logistics. We model both strict windows and soft windows with penalty costs for minor overruns.
CVRP: capacity constraints
A refuse lorry has a load volume, a van has a weight limit, a courier has a number of parcel slots. Capacitated VRP ensures no vehicle exceeds its maximum and plans intermediate unloading or loading runs at depots or transfer points. It can be combined with multiple compartments (multi-compartment) for chilled plus ambient goods, or residual waste plus plastics, metal and drink cartons.
PDP & DARP
Pickup-and-Delivery links a pickup address to a drop-off address: the vehicle that collects here delivers there. DARP adds passengers, such as WMO transport (Dutch municipal mobility support) or school transport with a maximum travel time per person. Both require sequencing constraints (load first, then unload) and ride-time limits, which makes the search space harder than a standard VRP.
Multi-depot VRP
Does your organisation have multiple bases, cross-docks or microhubs in the city? The Multi-Depot VRP assigns the best starting depot to each route based on the geographical spread of customers and the available capacity at each location. Essential for national courier networks and urban last-mile distribution with zero-emission zones.
VRP with breaks and driving and rest times
European driving and rest time legislation (Regulation 561/2006) and the Dutch Working Hours Decree provisions for delivery services and couriers require breaks, daily rest and weekly rest. Our solvers include mandatory breaks explicitly, with flexible time windows and compatibility with digital tachograph data. No more schedules that look right on paper but result in a violation in practice.
Dynamic VRP
Same-day delivery, taxi dispatch and emergency repairs don't wait until tomorrow. Dynamic VRP decides online: a new order comes in, which vehicle picks it up, and how does that fit into the current route without harming the SLAs for other stops? We build insertion heuristics and rolling-horizon rescheduling that re-evaluate the state of the world every few minutes.
How Appfront builds route optimisation
We don't build a black-box app where you simply shout "stops in, route out". Our approach starts with your operational reality: which vehicle types, which contractual SLAs, which depots, which delivery arrangements, which exceptions your planners currently resolve by hand. Only once those are explicit do we write the objective function and the constraints the solver uses.
In practice, we build three layers on top of each other. At the bottom is the routing engine: for road distances and duration matrices we use OSRM, Valhalla or GraphHopper on your own infrastructure if the data allows, or HERE Routing, TomTom Routing and Mapbox Directions when you want ready-made traffic data and truck attributes. On top of that runs the solver: OR-Tools for most classic VRPTW/CVRP cases, VROOM for fast constructive heuristics on hundreds of stops, and Hexaly for the hardest problems where mixed objectives and complex constraints conflict. On top of that sits a dispatch layer that streams to your on-board computer or driver app and tracks what actually happens.
We work iteratively, with measurable results at each phase. A proof of concept on a week of historical orders shows in figures how many kilometres and hours the solver saves compared with your current planning. Only when that is convincing do we move on to production integration with your TMS, ERP and on-board computer.
From first planning question to production rollout
Routing projects stall when the solver is finished before the business logic has crystallised. Our phasing tackles this in the right order.
Constraint discovery
Together with your planners and drivers, we map out which hard and soft constraints actually apply: time windows, vehicle capacities, depot opening hours, customer-specific restrictions, breaks and driving and rest times. The output is a formal problem definition the solver can work with.
POC on historical orders
Using an extract of your historical trip and order data, we run the first solver runs in OR-Tools or VROOM. We compare the output with your actual routes from the same week: kilometres, hours, vehicle utilisation. Without that comparison, every routing figure is just marketing.
Integration and dispatch loop
The solver is connected to your order source, mapping service and on-board computer. We build a dispatch loop that calls the right optimisation for every new planning session or incoming order and sends the result to the driver app or on-board computer.
Live tuning and monitoring
A production routing system needs monitoring: why does the solver choose this suboptimal trip, why is the ETA error on corridor X larger than elsewhere? We instrument the pipeline, retrain ETA models on fresh trip times and adjust objective weights as the market changes.
Technology behind the routing stack
The choice of solver, routing engine and data sources depends on your scale, geography and compliance requirements. We have no preferred vendor that is "always the answer"; we choose based on what fits your problem.
For the optimisation itself, Google OR-Tools is our first workhorse. It is open source, production-ready, supports VRPTW, CVRP, PDP, multi-depot and breaks via the Routing Library, and has Python, C++ and Java bindings. For very large constructive runs on thousands of stops, we turn to VROOM, which is written purely in C++ and designed for speed. For cases where the objective function is heavily mixed, for example minimising kilometres while also balancing workload and respecting customer priorities, Hexaly (Localsolver) pulls ahead where OR-Tools struggles.
For road distance and duration matrices, we integrate with multiple services depending on the case. HERE Maps is strong on truck attributes: permitted bridges, height profiles, hazardous goods routes. TomTom provides accurate European traffic data and historical speed profiles. Mapbox Directions is a good choice for consumer-oriented apps with attractive map rendering. For self-hosted scenarios with large query volumes, we run OSRM, Valhalla or GraphHopper on your own infrastructure, with OpenStreetMap as the base data. For public transport and GTFS-RT feeds, we connect directly to NDOV-loket for Dutch public transport data when multimodal routing is needed.
Test your idea first: a working prototype in 1 day
With OneDayBuild, we make your idea tangible in a single day for €1,150, so you know whether further development is worth the investment. Decide to go ahead with the full build? Then we deduct the cost in full.
View OneDayBuild →Applications by sector
Routing software has a different objective function and a different story in every sector. A refuse collection lorry optimises differently from a bicycle courier.
Last-mile and e-commerce
Parcel carriers with growing volumes and shrinking delivery margins need a dynamic VRP that respects customers' delivery windows, schedules failed deliveries for a second attempt and avoids zero-emission zones in cities for diesel vans. With postcode-level clustering and re-optimisation during the trip, our clients get more stops per hour from the same fleet, without making drivers drive harder.
Refuse collection and waste management
Municipal and commercial waste collection services plan weekly routes for residual waste, organic waste, paper and plastics/packaging streams, often with containers that need emptying on demand. CVRP with multi-compartment vehicles, sensor-driven fill-level data from smart bins and hard time windows for disposal sites deliver a plan that minimises driving and avoids empty trips to overfull containers.
Courier services: same-day and next-day
For next-day couriers, everything revolves around start-of-day optimisation: distributing all orders across drivers and vehicles in a single batch. Same-day couriers need a dynamic VRP that continuously slots new orders into routes already under way. For urban bicycle couriers we also integrate cycling routes and elevation differences, because Mapbox car routing has no suitable answer for that.
Field service and mobile workforce
Engineers for lifts, climate systems, telecoms or central heating boilers work with appointment windows, required skills per job and spare-parts stock in the van. A routing engine plus skills matching schedules the day so the right engineer arrives at the right time with the right spare parts. ETA updates to the customer via SMS or app happen automatically.
Dial-a-ride: WMO, student and taxi transport
Targeted-group transport and classic taxi dispatch are DARP problems: multiple passengers per vehicle, individual pick-up and drop-off windows and hard limits on travel time per person. We build solutions that allow ride-sharing where that is legally and qualitatively permitted, and that keep strictly separate rides where regulations require it, such as medical taxis.
Construction logistics and home-delivered meals
Construction logistics with cross-dock hubs and tight just-in-time slots on site calls for multi-depot VRP plus appointment scheduling. Restaurant delivery demands ultra-short cycle times and near-real-time rescheduling. What both have in common is that ETA prediction based on traffic data is crucial for predictable delivery.
ETA prediction and real-time re-routing
A plan is a snapshot. Traffic, weather, customer delays and no-shows mean reality departs from it the moment the first driver pulls away. That is where AI route optimisation takes the second step.
Machine-learned ETA
Standard map services give a traffic-average ETA. We train models on your own historical journey times, factored by driver, vehicle type, time of day and customer stop time. The result: ETAs that reflect your reality, not that of an average TomTom user. This matters for SLA reporting, customer notifications and realistic capacity planning.
Real-time re-routing
In the event of a traffic jam, an accident or a longer-than-expected stop, the system recalculates the remaining route for the vehicle concerned and, where necessary, passes stops on to colleague drivers. Re-optimisation takes seconds using insertion heuristics, rather than re-running the entire day's plan.
Geofencing and stop detection
Geofences around depots and customer addresses automatically detect arrival and departure, without the driver having to press a button. The data feeds the ETA models, triggers customer notifications and provides evidence for proof of delivery. For restricted zones (ports, industrial sites), geofencing also supports automatic check-ins.
Live traffic feeds
HERE Traffic, TomTom Traffic and GTFS-RT for public transport deliver speed updates per road segment in real time. Our dispatch layer feeds that data back to the routing engine so re-optimisations run on current speeds. For critical corridors we monitor incident feeds proactively and flag routes that pass through problem areas.
Why Appfront for route optimisation
OR engineers, not plug-in installers
Our routing projects are led by engineers who can instrument OR-Tools in Python and C++, write callbacks for specific constraints, and know the difference between first-improvement and best-improvement in local search. That difference decides whether your planning takes ten seconds or ten minutes.
Transport and logistics domain knowledge
We have been building transport and logistics software for years. We know the difference between a digital tachograph and an on-board computer, between eCMR and CMR, between a TMS and a fleet management app. That domain knowledge translates directly into better modelling of your VRP.
Integration-first mindset
A routing engine that doesn't talk to your order source, ERP and on-board computer is an academic exercise. We build integrations with Adaption, transport planning APIs, fleet tracking dashboards and on-board computer systems, so the optimisation lands in the system your drivers already use today.
Frequently asked questions about AI route optimisation
Want to make your routing challenge concrete?
Send us your planning question. A week of historical orders is enough for a first solver run. No obligation, and you get an honest benchmark against your current planning.
Schedule a call