Skip to main content
Navigated to Case Study - CodingAlphas
All Case Studies
LogisticsAI/ML Sigma Tier

GreenRoute Delivery Optimizer

An AI-powered route optimization engine for a last-mile delivery fleet of 50+ drivers. Combines constraint programming with ML-based traffic prediction to reduce fuel costs by 32% and achieve 98.5% on-time delivery rates while processing 500+ route optimizations daily.

Project Demo

Interactive Preview

app.example.com

Fleet Legend

Route A — Tom K.
Route B — Lisa M.

Route Map

Live fleet map with optimized routes and driver positions

The Problem

The Challenge

A last-mile delivery company needed to optimize routes for 50+ drivers daily, reducing fuel costs and delivery times while accounting for real-time traffic and package priorities.

1

Manual route planning took 2 dispatchers 3 hours every morning and still produced suboptimal routes that wasted fuel and time

2

No ability to factor in real-time traffic, vehicle capacity, package dimensions, or customer-specified delivery windows simultaneously

3

On-time delivery rate of 87% was risking the company's largest contract, which required 95% or higher

4

No re-routing capability — when accidents or road closures occurred, drivers called dispatch and waited for new instructions

Our Approach

The Solution

We built a route optimization engine using constraint programming and ML-based traffic prediction, integrated into a dispatcher dashboard with real-time driver tracking.

1

Google OR-Tools solver optimizes routes across 50+ vehicles simultaneously, considering capacity, time windows, priority levels, and driver skill ratings

2

Custom LSTM neural network trained on 18 months of historical traffic data predicts congestion patterns with 91% accuracy for the next 4-hour window

3

Real-time re-routing engine monitors traffic APIs and automatically recalculates affected routes, pushing updates directly to driver devices

4

Customer-facing tracking portal with 30-second GPS updates and ML-refined ETA predictions accurate to within 8 minutes

Our Process

Project Timeline

  1. 1

    Data Collection & Analysis

    3 weeks

    Collected 18 months of delivery data, GPS traces, and traffic patterns. Analyzed current routing efficiency and identified optimization opportunities worth $280K annually.

  2. 2

    ML Model Development

    5 weeks

    Trained the LSTM traffic prediction model, built the constraint programming solver with OR-Tools, and validated results against historical optimal routes.

  3. 3

    Platform Development

    6 weeks

    Built the React dispatcher dashboard, driver mobile app, and customer tracking portal. Developed the FastAPI backend with real-time WebSocket updates.

  4. 4

    Integration & Testing

    3 weeks

    Integrated with the company's existing TMS and telematics systems. Ran A/B tests with 10 drivers using optimized routes vs. manual routes for 2 weeks.

  5. 5

    Fleet-Wide Rollout

    2 weeks

    Deployed to all 50+ drivers with dispatcher training and a 2-week parallel-running period to build confidence in the optimization engine.

What We Built

Key Features

Multi-Constraint Solver

Optimizes across vehicle capacity, delivery windows, driver hours, package priority, and real-time traffic simultaneously.

Traffic Prediction

ML model predicts traffic patterns 4 hours ahead with 91% accuracy, enabling proactive route adjustments.

Real-Time Re-Routing

Automatic route recalculation when accidents, closures, or high-priority packages disrupt planned routes.

Live Fleet Tracking

Dispatcher dashboard with real-time GPS positions, delivery progress, and capacity utilization for the entire fleet.

Customer ETA Portal

Customer-facing tracking with ML-refined ETAs accurate to 8 minutes, with SMS and email notifications.

Analytics Dashboard

Fleet performance analytics with fuel cost tracking, on-time metrics, driver efficiency scores, and trend reports.

Under the Hood

Technical Architecture

The optimization engine runs on Python with Google OR-Tools for the constraint programming solver and TensorFlow for the LSTM traffic prediction model. FastAPI serves the REST and WebSocket APIs, deployed on AWS ECS with GPU instances for model inference. The React dispatcher dashboard communicates via WebSockets for real-time fleet updates. PostgreSQL with PostGIS extensions stores route data and delivery records. Redis handles the real-time GPS position cache and pub/sub for driver device updates. Google Maps Platform provides the distance matrix and geocoding services. The entire system processes a full 50-vehicle route optimization in under 45 seconds.

Tech Stack

PythonReactGoogle Maps APIDockerPostgreSQLTensorFlowOR-ToolsFastAPI
The Impact

Results

-32%

Fuel Costs

98.5%

On-Time Delivery

500+

Routes Optimized/Day

Client Feedback

What Our Client Said

"We were about to lose our biggest client because we couldn't hit their 95% on-time target. Within 6 weeks of deploying GreenRoute, we were at 98.5%. The fuel savings alone — $18K per month — more than justified the investment. Our dispatchers now spend 20 minutes on morning planning instead of 3 hours, and they actually trust the routes the system generates."

David Okonkwo

Director of Logistics, Metro Express Delivery

Reflections

Lessons Learned

1

Dispatcher buy-in is critical for routing optimization tools. We initially built a fully automated system, but dispatchers felt sidelined. Adding drag-and-drop route adjustments and a "dispatcher override" feature increased adoption from 60% to 98%.

2

Traffic prediction accuracy varies by area. The LSTM model performed well on major corridors but struggled with suburban neighborhoods — we implemented a hybrid approach using historical averages for low-data areas and ML predictions for high-traffic zones.

3

A/B testing with real drivers proved the ROI before full deployment. The 2-week test with 10 drivers showed a clear 28% fuel reduction vs. manual routes, which convinced skeptical operations managers to approve the fleet-wide rollout.

Want results like these?

Tell us about your project and we'll show you what's possible.