🚌

Vehicle Routing & Allocation Platform

AI-Powered Multi-Modal Transport Optimization

+8%
On-Time Pickup
-25%
Customer Wait
-12%
Dead Kilometers
+4%
Gross Margin

Problem Statement

Daily ground operations across airport ↔ hotel, multi-stop activity chains, day trips, and both private and shared modes required complex routing optimization. The system needed to honor time windows, vehicle/driver constraints, "stay-with-client" blocks, and re-optimize day-of with live trafficβ€”while improving unit economics across owned/leased/supplier vehicles with fixed and variable costs.

Solution Architecture

Architecture Overview

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   Booking API   │───▢│   Normalizer   │───▢│    PostgresDB   β”‚
β”‚ (JSON/Protobuf) β”‚    β”‚   (validation) β”‚    β”‚   (job store)   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Driver GPS      │───▢│    Redis Cache │───▢│ Route Optimizer β”‚
β”‚ (telemetry)     β”‚    β”‚   (hot state)  β”‚    β”‚   (LNS/TSPTW)   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Maps Provider   │───▢│ ETA Cache       │───▢│ Vehicle Allocatorβ”‚
β”‚ (ETA/Traffic)   β”‚    β”‚ (2-5 min TTL)   β”‚    β”‚ (matching)       β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    οΏ½β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Flights/Delays  │───▢│ Live-Ops Loop   │───▢│ Driver App      β”‚
β”‚ (dynamic ops)   β”‚    β”‚ (re-optimize)  β”‚    β”‚ (manifest/ETA)   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Key Features & Components

πŸ€– Intelligent Pooling

  • β€’ Time-space bucketing with H3/k-means clustering
  • β€’ Capacity and constraint feasibility filtering
  • β€’ Mini-TSPTW feasibility checks
  • β€’ Set packing for optimal bundle selection

⚑ Live Operations

  • β€’ ETA caching with 2-5 minute TTL
  • β€’ Predictive lateness detection via slack analysis
  • β€’ Zone-scoped re-optimization
  • β€’ Stability guards with churn caps

🎯 Route Optimization

  • β€’ Large Neighborhood Search (LNS) destroy/repair
  • β€’ Local moves: 2-opt, swap, relocate
  • β€’ Multi-objective scoring (wait/late/cost/rev)
  • β€’ Regret-k insertion for initial solutions

πŸ“ Vehicle Allocation

  • β€’ Smart vehicle/driver matching
  • β€’ Duty hours and skill qualifications
  • β€’ Depot proximity considerations
  • β€’ 25-30 minute lock horizon protection

Technical Implementation

πŸ—οΈ Data Architecture

Core Entities

  • β€’ Bookings: Jobs with flags, time windows, service duration
  • β€’ Vehicles: Capacity, equipment, depot, cost profiles
  • β€’ Drivers: Duty schedules, skills, certifications
  • β€’ Routes: Sequences with ETAs and break placements
  • β€’ Telemetry: Real-time GPS and status updates

Storage Strategy

  • β€’ PostgreSQL/Timescale: Persistent job and vehicle data
  • β€’ Redis: Hot state cache for real-time operations
  • β€’ Kafka: Event streaming for change notifications
  • β€’ Filesystem: Query result caching and audit logs

🎯 Traffic-Aware Optimization

1

ETA Batch Processing

Batch ETA requests for all legs within lock horizon + buffer; write through cache with 2-5 minute TTL

2

Slack Analysis

Compute slack per upcoming stop; flag at-risk when slack < threshold for β‰₯90 seconds

3

Targeted Re-optimization

Re-optimize only in impacted zones; destroy nearby legs/bundles; repair with regret-k insertion

4

Update Distribution

Push new sequence/ETAs to driver app; optional customer SMS/WhatsApp; audit "why changed"

Results & Business Impact

πŸ“Š Operational Metrics

On-time pickup rate+8%
Customer wait time (p95)-25%
Dead kilometers-12%
Dispatch latency-35%

πŸ’° Economic Impact

Gross margin improvement+4%
Daily cost per vehicle-β‚Ή500/day
Supplier utilization+15%
Driver satisfaction+2.3/5

Technology Stack

Backend

PythonFastAPIPostgreSQLTimescaleDBRedis

Optimization

OR-ToolsCP-SATSciPyNumPyLNS Algorithm

Infrastructure

KafkaDockerKubernetesGrafanaPrometheus

Ready to Optimize Your Fleet Operations?

See how intelligent routing can reduce costs, improve service levels, and scale your ground operations.