A Scheduled-Delivery Management Algorithm and Dynamic Pricing: How We Built It at Kuper

Yuri Belyakov, Danya Bogdanov6 Sep 2024

Problem

A grocery delivery service offers scheduled delivery from hypermarkets such as METRO and Auchan in overlapping slots, set seven days ahead. Each slot must be closed at the right moment. Closing too early loses orders. Closing too late causes late deliveries and cancellations, and one late slot usually delays the next ones. Kuper had no labeled history of "correct" actions and could not see what one more order would have changed.

Example from the article: a store with one picker and one courier has a 11:00-13:00 slot with three orders and a 12:00-14:00 slot with two orders. The second slot is more likely to be late, although the first has more orders.

Solution in brief

Every five minutes the algorithm forecasts picking and delivery time for all open orders and builds a fulfilment queue. From the queue it computes surge-level, the share of the slot's available time that expected delivery would use, and closes a slot above 1. The same metric, as a maximum over current and later slots, sets surcharges that move demand to less loaded slots.

Questions this case answers
  • How to decide in real time whether to keep accepting orders into a time window when capacity is a shared queue and no history shows the counterfactual outcome
  • How to set load-based price surcharges on overlapping time windows so that demand shifts to less loaded windows without hurting availability
  • How to decide in real time when to close a delivery slot so that orders are neither lost nor late?
  • How to measure the load of a delivery slot as one number that shows the risk of lateness?

Tools and methods

  • Gradient boosting — forecasts picking time per order
  • Rule-based heuristics — parallel picking, shift productivity, average zone route
  • Price optimization — surcharge ladder tied to slot load
  • Human in the loop — manual slot changes win; supervisor feedback tunes the rules
  • Apache Airflow — ran the first version every five minutes
Continue reading — it's free

Google or a one-time email code. No password.