Batched requests overview
Batching or grouping orders together based on the location of the pickup or dropoff point is a very common practice in routing. For example, a vehicle may visit multiple fast food chains before dropping the orders off to a single location. Likewise, a dump truck may pickup a load of gravel, and distribute it to multiple construction sites. This tutorial provides a walkthrough of setting up the different types of batched requests.
- Many pickups to one dropoff - Combines two or more pickups into a single dropoff.
- One pickup to many dropoffs - Combines two or more dropoffs into a single pickup.
Many pickups to one dropoff
- For each pickup with the same dropoff location, add the id of the corresponding dropoff to the
precedes
field.
- Combine the quantities of all of the pickups, then add the absolute value of the combined quantities to the
quantity
of the dropoff.
One pickup to many dropoffs
- For each dropoff with the same pickup location, add the id of the corresponding pickup to the
succeeds
field.
- Combine the quantities of all of the dropoffs, then add the negative value of the combined quantities to the
quantity
of the pickup.