Constraint-aware fleet routing

Summary

Route planning for a fleet operator.

Dispatchers had to balance vehicle capacity, time windows, workload and changing orders while keeping routes practical.

A route-planning service that models operational constraints, allocates work and recalculates plans when orders change.

Tech Stack

  • Python
  • PostgreSQL
  • Redis
  • REST API
  • OR-Tools
  • OpenStreetMap
  • Trimble Maps
  • Google Cloud Platform

Project workstreams

  1. 01

    2 weeks

    Phase 1: System Design and Planning

    Solution Architect
  2. 02

    2 weeks

    Phase 2: Base Routing Algorithm Implementation

    Python Developer, Data Engineer, GIS Specialist
  3. 03

    2 weeks

    Phase 3: Database Setup and Deployment

    Database Administrator, DevOps Engineer
  4. 04

    2 weeks

    Phase 4: Integrating Business Logic Constraints

    Python Developer, Data Engineer, GIS Specialist
  5. 05

    2 weeks

    Phase 5: Algorithm Fine-tuning and Testing

    Python Developer x2
  6. 06

    2 weeks

    Phase 6: Integration with Client Mobile Application

    Python Developer, DevOps Engineer
  7. 07

    1 week

    Phase 7: Deployment and Monitoring

    DevOps Engineer, System Administrator

Tech Challenge

  • Fuel Consumption Optimization: Optimizing routes based on varying vehicle fuel consumption rates. Larger vehicles consume more fuel, especially on certain routes or with heavier loads. Our system had to balance route efficiency and fuel savings by factoring in each vehicle’s specific fuel efficiency, minimizing costs.
  • Driver Workload Balancing: The system has to assign routes evenly, considering factors like route length, delivery difficulty, and legal driving hours. Dynamic adjustments should help maintain each driver's efficiency.
  • Equipment Availability: Drivers often needed to switch equipment throughout the day. The system should ensure the right tools are available at the right location, incorporating equipment availability, vehicle capacity, and job site order into the route planning process.
  • Delivery Timeframes: Clients often require deliveries within specific time windows, adding complexity. The system should prioritize these constraints while optimizing routes for cost and efficiency, ensuring timely deliveries without disrupting other schedules.
  • Real-Time Route Adjustment: Creating a system that could adapt routes in real-time in response to unpredictable events like unexpected job cancellations, equipment failures, and changing road conditions while maintaining optimal efficiency.
  • Integration of Real-Time Data: Incorporating live traffic updates and road condition data into the routing algorithm to optimize routes, avoid delays and unsuitable roads, and minimize operational costs like fuel consumption and toll fees.

Solution

  • Utilizing OR-Tools’ constraint programming, we enabled real-time equipment adjustments across storage locations, improving utilization and reducing driver downtime.
  • Implemented a logic layer to handle sudden job cancellations or additions, allowing immediate recalculations of routes and driver assignments.
  • Designed the system to prioritize urgent deliveries, adjusting routes to handle critical tasks promptly.
  • Leveraged OpenStreetMap and Trimble Maps APIs to incorporate live traffic updates and road conditions, optimizing routes to avoid delays and unsuitable roads.
  • Built the system to easily adjust to new constraints or changes in business rules, providing long-term adaptability.

Impact

Outcome

A planning service that assigns routes and responds to changing orders.

Published

DRL Team