Search…
Duration groups
You will learn the basics of using duration groups on cloud.
Duration groups let you set up stop groups to which an additional duration cost (in seconds) is applied every time one or many stops in the group are approached. This can be useful if some of your stops belong to a fenced apartment complex that needs some extra time to access. In that case you can group those stops together and specify an extra time needed to enter the complex. Once in the complex, the normal stop durations per stop are applied.
Duration groups are used with the duration_groups attribute which defines a list of stop groups. Each group must consist of at least 2 stops, given by their IDs, and a duration (in seconds) that is applied every time a stop in the group is approached from a stop that does not belong to the group. Stops can only belong to one group and must be listed only once within a group.
Duration groups do not enforce group assignment. Group assignments can be enforced using the stop groups feature.
The following input file adds two duration groups with different duration times of 600 and 300 seconds, respectively. In addition, it adds individual stop durations for location-2 and location-7 of 300 seconds.
JSON
1
{
2
"defaults": {
3
"vehicles": {
4
"speed": 10,
5
"shift_start": "2021-02-17T09:00:00-06:00"
6
}
7
},
8
"vehicles": [
9
{ "id": "vehicle-1" },
10
{ "id": "vehicle-2" }
11
],
12
"stops": [
13
{
14
"id": "location-1",
15
"position": { "lon": -96.827094, "lat": 33.004745 }
16
},
17
{
18
"id": "location-2",
19
"position": { "lon": -96.86074, "lat": 33.005741 },
20
"stop_duration": 300
21
},
22
{
23
"id": "location-3",
24
"position": { "lon": -96.820915, "lat": 32.969456 }
25
},
26
{
27
"id": "location-4",
28
"position": { "lon": -96.695259, "lat": 32.921629 }
29
},
30
{
31
"id": "location-5",
32
"position": { "lon": -96.785178, "lat": 32.981014 }
33
},
34
{
35
"id": "location-6",
36
"position": { "lon": -96.847693, "lat": 32.891106 }
37
},
38
{
39
"id": "location-7",
40
"position": { "lon": -96.915799, "lat": 33.049597 },
41
"stop_duration": 300
42
}
43
],
44
"duration_groups": [
45
{
46
"group": ["location-1", "location-3", "location-4", "location-5", "location-6"],
47
"duration": 600
48
},
49
{
50
"group": ["location-2", "location-7"],
51
"duration": 300
52
}
53
]
54
}
Copied!
Export as PDF
Copy link