• Optimization
  • Navigation
  • Tracking
  • Maps
  • Places

  • Integrations

Leverage skills and driver breaks

Introduction

Try Example

In this example, we will be looking at a query which includes breaks and skills parameters. Skills can represent user defined attributes which might be required for assigning jobs like an inter-state driver license or transportation certificate. Breaks describe any breaks like a lunch or restroom break with its time period.

job object: skills, setup

  • skills: Describes the skills needed for this job. It is a positive integer array. Each integer can represent specific skills defined internally like a special driving license or a transportation certificate. Here, we have a job that requires skills of 1 and 2.

  • setup: Describe the time needed for the setup of a job such as the preparation of necessary equipment. The time unit is in seconds. Here, we have a job that needs 60 seconds to do the setup.

vehicle object: breaks, skills

  • breaks: Describes the breaks the worker should take. It is an array of break objects as defined below

  • Each break object contains the following properties

    - id: A required field for a break object to uniquely identify the break. In this example we have a break object with id 1.

    - time_window: Indicates the period that a vehicle will be on a break. The value type used is the UNIX timestamp. Here, we have a driver who will take a break between 1662105600 [GMT: Friday, September 2, 2022, 8:00:00 AM] and 1662148800 [GMT: Friday, September 2, 2022, 8:00:00 PM].

    - service: Optional field for a break object. It describes how long is the break. Its time unit is in seconds. The default value is 0. Here, we have a driver who will have a break for 120 seconds.

  • skills: Describes the skills such as driving licenses and transportation certificates the driver has. It is a positive integer array. Here, we have a driver with skills 1, 2, and 3. Internally, the values could represent skills representative of your use case.

Request Example

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
{
   "jobs":[
      {
         "id":3210933,
         "location_index":1,
         "service":0,
         "priority":0,
         "setup": 60,
         "skills": [1,2],
         "time_windows":[
            [
               1662105600,
               1662148800
            ]
         ]
      },
      {
         "id":3195777,
         "location_index":2,
         "service":2700,
         "priority":0,
         "time_windows":[
            [
               1662105600,
               1662148800
            ]
         ]
      },
      {
         "id":3210932,
         "location_index":3,
         "service":1800,
         "priority":0,
         "time_windows":[
            [
               1662105600,
               1662148800
            ]
         ]
      },
      {
         "id":3195776,
         "location_index":4,
         "service":2700,
         "priority":0,
         "time_windows":[
            [
               1662105600,
               1662148800
            ]
         ]
      },
      {
         "id":3195779,
         "location_index":5,
         "service":2700,
         "priority":0,
         "time_windows":[
            [
               1662105600,
               1662148800
            ]
         ]
      },
      {
         "id":3223128,
         "location_index":6,
         "service":2700,
         "priority":0,
         "time_windows":[
            [
               1662123600,
               1662138000
            ]
         ]
      },
      {
         "id":3195781,
         "location_index":7,
         "service":2700,
         "priority":0,
         "time_windows":[
            [
               1662105600,
               1662148800
            ]
         ]
      },
      {
         "id":3195780,
         "location_index":8,
         "service":2700,
         "priority":0,
         "time_windows":[
            [
               1662105600,
               1662148800
            ]
         ]
      },
      {
         "id":3210914,
         "location_index":9,
         "service":2700,
         "priority":0,
         "time_windows":[
            [
               1662105600,
               1662148800
            ]
         ]
      },
      {
         "id":3228352,
         "location_index":10,
         "service":2700,
         "priority":0,
         "time_windows":[
            [
               1662156000,
               1662163200
            ]
         ]
      },
      {
         "id":3228351,
         "location_index":11,
         "service":2700,
         "priority":0,
         "time_windows":[
            [
               1662156000,
               1662163200
            ]
         ]
      }
   ],
   "vehicles":[
      {
         "id":0,
         "start_index":0,
         "end_index":11,
         "breaks": [{
				"id": 1,
				"time_windows": [[1662105600, 1662148800]],
				"service": 120
			}]
      }
   ],
   "locations":{
      "id":1,
      "description":"Single Route Optimization",
      "location":"30.111751556396484,-95.3961181640625|30.089160919189453,-95.38301849365234|30.09563636779785,-95.38431549072266|30.10651969909668,-95.38350677490234|30.100906372070312,-95.38841247558594|30.094728469848633,-95.38227081298828|30.08651351928711,-95.37181091308594|30.098817825317383,-95.3779067993164|30.095626831054688,-95.3820571899414|30.0726261138916,-95.39628601074219|30.109989166259766,-95.40796661376953|30.10837745666504,-95.40648651123047"
   }
}

Result