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

Features

Compatibility Attributes

You will learn how to use compatibility attributes on cloud.

Vehicles and stops can have compatibility attributes. Compatibility attributes are characteristics of the vehicle and requirements of the stop. They determine whether a vehicle is eligible to service a stop and ultimately whether a given solution is feasible.

The compatibility attributes constraint prevents the assignment of stops to vehicles that are not eligible due to specific requirements. For example, a stop with an order that requires refrigeration will not be assigned to a vehicle that does not have refrigeration.

For each vehicle, add the attributes to the compatibility_attributes array, as needed.

A compatibility constraint is satisfied if one attribute is matched. In the case that multiple attribute constraints must be satisfied, concatenate them as a single string inside the array (e.g. refrigerated-oversized) for both the relevant vehicles and stops.

For each vehicle and stop, add the relevant attributes to the compatibility_attributes array. The string must be an exact match for the relevant vehicles and stops; spelling or phrasing errors will prevent correct attribute matching.

{
  "defaults": {
    "vehicles": {
      "shift_start": "2021-08-24T09:00:00-06:00",
      "speed": 10
    }
  },
  "vehicles": [
    {
      "id": "vehicle-1",
      "start": { "lon": 7.613, "lat": 51.945 },
      // Vehicle will match with any stop that has any of the following
      // attributes.
      "compatibility_attributes": [
        "refrigerated",
        "oversized",
        "refigerated-oversized"
      ]
    },
    {
      "id": "vehicle-2",
      "start": { "lon": 7.6127, "lat": 51.959 }
    }
  ],
  "stops": [
    {
      "id": "location-1",
      "position": { "lon": 7.6129, "lat": 51.957 },
      "compatibility_attributes": ["refrigerated"]
    },
    {
      "id": "location-2",
      "position": { "lon": 7.6166, "lat": 51.9635 }
    },
    {
      "id": "location-3",
      "position": { "lon": 7.6258, "lat": 51.9624 }
    }
  ]
}
Copy

Page last updated