Skip to content
ALL SYSTEMS

OPTIMISATION

IN PRODUCTION

Vehicle Routing & Optimisation Engine

A pickup-and-delivery engine planning 2,000-stop routes under twelve hard constraints, built independently and exposed to agents over MCP.

  • C++
  • ALNS
  • gRPC
  • Docker
vrp.mepant.com
Solve time
143s → 30s

Solve time

Provider calls
1,225 → 174

Provider calls

Tests gating CI
257

Tests gating CI

The constraint

Real logistics does not fail on distance. It fails on everything wrapped around distance — a vehicle that cannot enter a zone, a pickup that has to happen before its delivery, a shift that ends before the last stop. An engine that optimises distance and ignores those produces plans dispatchers stop trusting.

  • Capacity
  • Time windows
  • Shifts
  • Vehicle compatibility
  • Precedence
  • Zones
  • Max stops
  • Max duration
  • Incompatible cargo
  • Breaks
  • Backhaul
  • Store capacity

TWELVE HARD CONSTRAINTS · A PLAN VIOLATING ONE NEVER LEAVES THE ENGINE

Solve pipeline

REQUEST

Visits, fleets, capacities, shifts and constraint configuration arrive over REST, with a caller-supplied time limit the solver must respect.

What changed

  • 143s30s

    End-to-end solve time

    Routing and optimisation pipeline rework, on typical 60–70 task workloads.

  • 235s52s

    Distance-matrix acquisition

    Bounded worker pool replaced barrier-synchronised fetching.

  • 1,225174

    Provider calls per request

    Hilbert-ordered spatial pruning removed redundant lookups.

  • 0 routes13s

    1,720-stop request

    An unbounded construction phase returned nothing; per-route batch commits route every stop.

Solved plan

Route viewer

3 VEHICLES · MATRIX 693ms · SOLVE 1864ms · UNASSIGNED 0

P1P2P3P4P5P6D7P8D9D10D11D12D13D14P1P2D3D4P1D2

VEHICLE 2000

LOAD 6/12

8.8 km

39m

14 STOPS

Stop sequence for vehicle 2000
#STOPTYPEARRIVESERVICEPALLETS
1P1pickup00:00120s+1
2P3pickup00:02120s+1
3P8pickup00:04120s+1
4P2pickup00:06120s+1
5P9pickup00:08120s+1
6P0pickup00:10120s+1
7D0delivery00:12120s-1
8P4pickup00:14120s+1
9D3delivery00:20120s-1
10D4delivery00:23120s-1
11D9delivery00:26120s-1
12D2delivery00:29120s-1
13D8delivery00:33120s-1
14D1delivery00:37120s-1

ENGINE OUTPUT FROM A DEMO REQUEST. STOPS ARE SYNTHETIC; THE SOLVE IS REAL.

Engineering

TEST SUITE
257 GoogleTest cases across unit, integration and endpoint suites, run under ctest in CI. Shipped via a multi-stage Docker build so the runtime image carries the binary rather than the toolchain.
COST
Routing moved onto GraphHopper and search onto Pelias, cutting the per-plan API bill without losing plan quality.
INTEGRATION
Webhook callbacks POST finished plans to the caller. An MCP server exposes the engine to Claude Code, Claude Desktop and IDE extensions.
OPERATIONS
A route viewer renders a solved plan onto a map. SIGSEGV, SIGABRT, SIGFPE, SIGILL and SIGBUS are caught and logged rather than dying silently.