Problem
Delivery operations often assign points to couriers by hand. At Samokat Beauty (cosmetics and household goods in the Samokat app), a logistician in each city distributed incoming orders among final distribution hubs using an Excel file and Yandex.Maps. This took about 10 minutes per run and depended on one person's experience. A real routing task has time windows, courier capacity, shifts and costs per hour and per kilometer, and quality drops as the number of points grows.
Example from the article: a large e-grocery service routed 10 of its stores with the Samokat.tech algorithm and the rest with its old model. Samokat Beauty replaced 10 minutes of manual work with routes in 1–2 seconds.
Solution in brief
Build the router as a discrete optimization loop: start from a greedy solution, generate neighboring solutions, drop infeasible ones, and accept some worse ones early on (simulated annealing, tabu search). Use reinforcement learning only for very large requests. Calibrate map-service travel times to what couriers actually do.
Questions this case answers
- How to build near-optimal routes for many vehicles with time windows and capacity limits that must be computed in seconds
- How to calibrate third-party travel-time estimates so that planned routes match how executors actually move
- How to build courier routes that respect time windows and load limits and return in seconds
- How to choose between discrete optimization and reinforcement learning for a vehicle routing problem
Tools and methods
- Discrete optimization with OR-Tools — main router in pilots, works well up to about 200 points per request
- Reinforcement learning (PyTorch) — experimental router for large requests, with open-source research models as baselines
- Travel-time calibration — 2GIS segment time multiplied by a coefficient taken from courier data
- Dijkstra's algorithm on a metro graph — distance matrix for walking and metro couriers
Google or a one-time email code. No password.
