Features

Maximum route stops

A how-to guide for using maximum route stops with vehicle routing.

  • This feature is configurable via .json input, without the need for code customization.
  • Available for both the Marketplace app and Platform. You can find a list of all available features here.
Field nameRequiredData typeSI UnitDefined onExampleConfigurable via defaults
max_stopsNointNAvehicle{"max_stops": 2}

It may be useful to limit the number of stops in a route to a particular amount. This limit can be set via the max_stops feature on vehicles. The vehicle's starting and ending locations are not counted as stops.

Here is an example defining different maximum stops for vehicles. A sample output obtained after solving the problem is also shown.

{
  "defaults": {
    "vehicles": {
      "speed": 20
    },
    "stops": {
      "unplanned_penalty": 20000
    }
  },
  "stops": [
    {
      "id": "Fushimi Inari Taisha",
      "location": { "lon": 135.772695, "lat": 34.967146 }
    },
    {
      "id": "Kiyomizu-dera",
      "location": { "lon": 135.78506, "lat": 34.994857 }
    },
    {
      "id": "Nijō Castle",
      "location": { "lon": 135.748134, "lat": 35.014239 }
    },
    {
      "id": "Kyoto Imperial Palace",
      "location": { "lon": 135.762057, "lat": 35.025431 }
    },
    {
      "id": "Gionmachi",
      "location": { "lon": 135.775682, "lat": 35.002457 }
    },
    {
      "id": "Kinkaku-ji",
      "location": { "lon": 135.728898, "lat": 35.039705 }
    },
    {
      "id": "Arashiyama Bamboo Forest",
      "location": { "lon": 135.672009, "lat": 35.017209 }
    }
  ],
  "vehicles": [
    {
      "id": "v1",
      "max_stops": 2
    },
    {
      "id": "v2",
      "max_stops": 3
    }
  ]
}
Copy

Page last updated