Understanding a successful request of cuOpt Server

Q: We are currently having some difficulty in understanding a successful request. Can you link me to the documents that describe this output?

A: In https://developer.nvidia.com/docs/cuopt/python/serv_api.html “Returns” we can observe what the result consists of.

  1. First value : status. 0 - Successful and 1-Failure
  2. Second value : cost of travel
  3. Third value : vehicle count
  4. Fourth : Dictionary contains “route”, “arrival_stamp”, “truck_id”

You can observe for each unique truck id, you can observe the route with increase in arrival stamp

Here is another sample output. A solution was successfully found, the cost is 1121.0948486328125, and 3 vehicles were used.

Think of the three dictionaries route, arrival_stamp, and truck_id as parallel arrays.

For example, if we look at route[“0”], arrival_stamp[“0”], and truck_id[“0”] we see that vehicle 8 arrived at the depot (location 0) at time 55.16215515136719.

Likewise, route[“1”], arrival_stamp[“1”], and truck_id[“1”] shows that vehicle 8 arrived at location 1 at time 200.

[
    0,
    1121.0948486328125,
    3,
    {
        "route": {
            "0": 0,
            "1": 1,
            "2": 0,
            "3": 0,
            "4": 4,
            "5": 2,
            "6": 0,
            "7": 0,
            "8": 3,
            "9": 5,
            "10": 0
        },
        "arrival_stamp": {
            "0": 55.16215515136719,
            "1": 200.0,
            "2": 434.83782958984375,
            "3": 158.02284240722656,
            "4": 355.0,
            "5": 955.0,
            "6": 1294.4674072265625,
            "7": 66.11724090576172,
            "8": 194.0,
            "9": 530.0,
            "10": 717.8621215820312
        },
        "truck_id": {
            "0": 8,
            "1": 8,
            "2": 8,
            "3": 11,
            "4": 11,
            "5": 11,
            "6": 11,
            "7": 12,
            "8": 12,
            "9": 12,
            "10": 12
        }
    }
]