Configure shipments

这篇文档目前尚未提供译文,将以原文展示。

Introduction

Try Example

In this example we will build an example using the shipments object.

  1. service: Indicates how much time will be spent in the actual pickup. For example, it could take 90 seconds from reaching a pickup location, pick up the shipment, and return to the vehicle. Here we assume we need 120 seconds to work for a pickup.
  2. time_windows: Indicates the period during which the delivery needs to be made. The value type used is the UNIX timestamp. Here, we assume we need to do the pickup between 1661770800 [GMT: Monday, August 29, 2022, 11:00:00 AM] and 1661792400 [GMT: Monday, August 29, 2022, 5:00:00 PM].
  3. 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, we assume each of their priorities is 1.
  1. service: Indicates how much time will be spent operating a job. For example, it could take 90 seconds from reaching a pickup location, pick up the shipment, and return to the vehicle. Here, we assume we need 120 seconds for completing a delivery.
  2. time_windows: Indicates the period between which the delivery needs to be made. The value type used is the UNIX timestamp. Here, we assume we need to do the delivery between 1661770800 [GMT: Monday, August 29, 2022, 11:00:00 AM] and 1661792400 [GMT: Monday, August 29, 2022, 5:00:00 PM].
  3. amount: Indicates how many passengers/cargo will be picked up and delivered. It is multidimensional and can represent amounts for different kinds of items. Here, we assume we only have 1 kind of item in this shipment.
  4. skills: Describes the skills such as driving licenses and transportation certificate requirements needed for completion of the shipment. It is a positive integer array. Here, we have a shipment that requires skills 1 and 2. Internally, the values could represent skills representative of your use case.

Request Example

1
2{
3    "locations": {
4        "id": 1,
5        "description": "Test Shipment",
6        "location": "40.82013,-73.87622|40.72203,-73.97584|40.81031,-73.92569|40.68547,-73.9935|40.57697,-73.9727|40.76398,-73.84215|40.89673,-73.7944|40.82951,-73.9282|40.7553,-73.7560|40.6998,-73.80726|40.630855,-73.95247"
7    },
8    "shipments": [
9        {
10            "pickup": {
11                "id": 1,
12                "location_index": 0,
13                "service": 120,
14                "time_windows": [
15                    [
16                        1661770800,
17                        1661792400
18                    ]
19                ],
20                "priority": 1
21            },
22            "delivery": {
23                "id": 1,
24                "location_index": 1,
25                "service": 120,
26                "time_windows": [
27                    [
28                        1661770800,
29                        1661792400
30                    ]
31                ],
32                "priority": 1
33            },
34            "amount": [
35                1
36            ]
37        },
38        {
39            "pickup": {
40                "id": 2,
41                "location_index": 2,
42                "service": 120,
43                "time_windows": [
44                    [
45                        1661770800,
46                        1661792400
47                    ]
48                ],
49                "priority": 1
50            },
51            "delivery": {
52                "id": 2,
53                "location_index": 3,
54                "service": 120,
55                "time_windows": [
56                    [
57                        1661770800,
58                        1661792400
59                    ]
60                ],
61                "priority": 1
62            },
63            "amount": [
64                1
65            ],
66            "skills": [1,2]
67        },
68        {
69            "pickup": {
70                "id": 3,
71                "location_index": 4,
72                "service": 120,
73                "time_windows": [
74                    [
75                        1661770800,
76                        1661792400
77                    ]
78                ],
79                "priority": 1
80            },
81            "delivery": {
82                "id": 3,
83                "location_index": 5,
84                "service": 120,
85                "time_windows": [
86                    [
87                        1661770800,
88                        1661792400
89                    ]
90                ],
91                "priority": 1
92            },
93            "amount": [
94                1
95            ]
96        }
97    ],
98    "vehicles": [
99        {
100            "id": 1,
101            "start_index": 8,
102            "capacity": [
103                1
104            ],
105            "time_window": [
106                1661770800,
107                1661792400
108            ],
109            "skills": [1,2,3]
110        },
111        {
112            "id": 2,
113            "start_index": 6,
114            "capacity": [
115                1
116            ],
117            "time_window": [
118                1661770800,
119                1661792400
120            ]
121        }
122    ]
123}
124

Result

Service example including skills and break times
depots and options example
没找到你要找的内容?