Set-up Depots
Introduction
Try ExampleIn this example we used Depots and options.
-
depots: An array of depot object.
-
depot: Describes details of a depot.
- id: Describe an id for a depot object.
- location_index: Describe the location of the depot with its index in location.
-
options: An object to describe the options enabled in this optimization request.
- objective: Describe the objectives enabled for options
- travel_cost: Select a type of cost for optimization. Only “duration” and “distance” are valid inputs for this parameter.
- minimise_num_depots: Whether to minimise the number of depots in the routes.
- objective: Describe the objectives enabled for options
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
{ "description": "test depots", "locations": { "id": 50, "location": "1.40190776,103.75106528|1.42495049,103.79807462|1.31943721,103.74590942|1.3051865,103.87086328" }, "depots": [{ "id": 1, "location_index": 0 }], "options": { "objective": { "travel_cost": "distance", "minimise_num_depots": true } }, "vehicles": [{ "id": 1, "start_index": 0, "depot": 1, "costs": { "fixed": 900 } } ], "jobs": [{ "id": 1, "location_index": 3, "time_windows": [[1655694759,1655697099]] },{ "id": 2, "location_index": 2 } ] }