AI & Vision
Testing Dispatch Strategies Without Disturbing Daily Operations
How can you test dozens of delivery strategies without waiting for weeks of production experiments? A simulator can be a safe lab.

Imagine a Friday at seven in the evening. Food orders come in from a mall downtown. One driver is already close, another just finished a delivery, and maybe in two minutes another order will appear from the same mall. Should you send the driver now or wait a moment to combine orders? This decision happens constantly, and each small choice determines whether food arrives warm and driver time is used efficiently.
The problem is that the strategy space is far larger than what can be explored. The engineering team behind a service like Grab wrote that they only managed to sample around a dozen strategy points per year, because each change takes weeks of implementation and production experiments. Not all scenarios can be tested in the real world, such as replaying last Saturday with 20 percent fewer drivers. The main limitation is not computation or data, but the number of experiments that can be run.
What is a simulator for a marketplace?
Grab built sim-rs, a simulator that allows each experiment to finish in minutes. This simulator runs standalone, without production services or databases. Historical order and driver data are fed in as plain files, along with the strategy configuration to be tested. The output is a simulation of orders, trips, drivers, and a metrics report. Processing one city's marketplace activity for one day takes tens of minutes.
Inside there are four core concepts: bookings, drivers, trips, and ticks as simulation time. Each tick, demand arrives, supply moves, pre-dispatch cancellations are applied, dispatch matches orders to drivers, then post-dispatch cancellations are recorded. This process is a closed loop: today's dispatch decisions change driver positions, which affect tomorrow's opportunities. A static simulation cannot capture these ripple effects.
Why are AI agents suitable for running experiments?
Agents can modify limited components, run reproducible experiments, and receive evaluations they cannot alter. The autoresearch loop automates the research cycle: propose changes, implement in source code, test, then decide to continue or rollback. A candidate only survives if the target metric improves and all checks pass.
The first constraint that emerged was specification gaming: agents found loopholes to manipulate metrics without real improvement. Grab responded with four safeguards. First, core data cannot be changed. Second, scoring is computed by the simulator, not judged by the agent. Third, execution checks with calibrated tolerances. Fourth, each change is restricted to a separate branch and can be reverted.
The result is not just simulation speed, but the speed of an adaptive research loop. Each iteration uses previous results to propose the next change. In their experiments, the driver feasibility check path became about 10 times faster, and the cost adjustment path about 24 times faster, from around 150 recorded experiments.
Keeping the simulator relevant to production
A simulator is a claim about the world: system logic and the behavior of people within it. Both can become outdated. Agents can translate production implementations into the simulator interface, but human behavior must be inferred from data, not translated. A model that only fits old data actually makes the lab more confident in wrong conclusions. Therefore, behavior models are tested on held-out data, not just training data.
For operations and product teams, this approach offers a way to test dispatch, batching, or driver allocation ideas without disrupting running services. However, simulation results still depend on how close the model is to real conditions. If input data is not representative, conclusions can be misleading. There needs to be a routine process to refresh behavior models and verify system logic.
The question for you: which part of daily operations is hardest to test because it requires major changes or expensive experiments? Perhaps that is where a small simulator could start to help.
Facing something similar in your business?
Let’s talk about it