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 name | Required | Data type | SI Unit | Defined on | Example | Configurable via defaults |
---|---|---|---|---|---|---|
duration_groups | No | array of duration_group | NA | input | {"duration_groups": [{"group":["foo", "bar"], "duration": 200}] | ➖ |
duration_group
Field name Required Data type SI Unit Description Example group
Yes array
ofstring
NA Stop IDs contained in the group. {"group": ["foo", "bar"]}
duration
Yes int
seconds
Duration to add when visiting the group. {"duration": 5}
Duration groups allow you to define an overhead duration that is added to the stops' regular duration each time a stop of the group is approached from a stop that is not part of the group. Duration groups are used with the duration_groups
feature which defines an array
of duration_group
. Each duration_group
holds a group (array
of string
) and a duration (int
) in seconds.
Here is an example defining duration groups. A sample output obtained after solving the problem is also shown.