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 "description": "test depots",
3 "locations": {
4 "id": 50,
5 "location": "1.40190776,103.75106528|1.42495049,103.79807462|1.31943721,103.74590942|1.3051865,103.87086328"
6 },
7 "depots": [{
8 "id": 1,
9 "location_index": 0
10 }],
11 "options":
12 {
13 "objective": {
14 "travel_cost": "distance",
15 "minimise_num_depots": true
16 }
17 },
18 "vehicles": [{
19 "id": 1,
20 "start_index": 0,
21 "depot": 1,
22 "costs": {
23 "fixed": 900
24 }
25 }
26 ],
27 "jobs": [{
28 "id": 1,
29 "location_index": 3,
30 "time_windows": [[1655694759,1655697099]]
31 },{
32 "id": 2,
33 "location_index": 2
34 }
35 ]
36}
37
Result

shipments example