You are viewing Nextmv legacy docs. ⚡️ Go to latest docs ⚡️

Cloud

Batched Requests

You will learn how to add batched requests to your input file.

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.
"stops": [
    {
        "id": "order-1-pickup",
        ...,
        "quantity": -70,
        "precedes": "batch-1-dropoff"
    },
    {
        "id": "order-2-pickup",
        ...,
        "quantity": -30,
        "precedes": "batch-1-dropoff"
    },
    {
        "id": "batch-1-dropoff",
        ...,
    },
    ...
]
Copy
  • Combine the quantities of all of the pickups, then add the absolute value of the combined quantities to the quantity of the dropoff.
"stops": [
    {
        "id": "order-1-pickup",
        ...,
        "quantity": -70,
        "precedes": "batch-1-dropoff"
    },
    {
        "id": "order-2-pickup",
        ...,
        "quantity": -30,
        "precedes": "batch-1-dropoff"
    },
    {
        "id": "batch-1-dropoff",
        ...,
        "quantity": 100
    },
    ...
]
Copy

One pickup to many dropoffs

  • For each dropoff with the same pickup location, add the id of the corresponding pickup to the succeeds field.
"stops": [
    {
        "id": "batch-1-pickup",
        ...,
    },
    {
        "id": "order-1-dropoff",
        ...,
        "quantity": 70,
        "succeeds": "batch-1-pickup"
    },
    {
        "id": "order-2-dropoff",
        ...,
        "quantity": 30,
        "succeeds": "batch-1-pickup"
    },
    ...
]
Copy
  • Combine the quantities of all of the dropoffs, then add the negative value of the combined quantities to the quantity of the pickup.
"stops": [
    {
        "id": "batch-1-pickup",
        ...,
        "quantity": -100
    },
    {
        "id": "order-1-dropoff",
        ...,
        "quantity": 70,
        "succeeds": "batch-1-pickup"
    },
    {
        "id": "order-2-dropoff",
        ...,
        "quantity": 30,
        "succeeds": "batch-1-pickup"
    },
    ...
]
Copy

Page last updated

Go to on-page nav menu