You already know: ETA prediction (the ETA case), marketplace experiments and switchbacks (the surge pricing case), and from the job case that two-sided markets need both sides' outcomes in the objective. This case adds dispatch with three parties' time at stake: the customer wants hot food on time, the restaurant wants food picked up when ready, and the courier wants well-paid trips without waiting. The largest and least certain piece is not driving but food preparation. The design questions: what to predict, how to assign, how to treat couriers fairly, and how to test when couriers are shared.
How to read this lesson. No code, on purpose. Numbers marked assumed are assumptions you state out loud.
1. The prompt, and the questions that change the design
A mid-level answer: "assign the nearest available courier as soon as an order comes in". A staff candidate first asks what a good delivery is (on time, hot, cheap), what can be predicted (preparation, travel, handoff), how couriers take work (offers they can decline, how they are paid), and the scale and cadence of decisions. Those answers produce targets for lateness and waiting, models for each time piece, fair, transparent offers, and batch matching every few seconds per zone.
Assumptions you state: