Resource: Shipment
The shipment of a single item, from one of its pickups to one of its deliveries. For the shipment to be considered as performed, a unique vehicle must visit one of its pickup locations (and decrease its spare capacities accordingly), then visit one of its delivery locations later on (and therefore re-increase its spare capacities accordingly).
JSON representation |
---|
{ "name": string, "displayName": string, "pickups": [ { object ( |
Fields | |
---|---|
name |
The resource name of the shipment. This is a unique identifier. Format: |
displayName |
The user-defined display name of the shipment. It can be up to 63 characters long and may use UTF-8 characters. |
pickups[] |
Set of pickup alternatives associated to the shipment. If not specified, the vehicle only needs to visit a location corresponding to the deliveries. |
deliveries[] |
Set of delivery alternatives associated to the shipment. If not specified, the vehicle only needs to visit a location corresponding to the pickups. |
loadDemands |
Load demands of the shipment (for example weight, volume, number of pallets etc). The keys in the map should be identifiers describing the type of the corresponding load, ideally also including the units. For example: "weight_kg", "volume_gallons", "pallet_count", etc. If a given key does not appear in the map, the corresponding load is considered as null. |
allowedVehicleIndices[] |
The set of vehicles that may perform this shipment. If empty, all vehicles may perform it. Vehicles are given by their index in the |
allowedVehicleNames[] |
The resource names of vehicles that may perform this shipment. If empty, all vehicles may perform it. This field is used in the stateful service only. |
costsPerVehicle[] |
Specifies the cost that is incurred when this shipment is delivered by each vehicle. If specified, it must have EITHER:
These costs must be in the same unit as |
costsPerVehicleIndices[] |
Indices of the vehicles to which |
costsPerVehicleNames[] |
Resource names of the vehicles to which |
pickupToDeliveryAbsoluteDetourLimit |
Specifies the maximum absolute detour time compared to the shortest path from pickup to delivery. If specified, it must be nonnegative, and the shipment must contain at least a pickup and a delivery. For example, let t be the shortest time taken to go from the selected pickup alternative directly to the selected delivery alternative. Then setting
If both relative and absolute limits are specified on the same shipment, the more constraining limit is used for each possible pickup/delivery pair. As of 2017/10, detours are only supported when travel durations do not depend on vehicles. A duration in seconds with up to nine fractional digits, ending with ' |
pickupToDeliveryTimeLimit |
Specifies the maximum duration from start of pickup to start of delivery of a shipment. If specified, it must be nonnegative, and the shipment must contain at least a pickup and a delivery. This does not depend on which alternatives are selected for pickup and delivery, nor on vehicle speed. This can be specified alongside maximum detour constraints: the solution will respect both specifications. A duration in seconds with up to nine fractional digits, ending with ' |
shipmentType |
Non-empty string specifying a "type" for this shipment. This feature can be used to define incompatibilities or requirements between Differs from |
label |
Specifies a label for this shipment. This label is reported in the response in the |
ignore |
If true, skip this shipment, but don't apply a Ignoring a shipment results in a validation error when there are any Ignoring a shipment that is performed in |
demands[] |
Deprecated: Use |
penaltyCost |
If the shipment is not completed, this penalty is added to the overall cost of the routes. A shipment is considered completed if one of its pickup and delivery alternatives is visited. The cost may be expressed in the same unit used for all other cost-related fields in the model and must be positive. IMPORTANT: If this penalty is not specified, it is considered infinite, i.e. the shipment must be completed. |
pickupToDeliveryRelativeDetourLimit |
Specifies the maximum relative detour time compared to the shortest path from pickup to delivery. If specified, it must be nonnegative, and the shipment must contain at least a pickup and a delivery. For example, let t be the shortest time taken to go from the selected pickup alternative directly to the selected delivery alternative. Then setting
If both relative and absolute limits are specified on the same shipment, the more constraining limit is used for each possible pickup/delivery pair. As of 2017/10, detours are only supported when travel durations do not depend on vehicles. |
VisitRequest
Request for a visit which can be done by a vehicle: it has a geo-location (or two, see below), opening and closing times represented by time windows, and a service duration time (time spent by the vehicle once it has arrived to pickup or drop off goods).
JSON representation |
---|
{ "arrivalLocation": { object ( |
Fields | |
---|---|
arrivalLocation |
The geo-location where the vehicle arrives when performing this |
arrivalWaypoint |
The waypoint where the vehicle arrives when performing this |
departureLocation |
The geo-location where the vehicle departs after completing this |
departureWaypoint |
The waypoint where the vehicle departs after completing this |
tags[] |
Specifies tags attached to the visit request. Empty or duplicate strings are not allowed. |
timeWindows[] |
Time windows which constrain the arrival time at a visit. Note that a vehicle may depart outside of the arrival time window, i.e. arrival time + duration do not need to be inside a time window. This can result in waiting time if the vehicle arrives before The absence of Time windows must be disjoint, i.e. no time window must overlap with or be adjacent to another, and they must be in increasing order.
|
duration |
Duration of the visit, i.e. time spent by the vehicle between arrival and departure (to be added to the possible waiting time; see A duration in seconds with up to nine fractional digits, ending with ' |
cost |
Cost to service this visit request on a vehicle route. This can be used to pay different costs for each alternative pickup or delivery of a shipment. This cost must be in the same unit as |
loadDemands |
Load demands of this visit request. This is just like |
visitTypes[] |
Specifies the types of the visit. This may be used to allocate additional time required for a vehicle to complete this visit (see A type can only appear once. |
label |
Specifies a label for this |
demands[] |
Deprecated: Use |
Methods |
|
---|---|
|
Creates a shipment. |
|
Deletes a shipment. |
|
Gets a shipment. |
|
Lists the shipments within a workspace. |
|
Updates a shipment. |