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

Part 1: Core Routing Algorithms — A* & Dijkstra Visualized

Prerequisite: This part builds on the concepts introduced in the Executive Summary. Part 1: Core Routing Algorithms — A* & Dijkstra Visualized Answer-first: A* pathfinding uses Euclidean heuristics to accelerate 1-to-1 point routing, whereas Single-Source Dijkstra is mathematically superior for 1-to-N distance matrix calculations because it builds a single shortest-path search tree to all reachable destinations in one pass. Key Takeaways: Matrix Efficiency: Dijkstra expands radial wavefronts in a single pass, computing 1-to-N driver matrices 10x faster than running N independent A* searches. Turn Restrictions: Edge-based graph representation models turn penalties (e.g. prohibited U-turns) by representing turns as edges between directed road segments. Shortcut Hierarchies: Contraction Hierarchies contract local nodes offline, reducing real-time search space by orders of magnitude. What You’ll Learn: ...

June 14, 2026 · 10 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