Greedy is not enough
The simplest dispatch grabs the nearest available driver for each request as it arrives. This greedy choice is locally fine but globally poor: assigning a driver to a far request can strand a closer request that arrives a moment later, raising total wait time.
Batched assignment
Better systems batch requests and drivers over a short window and solve an assignment problem that minimizes a global cost like total wait or pickup distance. This is a matching over a cost matrix where each cell is the cost of pairing a request with a driver.
Real world constraints
- Filter first. Use proximity search so each request only considers nearby drivers, keeping the matrix small.
- Mix objectives. Balance rider wait, driver utilization, and fairness, not distance alone.
- Act fast. The window is tiny, so the solver must return within the latency budget, falling back to greedy under overload.
Key idea
Dispatch matching batches requests and drivers to solve a global assignment that minimizes total cost, beating per request greedy nearest choices.