Features

Stop duration multiplier

A how-to guide for using stop durations with vehicle routing.

This feature is configurable via .json input, without the need for code customization and is available for both the Marketplace app and Platform. You can find a list of all available features here.

This how-to guide assumes you already completed the get started with vehicle routing tutorial.

Field nameRequiredData typeSI UnitDefined onExampleConfigurable via defaults
stop_duration_multiplierNofloatNAvehicle{"stop_duration_multiplier": 1.23}

The stop_duration_multiplier specifies a multiplier for the vehicle on:

For example, a large semi-truck might take longer to park than a sedan, so the semi-truck's stop durations should be scaled up in comparison.

Here is an example defining a stop duration multiplier on a vehicle. A sample output obtained after solving the problem is also shown.

{
  "stops": [
    {
      "id": "Fushimi Inari Taisha",
      "location": { "lon": 135.772695, "lat": 34.967146 },
      "duration": 300
    },
    {
      "id": "Kiyomizu-dera",
      "location": { "lon": 135.78506, "lat": 34.994857 },
      "duration": 120
    },
    {
      "id": "Nijō Castle",
      "location": { "lon": 135.748134, "lat": 35.014239 },
      "duration": 180
    },
    {
      "id": "Kyoto Imperial Palace",
      "location": { "lon": 135.762057, "lat": 35.025431 },
      "duration": 600
    },
    {
      "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",
      "start_location": { "lon": 135.672009, "lat": 35.017209 },
      "speed": 20,
      "start_time": "2023-01-01T12:00:00Z",
      "stop_duration_multiplier": 2
    }
  ]
}
Copy

Page last updated