Leverage skills and driver breaks
这篇文档目前尚未提供译文,将以原文展示。
Introduction
Try ExampleIn 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 "jobs":[
3 {
4 "id":3210933,
5 "location_index":1,
6 "service":0,
7 "priority":0,
8 "setup": 60,
9 "skills": [1,2],
10 "time_windows":[
11 [
12 1662105600,
13 1662148800
14 ]
15 ]
16 },
17 {
18 "id":3195777,
19 "location_index":2,
20 "service":2700,
21 "priority":0,
22 "time_windows":[
23 [
24 1662105600,
25 1662148800
26 ]
27 ]
28 },
29 {
30 "id":3210932,
31 "location_index":3,
32 "service":1800,
33 "priority":0,
34 "time_windows":[
35 [
36 1662105600,
37 1662148800
38 ]
39 ]
40 },
41 {
42 "id":3195776,
43 "location_index":4,
44 "service":2700,
45 "priority":0,
46 "time_windows":[
47 [
48 1662105600,
49 1662148800
50 ]
51 ]
52 },
53 {
54 "id":3195779,
55 "location_index":5,
56 "service":2700,
57 "priority":0,
58 "time_windows":[
59 [
60 1662105600,
61 1662148800
62 ]
63 ]
64 },
65 {
66 "id":3223128,
67 "location_index":6,
68 "service":2700,
69 "priority":0,
70 "time_windows":[
71 [
72 1662123600,
73 1662138000
74 ]
75 ]
76 },
77 {
78 "id":3195781,
79 "location_index":7,
80 "service":2700,
81 "priority":0,
82 "time_windows":[
83 [
84 1662105600,
85 1662148800
86 ]
87 ]
88 },
89 {
90 "id":3195780,
91 "location_index":8,
92 "service":2700,
93 "priority":0,
94 "time_windows":[
95 [
96 1662105600,
97 1662148800
98 ]
99 ]
100 },
101 {
102 "id":3210914,
103 "location_index":9,
104 "service":2700,
105 "priority":0,
106 "time_windows":[
107 [
108 1662105600,
109 1662148800
110 ]
111 ]
112 },
113 {
114 "id":3228352,
115 "location_index":10,
116 "service":2700,
117 "priority":0,
118 "time_windows":[
119 [
120 1662156000,
121 1662163200
122 ]
123 ]
124 },
125 {
126 "id":3228351,
127 "location_index":11,
128 "service":2700,
129 "priority":0,
130 "time_windows":[
131 [
132 1662156000,
133 1662163200
134 ]
135 ]
136 }
137 ],
138 "vehicles":[
139 {
140 "id":0,
141 "start_index":0,
142 "end_index":11,
143 "breaks": [{
144 "id": 1,
145 "time_windows": [[1662105600, 1662148800]],
146 "service": 120
147 }]
148 }
149 ],
150 "locations":{
151 "id":1,
152 "description":"Single Route Optimization",
153 "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"
154 }
155}
Result

prioritized jobs
shipments example