Relations
Relations are used to specify the association between different tasks that should be performed in a certain order. NextBillion.ai’s Route Optimization Flexible API offers three types of relations that the users can enforce:
-
in_same_route
: All the steps mentioned in this type of relation will be part of the same route. -
in_sequence
: All the steps mentioned in this relation will follow the specified sequence but other steps might be inserted by the optimizer, if feasible. -
in_direct_sequence
: All the steps mentioned in this relation will follow the specified sequence without any other steps being inserted between them by the solver.
However, a few points might be worthy to note here. Relations are a hard configuration, and the solution will not give precedence to tasks time_windows
, soft constraint parameters etc. Also, when using relations the vehicle properties like capacity and skills should be matched to what the tasks on those relations need.
Relations is a good feature to take care of certain special cases of task fulfillment within overall optimization problems.
Get Started
Readers would need a valid NextBillion API key to try this example out. If you don’t have one, please contact us to get your API key now!
Setup
Once you have a valid API Key, you can start setting up the components to be used in this example. Let’s take a look at them below.
Jobs & Shipments
We start by defining 10 jobs and 3 shipments. Let’s define the properties of these tasks:
-
A unique identifier for each task
-
Location indexes for each task
-
Specify the schedule of tasks. This is done by adding time windows within which a task must be completed. We have added a 15 min time window for all tasks.
The actual time taken to complete the tasks once the driver/vehicle is at the task’s location i.e. the service time for each task.
Let’s take a look at the jobs
JSON after the above properties are configured:
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
{ "jobs": [ { "id": 1, "location_index": 0, "service": 120, "pickup": [0], "time_windows": [[1693386000, 1693386900]] }, { "id": 2, "location_index": 1, "service": 180, "pickup": [0], "time_windows": [[1693387800, 1693388700]] }, { "id": 3, "location_index": 2, "service": 120, "pickup": [0], "time_windows": [[1693389600, 1693390500]] }, { "id": 4, "location_index": 3, "service": 120, "pickup": [0], "time_windows": [[1693391400, 1693392300]] }, { "id": 5, "location_index": 4, "service": 60, "pickup": [0], "time_windows": [[1693393200, 1693394100]] }, { "id": 6, "location_index": 5, "service": 120, "pickup": [0], "time_windows": [[1693396800, 1693397700]] }, { "id": 7, "location_index": 6, "service": 120, "pickup": [0], "time_windows": [[1693398600, 1693399500]] }, { "id": 8, "location_index": 7, "service": 150, "pickup": [0], "time_windows": [[1693401300, 1693402200]] }, { "id": 9, "location_index": 8, "service": 80, "pickup": [0], "time_windows": [[1693404000, 1693404900]] }, { "id": 10, "location_index": 9, "service": 120, "pickup": [0], "time_windows": [[1693405800, 1693406700]] } ], "shipments": [ { "pickup": { "description": "Shipment Pickup 1", "id": 1, "location_index": 10, "service": 120, "time_windows": [[1693395000, 1693395900]] }, "delivery": { "description": "Shipment Delivery 1", "id": 1, "location_index": 11, "service": 120, "time_windows": [[1693397700, 1693398600]] }, "amount": [2] }, { "pickup": { "description": "Shipment Pickup 2", "id": 2, "location_index": 12, "service": 120, "time_windows": [[1693399500, 1693400400]] }, "delivery": { "description": "Shipment Delivery 2", "id": 2, "location_index": 13, "service": 120, "time_windows": [[1693402200, 1693403100]] }, "amount": [2] }, { "pickup": { "description": "Shipment Pickup 3", "id": 3, "location_index": 14, "service": 120, "time_windows": [[1693400400, 1693401300]] }, "delivery": { "description": "Shipment Delivery 3", "id": 3, "location_index": 15, "service": 120, "time_windows": [[1693407600, 1693408500]] }, "amount": [2] } ] }
Vehicles
Next, we add 4 vehicles that will be responsible for fulfilling the tasks within the defined constraints. To describe the vehicles and their properties we add:
-
A unique ID for each vehicle
-
Vehicle shift time or the time window
-
Capacity to denote the amount of load that the vehicle can take
-
Start_index to denote the point from where the vehicle would start.
-
Costs for all vehicles. We have specified
fixed
cost for all vehicles
Once the vehicle and their properties are defined, the resulting vehicles
JSON is:
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
{ "vehicles": [ { "id": 1, "start_index": 16, "capacity": [20], "costs": { "fixed": 1000 }, "time_window": [1693382400, 1693418400] }, { "id": 2, "start_index": 17, "capacity": [20], "costs": { "fixed": 1000 }, "time_window": [1693382400, 1693418400] }, { "id": 3, "start_index": 18, "capacity": [20], "costs": { "fixed": 1000 }, "time_window": [1693382400, 1693418400] }, { "id": 4, "capacity": [20], "start_index": 19, "costs": { "fixed": 1000 }, "time_window": [1693382400, 1693418400] } ] }
Locations
Next, we define the locations
object and add all the locations used in the problem along with a valid id
. The locations
object with all the points used in this 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
{ "locations": { "id": 1, "location": [ "34.083950,-118.318640", "34.054927,-118.323726", "34.075525,-118.361588", "34.076350,-118.338519", "34.090425,-118.338933", "34.037925,-118.459842", "34.004364,-118.421170", "34.000215,-118.318803", "33.945884,-118.325628", "34.000895,-118.204929", "34.076646,-118.376969", "34.094986,-118.300885", "34.018780,-118.317919", "33.996658,-118.261708", "33.916595,-118.240132", "33.946275,-118.385486", "34.057106,-118.361326", "34.016137,-118.253523", "33.940407,-118.265196", "33.974060,-118.246945" ] } }
Relations
And, lastly, we define the relations between the tasks of our choice. For this example, we will
-
Keep shipment 3, jobs 7,8,9 in same route
-
Keep shipment 2 and job 10, 5 in direct sequence
-
Keep jobs 6, 4, 1 in sequence
-
Jobs 2, 3 and shipment 1 are not part of any relations
The relations
object once configured according to the above distribution results in :
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
{ "relations": [ { "type": "in_sequence", "steps": [ { "type": "start" }, { "type": "job", "id": 6 }, { "type": "job", "id": 4 }, { "type": "job", "id": 1 }, { "type": "end" } ], "vehicle": 1 }, { "type": "in_direct_sequence", "steps": [ { "type": "start" }, { "type": "pickup", "id": 2 }, { "type": "delivery", "id": 2 }, { "type": "job", "id": 10 }, { "type": "job", "id": 5 }, { "type": "end" } ] }, { "type": "in_same_route", "steps": [ { "type": "start" }, { "type": "pickup", "id": 3 }, { "type": "delivery", "id": 3 }, { "type": "job", "id": 7 }, { "type": "job", "id": 8 }, { "type": "job", "id": 9 }, { "type": "end" } ] } ] }
Optimization POST Request
Bringing all these attributes together, let’s create the final POST request that we will submit to the optimizer.
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 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403
curl --location 'https://api.nextbillion.io/optimization/v2?key=<your_api_key>' --request POST \ --header 'Content-Type: application/json' \ --data-raw '{ "description": "Relations Example", "jobs": [ { "id": 1, "location_index": 0, "service": 120, "pickup": [ 0 ], "time_windows": [ [ 1693386000, 1693386900 ] ] }, { "id": 2, "location_index": 1, "service": 180, "pickup": [ 0 ], "time_windows": [ [ 1693387800, 1693388700 ] ] }, { "id": 3, "location_index": 2, "service": 120, "pickup": [ 0 ], "time_windows": [ [ 1693389600, 1693390500 ] ] }, { "id": 4, "location_index": 3, "service": 120, "pickup": [ 0 ], "time_windows": [ [ 1693391400, 1693392300 ] ] }, { "id": 5, "location_index": 4, "service": 60, "pickup": [ 0 ], "time_windows": [ [ 1693393200, 1693394100 ] ] }, { "id": 6, "location_index": 5, "service": 120, "pickup": [ 0 ], "time_windows": [ [ 1693396800, 1693397700 ] ] }, { "id": 7, "location_index": 6, "service": 120, "pickup": [ 0 ], "time_windows": [ [ 1693398600, 1693399500 ] ] }, { "id": 8, "location_index": 7, "service": 150, "pickup": [ 0 ], "time_windows": [ [ 1693401300, 1693402200 ] ] }, { "id": 9, "location_index": 8, "service": 80, "pickup": [ 0 ], "time_windows": [ [ 1693404000, 1693404900 ] ] }, { "id": 10, "location_index": 9, "service": 120, "pickup": [ 0 ], "time_windows": [ [ 1693405800, 1693406700 ] ] } ], "shipments": [ { "pickup": { "description": "Shipment Pickup 1", "id": 1, "location_index": 10, "service": 120, "time_windows": [ [ 1693395000, 1693395900 ] ] }, "delivery": { "description": "Shipment Delivery 1", "id": 1, "location_index": 11, "service": 120, "time_windows": [ [ 1693397700, 1693398600 ] ] }, "amount": [ 2 ] }, { "pickup": { "description": "Shipment Pickup 2", "id": 2, "location_index": 12, "service": 120, "time_windows": [ [ 1693399500, 1693400400 ] ] }, "delivery": { "description": "Shipment Delivery 2", "id": 2, "location_index": 13, "service": 120, "time_windows": [ [ 1693402200, 1693403100 ] ] }, "amount": [ 2 ] }, { "pickup": { "description": "Shipment Pickup 3", "id": 3, "location_index": 14, "service": 120, "time_windows": [ [ 1693400400, 1693401300 ] ] }, "delivery": { "description": "Shipment Delivery 3", "id": 3, "location_index": 15, "service": 120, "time_windows": [ [ 1693407600, 1693408500 ] ] }, "amount": [ 2 ] } ], "vehicles": [ { "id": 1, "start_index": 16, "capacity": [ 20 ], "costs": { "fixed": 1000 }, "time_window": [ 1693382400, 1693418400 ] }, { "id": 2, "start_index": 17, "capacity": [ 20 ], "costs": { "fixed": 1000 }, "time_window": [ 1693382400, 1693418400 ] }, { "id": 3, "start_index": 18, "capacity": [ 20 ], "costs": { "fixed": 1000 }, "time_window": [ 1693382400, 1693418400 ] }, { "id": 4, "capacity": [ 20 ], "start_index": 19, "costs": { "fixed": 1000 }, "time_window": [ 1693382400, 1693418400 ] } ], "locations": { "id": 1, "location": [ "34.083950,-118.318640", "34.054927,-118.323726", "34.075525,-118.361588", "34.076350,-118.338519", "34.090425,-118.338933", "34.037925,-118.459842", "34.004364,-118.421170", "34.000215,-118.318803", "33.945884,-118.325628", "34.000895,-118.204929", "34.076646,-118.376969", "34.094986,-118.300885", "34.018780,-118.317919", "33.996658,-118.261708", "33.916595,-118.240132", "33.946275,-118.385486", "34.057106,-118.361326", "34.016137,-118.253523", "33.940407,-118.265196", "33.974060,-118.246945" ] }, "relations": [ { "type": "in_sequence", "steps": [ { "type": "start" }, { "type": "job", "id": 6 }, { "type": "job", "id": 4 }, { "type": "job", "id": 1 }, { "type": "end" } ], "vehicle": 1 }, { "type": "in_direct_sequence", "steps": [ { "type": "start" }, { "type": "pickup", "id": 2 }, { "type": "delivery", "id": 2 }, { "type": "job", "id": 10 }, { "type": "job", "id": 5 }, { "type": "end" } ] }, { "type": "in_same_route", "steps": [ { "type": "start" }, { "type": "pickup", "id": 3 }, { "type": "delivery", "id": 3 }, { "type": "job", "id": 7 }, { "type": "job", "id": 8 }, { "type": "job", "id": 9 }, { "type": "end" } ] } ] }'
Optimization POST Response
Once the request is made, we get a unique ID in the API response:
1 2 3 4 5
{ "id": "b6752a169903fd4cd6f820e4c27ff850", "message": "Optimization job created", "status": "Ok" }
Optimization GET Request
We take the ID and use the Optimization GET request to retrieve the result. Here is the GET request:
1 2
curl --location 'https://api.nextbillion.io/optimization/v2/result?id=b6752a169903fd4cd6f820e4c27ff850 &key=<your_api_key>'
Optimization GET Response
Following is the optimized route plan:
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 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309
{ "description": "Relations Example", "result": { "code": 0, "summary": { "cost": 16139, "routes": 3, "unassigned": 0, "service": 1910, "duration": 13139, "waiting_time": 15191, "priority": 0, "delivery": [6], "pickup": [6], "distance": 195236.8 }, "routes": [ { "vehicle": 1, "cost": 3006, "steps": [ { "type": "start", "arrival": 1693396088, "duration": 0, "service": 0, "waiting_time": 0, "location": [34.057106, -118.361326], "location_index": 16, "load": [0] }, { "type": "job", "arrival": 1693396800, "duration": 712, "service": 120, "waiting_time": 0, "location": [34.037925, -118.459842], "location_index": 5, "id": 6, "load": [0] }, { "type": "job", "arrival": 1693397904, "duration": 1696, "service": 120, "waiting_time": 0, "location": [34.07635, -118.338519], "location_index": 3, "id": 4, "load": [0], "late_by": 5604 }, { "type": "job", "arrival": 1693398334, "duration": 2006, "service": 120, "waiting_time": 0, "location": [34.08395, -118.31864], "location_index": 0, "id": 1, "load": [0], "late_by": 11434 }, { "type": "end", "arrival": 1693398454, "duration": 2006, "service": 0, "waiting_time": 0, "location": [34.08395, -118.31864], "location_index": 0, "load": [0] } ], "service": 360, "duration": 2006, "waiting_time": 0, "priority": 0, "delivery": [0], "pickup": [0], "distance": 31219.500000000004, "geometry": "ywznEjmlqUBG@G@GAEEEeAlBWb@KPMTU^_@p@O`BEVCRE^Ef@CVAXn@VFBB?PH^LxBv@ZLRFnBr@zAh@t@XRFHBz@ZbCz@j@Tx@\\`@LVJRHTDl@TPHNHZHh@RNF^L`@JNBRBN@L@@?Z@H?L?RATAR?HAH?L?L@@?L@TBPBLB`@HpB^|@P~@P~GnA~@N|@PbCb@nATTDXD@@dAPdAZXH`F`BbA^nBn@hA^jFfB`@LXFZD\\BP?P?D?PANANAVEXGLEFCh@SVOj@Yp@]RKVMn@]b@SZMPITIDALCLE@?RE`@GTA\\CP?\\?\\B\\BTFVDVFLDXFLDx@Tn@VCNCLG^Kl@CNAHAH?HAH?JAH?H?R?N?NAlAC~EAt@Ab@?VCXOdCAPEb@MrASpBG|@?RAN?N?ZCNKz@CNM~@OjAKz@Ij@EXEb@ALCTCPAXA`@AXAf@?^?f@@x@@^@`@Bh@Dd@Fr@Df@Hh@DXFb@H`@H\\FTZfAZ~@\\~@^x@v@|AxDxHnAfCnAdCJPHPLVTd@Tb@Rb@P\\Vf@P^Zp@b@z@Xn@Zl@^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[KOEYK_@Me@Qi@Q_@Om@SWI]OQIIEeAa@]Mg@QOGa@Kk@Sc@Mo@Qs@SSGeAY{@WWIk@OyCy@UIqBk@WG_@KiA[i@OICOEKCUIa@K[ISGk@O]IICa@Ki@M[K[IQEkA]c@Mo@Qs@Ss@So@Qe@Mc@MA?}@WC?MEQA??UAO?o@BI@M@S?i@@o@?q@?Y?G@iADK@G?s@?K?OCQAUEGAa@M]KKCQGk@QsA_@ICUEMEEAa@IMCg@GSCEAA?C?SAu@]IAICICGEECGGGOEOAECIKGSk@iAeDs@sBa@mAQe@CGEOIMGGGEEAECICsCy@MCe@Ka@Ia@Ii@MWG[IkA[cA[]Ia@Ma@MuCy@kBg@e@Mc@MmCu@]KW?KAI@K@M@KDGBC?MDWHE?M@QIM?O@O?}@@mB?cAAoC@w@?c@?c@@mB@Q?gE?_@?_@?_D?cAAkB@a@?g@?gAA}B@_E?kA?cF?iE?{A?gA@gCAM?s@@yBA]?a@?M?Q?{B?iF@iDAY?gEB_IAaFA[@[?_@?AaA?c@?U?g@?y@AwD?q@?}CAo@?qA?wA?g@?_C?O?OBY?Q@U?S?i@?i@?yAA_B?c@AwA?sA?e@@{AAcB?_@@{AAk@AO?_@?q@?W?m@?m@?i@AoA?u@?o@?i@?Y?o@?Q?y@?iBA{A@]?c@?[?u@?m@?W?m@?g@?e@?K?c@?g@?k@?cA?q@?e@?oB?a@?Y?i@AoB?Q?oA?oA?k@?e@?wA?s@_B@A`@@B?@?@?@DDBB@@@B?P?R?N?b@?d@?J??" }, { "vehicle": 2, "cost": 4750, "steps": [ { "type": "start", "arrival": 1693399645, "duration": 0, "service": 0, "waiting_time": 0, "location": [34.016137, -118.253523], "location_index": 17, "load": [0] }, { "type": "pickup", "arrival": 1693400400, "duration": 755, "service": 120, "waiting_time": 0, "location": [34.01878, -118.317919], "location_index": 12, "id": 2, "load": [2], "description": "Shipment Pickup 2" }, { "type": "delivery", "arrival": 1693401318, "duration": 1553, "service": 120, "waiting_time": 882, "location": [33.996658, -118.261708], "location_index": 13, "id": 2, "load": [0], "description": "Shipment Delivery 2" }, { "type": "job", "arrival": 1693403115, "duration": 2348, "service": 120, "waiting_time": 2685, "location": [34.000895, -118.204929], "location_index": 9, "id": 10, "load": [0] }, { "type": "job", "arrival": 1693407322, "duration": 3750, "service": 60, "waiting_time": 0, "location": [34.090425, -118.338933], "location_index": 4, "id": 5, "load": [0], "late_by": 13222 }, { "type": "end", "arrival": 1693407382, "duration": 3750, "service": 0, "waiting_time": 0, "location": [34.090425, -118.338933], "location_index": 4, "load": [0] } ], "service": 420, "duration": 3750, "waiting_time": 3567, "priority": 0, "delivery": [2], "pickup": [2], "distance": 44067.3, "geometry": "uwrnEbkwpUSKkBcAoAq@aB_AeAk@a@SsA{@{A{@g@a@a@_@mAeAmAkAmAgAmAiAoAgAsAgAk@hAYl@qCdGiAdCo@i@k@g@WUMMUSSSc@_@a@_@OO_@YiAaASSUQWWm@k@GGIGWU[UQOCCSQKIe@c@_@bAEv@CNKf@Sz@GTMb@Y~@Wx@?@GRO`@O`@Ul@I^]p@Yn@Sb@GVADk@nAq@nBc@tBgBzD_AtBSb@Q`@OZO^KRaAdCUl@e@pAUp@GROd@Md@M`@K^GTGVOj@CJKd@Sx@I`@SdAQv@Ot@S|@Ml@Oj@Kb@K`@St@KXGRITIVMZKXEJIRMZKTGNGNy@dBYn@S`@Ud@MVYn@o@tAO^MV]v@a@|@[v@Q\\g@hACFIPs@zAg@`AMVu@xAILS\\e@t@o@`AINc@r@c@p@]j@[h@MRi@`Aw@tAQ`@Q\\Sb@Qb@Ul@M\\Qd@GRGNK`@Oj@CHCHCLEPKf@CLCNCJAJAJ?DCL?FAJCr@?J?j@@^?bB?NBl@Bl@Br@HxALrFBd@DxAFdBDj@@L@XDp@@JJpAFj@Dd@Hn@@JTdBJv@@HBT@JN~@ZxBZlCJp@Fn@@HBZLjADt@Ft@FtADxABvA?x@?lA?pBAH?|@Aj@?~C?~AAv@AlHArAClF?`CEzE?nA?n@?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BSPURe@b@a@^WTq@r@ORMPi@t@W^iAfBaBdCi@t@QX]d@_@d@a@l@_@j@QZ]j@MROVU^_@h@S^QXOXOVOVEJEFO\\Q^Qb@KTOZKVUn@Qh@Up@Sp@W|@YhAAFoA|EUz@ADcAdE{@lDOf@Qp@c@dBGTI^a@bBIZQp@Qr@CH_@xAw@jCCDGVUn@Qd@CHGPM\\_EnLEJ}AvEiAxDMf@Sh@w@fCUr@EL_@`Ae@jAMVMZ_@|@Wl@Up@KZWp@GXOh@Sr@Oj@K\\I^K`@IXGZK`@EVKj@Kf@SdAGTShAc@xB{@hEKh@UlAg@fCCJGZWrACN[dBIb@W|Ak@fEOhA_@`CG`@c@|CALEP_@hCIn@EVIl@UjBGh@QxAGh@Iv@KdAMhAOnACRKn@QbAUhAQz@K`@Uz@W|@_@bAe@lASf@uBvEGLy@pBO\\gApCaAfCc@nAYt@c@jA_@dAOb@GNGNWr@c@jAq@hBs@fBIRk@rAe@`AKRSb@MTk@bAm@bAcC`E[h@sBdDiBzCy@pAiAlBe@r@ADSVg@r@STWXe@f@KJOLaAz@a@ZgBx@s@`@eAb@c@P_@NqBn@}@Xm@R?x@?T?L?Z@jA@v@?p@?|@A|B?L?b@?h@?z@?fA?b@?z@?lD?V?hA?pG?l@?b@?`@?j@@hA?^?l@?x@?vA?X?|@?n@@dA?V?pA?xC?b@?fA?dA?l@?z@?l@?r@?p@@nBAl@?l@?hA?t@?V?N?P?R?R?b@?^?n@?v@?b@?~@?|@?xE@dC?L?lA?L?`A?d@?\\?~@ApA?b@?v@?h@?r@?lA?d@?z@@t@?V?h@?N?fA?t@@d@?p@?lA?r@@^?X?\\?jA?lA?J?rA?l@?r@AxD?bA?^?tA?r@@hA?V?n@?p@?b@?z@?^@t@?x@?@?z@?r@?|@h@?L???" }, { "vehicle": 3, "cost": 8383, "steps": [ { "type": "start", "arrival": 1693387583, "duration": 0, "service": 0, "waiting_time": 0, "location": [33.940407, -118.265196], "location_index": 18, "load": [0] }, { "type": "job", "arrival": 1693388700, "duration": 1117, "service": 180, "waiting_time": 0, "location": [34.054927, -118.323726], "location_index": 1, "id": 2, "load": [0] }, { "type": "job", "arrival": 1693389434, "duration": 1671, "service": 120, "waiting_time": 166, "location": [34.075525, -118.361588], "location_index": 2, "id": 3, "load": [0] }, { "type": "pickup", "arrival": 1693389929, "duration": 1880, "service": 120, "waiting_time": 5071, "location": [34.076646, -118.376969], "location_index": 10, "id": 1, "load": [2], "description": "Shipment Pickup 1" }, { "type": "delivery", "arrival": 1693396042, "duration": 2802, "service": 120, "waiting_time": 1658, "location": [34.094986, -118.300885], "location_index": 11, "id": 1, "load": [0], "description": "Shipment Delivery 1" }, { "type": "job", "arrival": 1693398998, "duration": 3980, "service": 120, "waiting_time": 0, "location": [34.004364, -118.42117], "location_index": 6, "id": 7, "load": [0] }, { "type": "pickup", "arrival": 1693400155, "duration": 5017, "service": 120, "waiting_time": 245, "location": [33.916595, -118.240132], "location_index": 14, "id": 3, "load": [2], "description": "Shipment Pickup 3" }, { "type": "job", "arrival": 1693401606, "duration": 6103, "service": 150, "waiting_time": 0, "location": [34.000215, -118.318803], "location_index": 7, "id": 8, "load": [2] }, { "type": "job", "arrival": 1693402383, "duration": 6730, "service": 80, "waiting_time": 1617, "location": [33.945884, -118.325628], "location_index": 8, "id": 9, "load": [2] }, { "type": "delivery", "arrival": 1693404733, "duration": 7383, "service": 120, "waiting_time": 2867, "location": [33.946275, -118.385486], "location_index": 15, "id": 3, "load": [0], "description": "Shipment Delivery 3" }, { "type": "end", "arrival": 1693407720, "duration": 7383, "service": 0, "waiting_time": 0, "location": [33.946275, -118.385486], "location_index": 15, "load": [0] } ], "service": 1130, "duration": 7383, "waiting_time": 11624, "priority": 0, "delivery": [4], "pickup": [4], "distance": 119950, "geometry": "q~cnEftypU{B?aC?o@??P?dBAzHAdI?J?~AwD@wA?}A??JAtABpI?bI@lB?R?~A?`J@fC?\\?R@fAAzB?X?X?`B?T?nAuDUyAKQAk@EI?QAgDKuBCaA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nA?L?N?R?\\Al@?bB?bB?~@?R@J?d@AjA@f@?lA?bB?x@?\\@`@?z@?Z?L?`@?V?Z?Z?V?Z?v@?X?Z?T?T?Z?Z?Z?X?R?|@?dA?d@?f@?\\@lAA|A?l@?X?^@\\?~A?t@?z@?nA?T?f@?vA@j@Ap@?P?J@\\?R?N?P?N?Z?d@?j@@X?RAlA?n@?V?L?N?`@?n@?z@?X?N?tC?jD?J?|C?rA?fC?h@?L?t@?nD?\\@xDAZ?V?PAZ?PAJAP?HEl@Gr@?RAH?^Al@?p@?L?X?nB@bB?tA?\\?zA?rB?r@?^?jB?fD?P?|B?F?X?T?r@?L@fB?v@c@AgAA?aAz@?BA@A?E@uCc@?Y?C?ABA@@hB??" } ] }, "status": "Ok", "message": "" }
Following is a visual representation of the initial locations of tasks, vehicles and the routes suggested after optimization as per the given constraints.
Analyzing the Solution
Looking at the result we can observe some interesting insights:
-
From the summary, we can see that all the jobs were assigned and a total of 3 routes were created.
-
The
in_sequence
relation with jobs 6, 4, 1 gets fulfilled through vehicle 1. Job 4 & 1 could not be fulfilled within their time window. -
The
in_direct_sequence
relation with shipment 2 and jobs 10 & 5 get fulfilled through vehicle 2. Job 5 could not be fulfilled within its time window. -
The
in_same_route
relation with shipment 3 and jobs 7, 8, 9 get fulfilled through vehicle 3. -
Rest of all tasks - jobs 2, 3 and shipment 1 - were also taken care of by vehicle 3 on the same route as well.
As we can see, NextBillion.ai’s Route Optimization Flexible API honors the relation constraints exactly as configured. To explore more readers can change the contents of different relations, assign different vehicles to relations. Or else they can just remove the relations object and contrast the result with the above and see how adding relations impacts the job distribution, number of routes, costs, wait_time etc.
We hope this example was helpful. Check out some more use cases that Route Optimization Flexible API can handle for you!