Warehouse Picker Routing: GraphHopper, OR-Tools & C++

Warehouse Picker Routing Optimization (GraphHopper & OR-Tools) Answer-first: Minimizing walking distance for warehouse pickers requires solving the Traveling Salesperson Problem (TSP) inside a physical building. The 2026 standard architecture uses a Java-based Indoor GraphHopper instance to generate a 100x100 Distance Matrix from custom OpenStreetMap (OSM) data, which is then fed into a C++ Google OR-Tools gRPC Microservice to calculate the absolute optimal pick sequence in under 15 milliseconds. The S-Shape Trap in Warehouse Picking In legacy Warehouse Management Systems (WMS), workers are directed to pick items using heuristic patterns like the S-Shape (Z-pattern) or Largest Gap. These heuristics force the worker to walk down every aisle that contains an item, traversing the aisle from end to end. ...

August 1, 2026 · 5 min · Lê Tuấn Anh

Order Splitting Algorithm: Graph Coloring & OPA in Golang

Order Splitting at Scale: Graph Coloring, Bin Packing, and OPA in Go Answer-first: Real-time e-commerce order splitting is a Constraint Satisfaction Problem (CSP). To determine the absolute minimum number of cardboard boxes required for a complex cart without violating safety rules or physical dimensions, the 2026 standard pipeline relies on Open Policy Agent (OPA) for dynamic business rules, Golang (gonum) for Graph Coloring (Welsh-Powell) to resolve logical conflicts, and First-Fit Decreasing Bin Packing to resolve physical constraints. This pipeline executes in under 50ms during synchronous checkout, deferring heavy Multi-Warehouse routing to async workers. ...

August 1, 2026 · 5 min · Lê Tuấn Anh

OSRM vs GraphHopper: Routing Engine Architecture Comparison

OSRM vs GraphHopper: Routing Engine Architecture Comparison Introduction: When Do You Outgrow Cloud Route APIs? Building early-stage logistics applications with cloud routing APIs provides immediate reliability, accurate ETAs, and zero infrastructure maintenance. However, when daily traffic exceeds 100,000 requests or requires massive distance matrices for vehicle route optimization, proprietary API costs explode while rigid routing profiles prevent injecting custom fleet constraints. Not only are they prohibitively expensive at scale, but these proprietary APIs also lack the flexibility required to inject custom routing rules. For instance, if your logistics fleet consists of 5-ton trucks that cannot enter certain city districts between 6 AM and 8 AM, or if you need to strictly penalize left turns at specific intersections to optimize fuel consumption, standard APIs fall short. They offer generic profiles for ‘driving’ or ‘bicycling’, but they do not allow you to define the exact physics and legal constraints of your unique vehicles. ...

July 17, 2026 · 9 min · Lê Tuấn Anh

GraphHopper Distance Matrix: Self-Host, API & Alternatives

GraphHopper Distance Matrix: Production Self-Hosting & API Guide How to Call the GraphHopper Matrix API (/matrix Endpoint) Running GraphHopper distance matrix in production requires configuring Docker deployment, the /matrix API endpoint, Custom Models for vehicle-specific routing (truck/motorcycle), H3-based Redis caching, and evaluating performance tradeoffs against OSRM, Valhalla, and Google Maps (for an in-depth analysis of routing engine selection, see our OSRM vs GraphHopper Architecture Comparison). The /matrix endpoint evaluates element-by-element matrix calculations between sets of origin and destination coordinates. When issuing requests, callers specify input point arrays along with requested output arrays such as times (travel duration in seconds) and distances (road distance in meters). Depending on graph preparation, GraphHopper can evaluate matrix queries using speed-optimized Contraction Hierarchies (CH) or flexible Landmark-based (LM) routing models. ...

June 11, 2026 · 16 min · Lê Tuấn Anh

Order Fulfillment Algorithm: Warehouse to Last-Mile

Order Fulfillment Algorithm: Warehouse to Last-Mile Executive Summary & Fulfillment Fundamentals When an order is confirmed, the fulfillment system executes a multi-step decision pipeline: Available-to-Promise (ATP) Check: Filter candidate warehouses by real-time uncommitted stock. Cost & Proximity Scoring: Evaluate shipping distance, labor rate, carrier capacity, and SLA risk. Split vs. Consolidate Trade-Off: Determine whether to ship from multiple warehouses or wait for inventory consolidation. CONDOR & Anticipatory Dispatch: Pre-position stock globally based on probabilistic ML demand forecasts. Last-Mile VRP Solving: Optimize driver routes using vehicle routing solvers (OR-Tools / GraphHopper). Step 1 — Real-Time Inventory & Available-to-Promise (ATP) Physical stock on hand does not equal sellable stock. Fulfillment systems distinguish between raw inventory counts and uncommitted inventory: ...

June 1, 2026 · 7 min · Lê Tuấn Anh