Prioritize the jobs
Introduction
Try ExampleIn this example we will take a look at how to run a query with job priority assigned to them. Higher priority jobs will not affect the order of the jobs but only influence whether the job will be assigned.
jobs: priority
priority: Set the priority of a job. The priority here will not affect the order of jobs but only influence whether this job will be assigned. Here, each job's priority is 0.
vehicles:
max_tasks: Set the limit on how many tasks a vehicle can take. Here, the vehicle can take up to a maximum of 5 tasks.
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
{ "jobs":[ { "id":3209765, "location_index":0, "service":2700, "priority":0, "time_windows":[ [ 1661760000, 1661803200 ] ] }, { "id":3209775, "location_index":1, "service":2700, "priority":0, "time_windows":[ [ 1661760000, 1661803200 ] ] } ], "vehicles":[ { "id":0, "start_index":0, "end_index":2, "max_tasks": 5 } ], "locations":{ "id":1, "description":"Single Route Optimization", "location":"42.47286605834961,-70.92628479003906|42.27931213378906,-71.1204833984375|42.4188232421875,-71.15650177001953" } }