Algorithms · 2024 · Addverb Technologies · Bhiwadi, Rajasthan
Lenskart — Tote Movement Optimization
Re-designed tote routing from the ASRS to the Goods-To-Person (GTP) floor using graph algorithms — shaving travel time by 15% and lifting warehouse throughput by 12% in pilot.
Problem
At peak load the conveyor network between the ASRS exit and GTP stations became the bottleneck — totes queued, pickers starved, and system latency bloated. The existing router used naive FIFO + static rules that ignored congestion and alternative paths.
My Contribution
- Modelled the conveyor network as a weighted directed graph — nodes are junctions/diverts, edges carry travel-time + live congestion weight.
- Implemented a Dijkstra-based shortest-path service in Java, with congestion weights updated from live conveyor telemetry.
- Added fallback routing (second-best path) when the primary route exceeded a congestion threshold, avoiding deadlocks during burst load.
- Benchmarked against production traces before pilot rollout.
Tech Stack
- Java
- Spring Boot
- Graph Algorithms
- MySQL
- RabbitMQ
- Grafana
High-Level Design
flowchart LR ASRS["ASRS Exit"] --> ROUT["Tote Router Service
(Java)"] TELE["Conveyor Telemetry"] --> ROUT ROUT -->|path plan| CCTRL["Conveyor Controller"] CCTRL --> CONV[("Conveyor Network
(graph)")] CONV --> GTP["GTP Stations"] ROUT --> METRICS["Grafana
(travel time p95)"]
Low-Level Design — Route Planning
flowchart TB A["Receive tote
(source, destination)"] --> B["Load graph snapshot
(edges + live weights)"] B --> C{"Primary path
available?"} C -- yes --> D["Dijkstra shortest path"] C -- no --> E["Yen's K-shortest
(k=2)"] D --> F["Estimate ETA + congestion"] E --> F F --> G{"ETA > threshold?"} G -- yes --> H["Fallback path"] G -- no --> I["Commit path"] H --> I I --> J["Publish route.assigned → controller"]
Why Dijkstra + K-shortest: Dijkstra gives the optimal path on static
weights; K-shortest provides pre-computed alternates so fallback is O(1) under congestion
spikes — no re-planning cost on the hot path.
Impact
- −15% tote travel time.
- −200+ ms system latency per tote.
- +12% warehouse throughput during pilot phase.