Case study · Transportation & Logistics

AI-Driven Route Optimisation and Fleet Management

Built a real-time route optimisation engine and driver app that cut delivery times by 30% and operating costs by a quarter across a 600-vehicle fleet.

30%
Faster deliveries
25%
Lower operating cost
+18%
Same-day orders accepted
Live
Fleet-wide tracking
Client
Regional logistics operator (confidential)
Industry
Transportation & Logistics
Year
2023
Duration
8 months
Team
8 engineers

Project overview

The operator ran last-mile delivery for retail and pharmaceutical clients with static routes planned the evening before. Same-day orders, traffic and failed deliveries made those plans obsolete within hours.

CodeQube delivered a dynamic optimisation engine, a driver mobile app and a dispatcher console with live tracking and re-routing.

Business problem

Where the client started.

01

Static routing meant vehicles ran under-utilised while same-day orders were refused or outsourced.

02

Dispatchers had no live view of the fleet and relied on phone calls to locate drivers.

03

Proof-of-delivery was paper-based, delaying invoicing and disputes.

04

Pharmaceutical clients required temperature and chain-of-custody evidence.

Proposed solution

What we proposed, and why.

  • A constraint-based optimisation service (OR-Tools) re-planning routes continuously as orders, traffic and vehicle states change.

  • A React Native driver app with offline navigation, digital proof-of-delivery and telematics ingestion.

  • A dispatcher console with live map, exception queue and one-click re-assignment.

  • A streaming telemetry pipeline feeding both real-time operations and historical analytics.

Architecture

How the system is put together.

Vehicle telemetry and order events stream through Kafka into a real-time state store. The optimisation service consumes state changes and emits revised route plans, which are pushed to drivers over WebSockets and displayed in the dispatcher console.

logistics-optimization-platform/architecture — layered view
L1Clients
React Native driver appReact dispatcher consoleCustomer tracking pages
L2Real-time
WebSocket gatewayKafkaRedis geo-index
L3Services
Optimisation engine (OR-Tools)Order serviceFleet stateProof-of-delivery
L4Data
PostgreSQL + PostGISTimescaleDB (telemetry)BigQuery (analytics)
L5Platform
GKECloud Pub/SubTerraformCloud Build

Technology stack

Backend, frontend, data and cloud.

React Native
React
TypeScript
Mapbox GL

Challenges faced

What got in the way, and how we dealt with it.

Challenge

Full re-optimisation of the fleet took minutes, too slow for reactive dispatch.

Resolution

Partitioned the problem by depot and time window, ran incremental local-search on affected routes only, and reserved full solves for scheduled intervals.

Implementation details

How delivery was sequenced.

  1. 1

    Discovery & data foundation (months 1–2)

    Ride-alongs with drivers and dispatchers, telemetry ingestion pipeline and baseline KPIs.

  2. 2

    Optimisation engine (months 3–5)

    Constraint model, incremental solver and simulation harness validated against three months of historical routes.

  3. 3

    Driver & dispatcher apps (months 4–7)

    Parallel delivery of the mobile app and console; pilot at one depot with 40 vehicles.

  4. 4

    Fleet rollout (month 8)

    Depot-by-depot rollout with training, on-call support and analytics dashboards.

Non-functional requirements

Security and scalability considerations.

Security

  • Device attestation and per-driver credentials with remote wipe for lost devices.
  • Signed proof-of-delivery records with tamper-evident hashing for dispute resolution.
  • Customer tracking pages expose only time-boxed, tokenised links with no PII.

Scalability

  • Depot-partitioned optimisation scales horizontally; adding depots adds solver workers.
  • Telemetry pipeline sustained 12,000 events/second in load testing.
  • Analytics offloaded to BigQuery so operational databases serve only live workloads.

Results & business impact

What it delivered.

30%
Faster deliveries
25%
Lower operating cost
+18%
Same-day orders accepted
Live
Fleet-wide tracking

Business impact

  • Invoicing cycle shortened from 9 days to same-day through digital proof-of-delivery.
  • Won two pharmaceutical contracts on the strength of cold-chain compliance reporting.
  • Fuel consumption down 14% from tighter routing.

More case studies

Related work.

Next step

Facing a similar problem?

We'll walk you through how this was built, what we'd do differently today, and what it would take for your organisation.