Index
RouteOptimization
(interface)AggregatedMetrics
(message)BatchOptimizeToursMetadata
(message)BatchOptimizeToursRequest
(message)BatchOptimizeToursRequest.AsyncModelConfig
(message)BatchOptimizeToursResponse
(message)BreakRule
(message)BreakRule.BreakRequest
(message)BreakRule.FrequencyConstraint
(message)DataFormat
(enum)DistanceLimit
(message)GcsDestination
(message)GcsSource
(message)InjectedSolutionConstraint
(message)InjectedSolutionConstraint.ConstraintRelaxation
(message)InjectedSolutionConstraint.ConstraintRelaxation.Relaxation
(message)InjectedSolutionConstraint.ConstraintRelaxation.Relaxation.Level
(enum)InputConfig
(message)Location
(message)OptimizeToursRequest
(message)OptimizeToursRequest.SearchMode
(enum)OptimizeToursRequest.SolvingMode
(enum)OptimizeToursResponse
(message)OptimizeToursResponse.Metrics
(message)OptimizeToursValidationError
(message)OptimizeToursValidationError.FieldReference
(message)OutputConfig
(message)RouteModifiers
(message)Shipment
(message)Shipment.Load
(message)Shipment.VisitRequest
(message)ShipmentModel
(message)ShipmentModel.DurationDistanceMatrix
(message)ShipmentModel.DurationDistanceMatrix.Row
(message)ShipmentModel.PrecedenceRule
(message)ShipmentRoute
(message)ShipmentRoute.Break
(message)ShipmentRoute.EncodedPolyline
(message)ShipmentRoute.Transition
(message)ShipmentRoute.VehicleLoad
(message)ShipmentRoute.Visit
(message)ShipmentTypeIncompatibility
(message)ShipmentTypeIncompatibility.IncompatibilityMode
(enum)ShipmentTypeRequirement
(message)ShipmentTypeRequirement.RequirementMode
(enum)SkippedShipment
(message)SkippedShipment.Reason
(message)SkippedShipment.Reason.Code
(enum)TimeWindow
(message)TransitionAttributes
(message)Vehicle
(message)Vehicle.DurationLimit
(message)Vehicle.LoadLimit
(message)Vehicle.LoadLimit.Interval
(message)Vehicle.TravelMode
(enum)Vehicle.UnloadingPolicy
(enum)Waypoint
(message)
RouteOptimization
A service for optimizing vehicle tours.
Validity of certain types of fields:
google.protobuf.Timestamp
- Times are in Unix time: seconds since 1970-01-01T00:00:00+00:00.
- seconds must be in [0, 253402300799], i.e. in [1970-01-01T00:00:00+00:00, 9999-12-31T23:59:59+00:00].
- nanos must be unset or set to 0.
google.protobuf.Duration
- seconds must be in [0, 253402300799], i.e. in [1970-01-01T00:00:00+00:00, 9999-12-31T23:59:59+00:00].
- nanos must be unset or set to 0.
google.type.LatLng
- latitude must be in [-90.0, 90.0].
- longitude must be in [-180.0, 180.0].
- at least one of latitude and longitude must be non-zero.
BatchOptimizeTours |
---|
Optimizes vehicle tours for one or more This method is a Long Running Operation (LRO). The inputs for optimization ( The user can poll If the LRO If the LRO's
|
OptimizeTours |
---|
Sends an A The goal is to provide an assignment of
|
AggregatedMetrics
Aggregated metrics for ShipmentRoute
(resp. for OptimizeToursResponse
over all Transition
and/or Visit
(resp. over all ShipmentRoute
) elements.
Fields | |
---|---|
performed_ |
Number of shipments performed. Note that a pickup and delivery pair only counts once. |
travel_ |
Total travel duration for a route or a solution. |
wait_ |
Total wait duration for a route or a solution. |
delay_ |
Total delay duration for a route or a solution. |
break_ |
Total break duration for a route or a solution. |
visit_ |
Total visit duration for a route or a solution. |
total_ |
The total duration should be equal to the sum of all durations above. For routes, it also corresponds to:
|
travel_ |
Total travel distance for a route or a solution. |
max_ |
Maximum load achieved over the entire route (resp. solution), for each of the quantities on this route (resp. solution), computed as the maximum over all |
BatchOptimizeToursMetadata
This type has no fields.
Operation metadata for BatchOptimizeToursRequest
calls.
BatchOptimizeToursRequest
Request to batch optimize tours as an asynchronous operation. Each input file should contain one OptimizeToursRequest
, and each output file will contain one OptimizeToursResponse
. The request contains information to read/write and parse the files. All the input and output files should be under the same project.
Fields | |
---|---|
parent |
Required. Target project and location to make a call. Format: * If no location is specified, a region will be chosen automatically. |
model_ |
Required. Input/Output information each purchase model, such as file paths and data formats. |
AsyncModelConfig
Information for solving one optimization model asynchronously.
Fields | |
---|---|
display_ |
Optional. User defined model name, can be used as alias by users to keep track of models. |
input_ |
Required. Information about the input model. |
output_ |
Required. The desired output location information. |
BatchOptimizeToursResponse
This type has no fields.
Response to a BatchOptimizeToursRequest
. This is returned in the Long Running Operation after the operation is complete.
BreakRule
Rules to generate time breaks for a vehicle (e.g. lunch breaks). A break is a contiguous period of time during which the vehicle remains idle at its current position and cannot perform any visit. A break may occur:
- during the travel between two visits (which includes the time right before or right after a visit, but not in the middle of a visit), in which case it extends the corresponding transit time between the visits,
- or before the vehicle start (the vehicle may not start in the middle of a break), in which case it does not affect the vehicle start time.
- or after the vehicle end (ditto, with the vehicle end time).
Fields | |
---|---|
break_ |
Sequence of breaks. See the |
frequency_ |
Several |
BreakRequest
The sequence of breaks (i.e. their number and order) that apply to each vehicle must be known beforehand. The repeated BreakRequest
s define that sequence, in the order in which they must occur. Their time windows (earliest_start_time
/ latest_start_time
) may overlap, but they must be compatible with the order (this is checked).
Fields | |
---|---|
earliest_ |
Required. Lower bound (inclusive) on the start of the break. |
latest_ |
Required. Upper bound (inclusive) on the start of the break. |
min_ |
Required. Minimum duration of the break. Must be positive. |
FrequencyConstraint
One may further constrain the frequency and duration of the breaks specified above, by enforcing a minimum break frequency, such as "There must be a break of at least 1 hour every 12 hours". Assuming that this can be interpreted as "Within any sliding time window of 12h, there must be at least one break of at least one hour", that example would translate to the following FrequencyConstraint
:
{
min_break_duration { seconds: 3600 } # 1 hour.
max_inter_break_duration { seconds: 39600 } # 11 hours (12 - 1 = 11).
}
The timing and duration of the breaks in the solution will respect all such constraints, in addition to the time windows and minimum durations already specified in the BreakRequest
.
A FrequencyConstraint
may in practice apply to non-consecutive breaks. For example, the following schedule honors the "1h every 12h" example:
04:00 vehicle start
.. performing travel and visits ..
09:00 1 hour break
10:00 end of the break
.. performing travel and visits ..
12:00 20-min lunch break
12:20 end of the break
.. performing travel and visits ..
21:00 1 hour break
22:00 end of the break
.. performing travel and visits ..
23:59 vehicle end
Fields | |
---|---|
min_ |
Required. Minimum break duration for this constraint. Nonnegative. See description of |
max_ |
Required. Maximum allowed span of any interval of time in the route that does not include at least partially a break of |
DataFormat
Data formats for input and output files.
Enums | |
---|---|
DATA_FORMAT_UNSPECIFIED |
Invalid value, format must not be UNSPECIFIED. |
JSON |
JavaScript Object Notation. |
PROTO_TEXT |
Protocol Buffers text format. See https://protobuf.dev/reference/protobuf/textformat-spec/ |
DistanceLimit
A limit defining a maximum distance which can be traveled. It can be either hard or soft.
If a soft limit is defined, both soft_max_meters
and cost_per_kilometer_above_soft_max
must be defined and be nonnegative.
Fields | |
---|---|
max_ |
A hard limit constraining the distance to be at most max_meters. The limit must be nonnegative. |
soft_ |
A soft limit not enforcing a maximum distance limit, but when violated results in a cost which adds up to other costs defined in the model, with the same unit. If defined soft_max_meters must be less than max_meters and must be nonnegative. |
cost_ |
Cost per kilometer incurred, increasing up to
This cost is not supported in |
cost_ |
Cost per kilometer incurred if distance is above
The cost must be nonnegative. |
GcsDestination
The Google Cloud Storage location where the output file(s) will be written to.
Fields | |
---|---|
uri |
Required. Google Cloud Storage URI. |
GcsSource
The Google Cloud Storage location where the input file will be read from.
Fields | |
---|---|
uri |
Required. URI of a Google Cloud Storage object with the format |
InjectedSolutionConstraint
Solution injected in the request including information about which visits must be constrained and how they must be constrained.
Fields | |
---|---|
routes[] |
Routes of the solution to inject. Some routes may be omitted from the original solution. The routes and skipped shipments must satisfy the basic validity assumptions listed for |
skipped_ |
Skipped shipments of the solution to inject. Some may be omitted from the original solution. See the |
constraint_ |
For zero or more groups of vehicles, specifies when and how much to relax constraints. If this field is empty, all non-empty vehicle routes are fully constrained. |
ConstraintRelaxation
For a group of vehicles, specifies at what threshold(s) constraints on visits will be relaxed and to which level. Shipments listed in the skipped_shipment
field are constrained to be skipped; i.e., they cannot be performed.
Fields | |
---|---|
relaxations[] |
All the visit constraint relaxations that will apply to visits on routes with vehicles in |
vehicle_ |
Specifies the vehicle indices to which the visit constraint A vehicle index is mapped the same as |
Relaxation
If relaxations
is empty, the start time and sequence of all visits on routes
are fully constrained and no new visits may be inserted or added to those routes. Also, a vehicle's start and end time in routes
is fully constrained, unless the vehicle is empty (i.e., has no visits and has used_if_route_is_empty
set to false in the model).
relaxations(i).level
specifies the constraint relaxation level applied to a visit #j that satisfies:
route.visits(j).start_time >= relaxations(i).threshold_time
ANDj + 1 >= relaxations(i).threshold_visit_count
Similarly, the vehicle start is relaxed to relaxations(i).level
if it satisfies:
vehicle_start_time >= relaxations(i).threshold_time
ANDrelaxations(i).threshold_visit_count == 0
and the vehicle end is relaxed torelaxations(i).level
if it satisfies:vehicle_end_time >= relaxations(i).threshold_time
ANDroute.visits_size() + 1 >= relaxations(i).threshold_visit_count
To apply a relaxation level if a visit meets the threshold_visit_count
OR the threshold_time
add two relaxations
with the same level
: one with only threshold_visit_count
set and the other with only threshold_time
set. If a visit satisfies the conditions of multiple relaxations
, the most relaxed level applies. As a result, from the vehicle start through the route visits in order to the vehicle end, the relaxation level becomes more relaxed: i.e., the relaxation level is non-decreasing as the route progresses.
The timing and sequence of route visits that do not satisfy the threshold conditions of any relaxations
are fully constrained and no visits may be inserted into these sequences. Also, if a vehicle start or end does not satisfy the conditions of any relaxation the time is fixed, unless the vehicle is empty.
Fields | |
---|---|
level |
The constraint relaxation level that applies when the conditions at or after |
threshold_ |
The time at or after which the relaxation |
threshold_ |
The number of visits at or after which the relaxation If it is |
Level
Expresses the different constraint relaxation levels, which are applied for a visit and those that follow when it satisfies the threshold conditions.
The enumeration below is in order of increasing relaxation.
Enums | |
---|---|
LEVEL_UNSPECIFIED |
Implicit default relaxation level: no constraints are relaxed, i.e., all visits are fully constrained. This value must not be explicitly used in |
RELAX_VISIT_TIMES_AFTER_THRESHOLD |
Visit start times and vehicle start/end times will be relaxed, but each visit remains bound to the same vehicle and the visit sequence must be observed: no visit can be inserted between them or before them. |
RELAX_VISIT_TIMES_AND_SEQUENCE_AFTER_THRESHOLD |
Same as RELAX_VISIT_TIMES_AFTER_THRESHOLD , but the visit sequence is also relaxed: visits can only be performed by this vehicle, but can potentially become unperformed. |
RELAX_ALL_AFTER_THRESHOLD |
Same as RELAX_VISIT_TIMES_AND_SEQUENCE_AFTER_THRESHOLD , but the vehicle is also relaxed: visits are completely free at or after the threshold time and can potentially become unperformed. |
InputConfig
Specify an input for [BatchOptimizeTours][google.maps.routeoptimization.v1.RouteOptimizationService.BatchOptimizeTours].
Fields | |
---|---|
data_ |
Required. The input data format. |
Union field source . Required. source can be only one of the following: |
|
gcs_ |
A Google Cloud Storage location. This must be a single object (file). |
Location
Encapsulates a location (a geographic point, and an optional heading).
Fields | |
---|---|
lat_ |
The waypoint's geographic coordinates. |
heading |
The compass heading associated with the direction of the flow of traffic. This value is used to specify the side of the road to use for pickup and drop-off. Heading values can be from 0 to 360, where 0 specifies a heading of due North, 90 specifies a heading of due East, etc. |
OptimizeToursRequest
Request to be given to a tour optimization solver which defines the shipment model to solve as well as optimization parameters.
Fields | |
---|---|
parent |
Required. Target project or location to make a call. Format: * If no location is specified, a region will be chosen automatically. |
timeout |
If this timeout is set, the server returns a response before the timeout period has elapsed or the server deadline for synchronous requests is reached, whichever is sooner. For asynchronous requests, the server will generate a solution (if possible) before the timeout has elapsed. |
model |
Shipment model to solve. |
solving_ |
By default, the solving mode is |
search_ |
Search mode used to solve the request. |
injected_ |
Guide the optimization algorithm in finding a first solution that is similar to a previous solution. The model is constrained when the first solution is built. Any shipments not performed on a route are implicitly skipped in the first solution, but they may be performed in successive solutions. The solution must satisfy some basic validity assumptions:
If the injected solution is not feasible, a validation error is not necessarily returned and an error indicating infeasibility may be returned instead. |
injected_ |
Constrain the optimization algorithm to find a final solution that is similar to a previous solution. For example, this may be used to freeze portions of routes which have already been completed or which are to be completed but must not be modified. If the injected solution is not feasible, a validation error is not necessarily returned and an error indicating infeasibility may be returned instead. |
refresh_ |
If non-empty, the given routes will be refreshed, without modifying their underlying sequence of visits or travel times: only other details will be updated. This does not solve the model. As of 2020/11, this only populates the polylines of non-empty routes and requires that The This field must not be used together with
|
interpret_ |
If true:
This interpretation applies to the If true, labels in the following categories must appear at most once in their category:
If a Removing route visits or entire routes from an injected solution may have an effect on the implied constraints, which may lead to change in solution, validation errors, or infeasibility. NOTE: The caller must ensure that each |
consider_ |
Consider traffic estimation in calculating |
populate_ |
If true, polylines will be populated in response |
populate_ |
If true, polylines and route tokens will be populated in response |
allow_ |
If this is set, then the request can have a deadline (see https://grpc.io/blog/deadlines) of up to 60 minutes. Otherwise, the maximum deadline is only 30 minutes. Note that long-lived requests have a significantly larger (but still small) risk of interruption. |
use_ |
If true, travel distances will be computed using geodesic distances instead of Google Maps distances, and travel times will be computed using geodesic distances with a speed defined by |
label |
Label that may be used to identify this request, reported back in the |
geodesic_ |
When |
max_ |
Truncates the number of validation errors returned. These errors are typically attached to an INVALID_ARGUMENT error payload as a BadRequest error detail (https://cloud.google.com/apis/design/errors#error_details), unless solving_mode=VALIDATE_ONLY: see the |
SearchMode
Mode defining the behavior of the search, trading off latency versus solution quality. In all modes, the global request deadline is enforced.
Enums | |
---|---|
SEARCH_MODE_UNSPECIFIED |
Unspecified search mode, equivalent to RETURN_FAST . |
RETURN_FAST |
Stop the search after finding the first good solution. |
CONSUME_ALL_AVAILABLE_TIME |
Spend all the available time to search for better solutions. |
SolvingMode
Defines how the solver should handle the request. In all modes but VALIDATE_ONLY
, if the request is invalid, you will receive an INVALID_REQUEST
error. See max_validation_errors
to cap the number of errors returned.
Enums | |
---|---|
DEFAULT_SOLVE |
Solve the model. Warnings may be issued in [OptimizeToursResponse.validation_errors][google.cloud.optimization.v1.OptimizeToursResponse.validation_errors]. |
VALIDATE_ONLY |
Only validates the model without solving it: populates as many OptimizeToursResponse.validation_errors as possible. |
DETECT_SOME_INFEASIBLE_SHIPMENTS |
Only populates IMPORTANT: not all infeasible shipments are returned here, but only the ones that are detected as infeasible during preprocessing. |
OptimizeToursResponse
Response after solving a tour optimization problem containing the routes followed by each vehicle, the shipments which have been skipped and the overall cost of the solution.
Fields | |
---|---|
routes[] |
Routes computed for each vehicle; the i-th route corresponds to the i-th vehicle in the model. |
request_ |
Copy of the |
skipped_ |
The list of all shipments skipped. |
validation_ |
List of all the validation errors that we were able to detect independently. See the "MULTIPLE ERRORS" explanation for the |
metrics |
Duration, distance and usage metrics for this solution. |
Metrics
Overall metrics, aggregated over all routes.
Fields | |
---|---|
aggregated_ |
Aggregated over the routes. Each metric is the sum (or max, for loads) over all |
skipped_ |
Number of mandatory shipments skipped. |
used_ |
Number of vehicles used. Note: if a vehicle route is empty and |
earliest_ |
The earliest start time for a used vehicle, computed as the minimum over all used vehicles of |
latest_ |
The latest end time for a used vehicle, computed as the maximum over all used vehicles of |
costs |
Cost of the solution, broken down by cost-related request fields. The keys are proto paths, relative to the input OptimizeToursRequest, e.g. "model.shipments.pickups.cost", and the values are the total cost generated by the corresponding cost field, aggregated over the whole solution. In other words, costs["model.shipments.pickups.cost"] is the sum of all pickup costs over the solution. All costs defined in the model are reported in detail here with the exception of costs related to TransitionAttributes that are only reported in an aggregated way as of 2022/01. |
total_ |
Total cost of the solution. The sum of all values in the costs map. |
OptimizeToursValidationError
Describes an error or warning encountered when validating an OptimizeToursRequest
.
Fields | |
---|---|
code |
A validation error is defined by the pair ( The fields following this section provide more context about the error. MULTIPLE ERRORS: When there are multiple errors, the validation process tries to output several of them. Much like a compiler, this is an imperfect process. Some validation errors will be "fatal", meaning that they stop the entire validation process. This is the case for STABILITY: |
display_ |
The error display name. |
fields[] |
An error context may involve 0, 1 (most of the time) or more fields. For example, referring to vehicle #4 and shipment #2's first pickup can be done as follows:
Note, however, that the cardinality of |
error_ |
Human-readable string describing the error. There is a 1:1 mapping between STABILITY: Not stable: the error message associated to a given |
offending_ |
May contain the value(s) of the field(s). This is not always available. You should absolutely not rely on it and use it only for manual model debugging. |
FieldReference
Specifies a context for the validation error. A FieldReference
always refers to a given field in this file and follows the same hierarchical structure. For example, we may specify element #2 of start_time_windows
of vehicle #5 using:
name: "vehicles" index: 5 sub_field { name: "end_time_windows" index: 2 }
We however omit top-level entities such as OptimizeToursRequest
or ShipmentModel
to avoid crowding the message.
Fields | |
---|---|
name |
Name of the field, e.g., "vehicles". |
sub_ |
Recursively nested sub-field, if needed. |
Union field
|
|
index |
Index of the field if repeated. |
key |
Key if the field is a map. |
OutputConfig
Specify a destination for [BatchOptimizeTours][google.maps.routeoptimization.v1.RouteOptimizationService.BatchOptimizeTours] results.
Fields | |
---|---|
data_ |
Required. The output data format. |
Union field destination . Required. destination can be only one of the following: |
|
gcs_ |
The Google Cloud Storage location to write the output to. |
RouteModifiers
Encapsulates a set of optional conditions to satisfy when calculating vehicle routes. This is similar to RouteModifiers
in the Google Maps Platform Routes Preferred API; see: https://developers.google.com/maps/documentation/routes/reference/rest/v2/RouteModifiers.
Fields | |
---|---|
avoid_ |
Specifies whether to avoid toll roads where reasonable. Preference will be given to routes not containing toll roads. Applies only to motorized travel modes. |
avoid_ |
Specifies whether to avoid highways where reasonable. Preference will be given to routes not containing highways. Applies only to motorized travel modes. |
avoid_ |
Specifies whether to avoid ferries where reasonable. Preference will be given to routes not containing travel by ferries. Applies only to motorized travel modes. |
avoid_ |
Optional. Specifies whether to avoid navigating indoors where reasonable. Preference will be given to routes not containing indoor navigation. Applies only to the |
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).
Fields | |
---|---|
display_ |
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. |
load_ |
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. |
allowed_ |
The set of vehicles that may perform this shipment. If empty, all vehicles may perform it. Vehicles are given by their index in the |
costs_ |
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 |
costs_ |
Indices of the vehicles to which |
pickup_ |
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. |
pickup_ |
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. |
shipment_ |
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 |
penalty_ |
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. |
pickup_ |
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. |
Load
When performing a visit, a predefined amount may be added to the vehicle load if it's a pickup, or subtracted if it's a delivery. This message defines such amount. See load_demands
.
Fields | |
---|---|
amount |
The amount by which the load of the vehicle performing the corresponding visit will vary. Since it is an integer, users are advised to choose an appropriate unit to avoid loss of precision. Must be ≥ 0. |
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).
Fields | |
---|---|
arrival_ |
The geo-location where the vehicle arrives when performing this |
arrival_ |
The waypoint where the vehicle arrives when performing this |
departure_ |
The geo-location where the vehicle departs after completing this |
departure_ |
The waypoint where the vehicle departs after completing this |
tags[] |
Specifies tags attached to the visit request. Empty or duplicate strings are not allowed. |
time_ |
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 |
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 |
load_ |
Load demands of this visit request. This is just like |
visit_ |
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 |
ShipmentModel
A shipment model contains a set of shipments which must be performed by a set of vehicles, while minimizing the overall cost, which is the sum of:
- the cost of routing the vehicles (sum of cost per total time, cost per travel time, and fixed cost over all vehicles).
- the unperformed shipment penalties.
- the cost of the global duration of the shipments
Fields | |
---|---|
shipments[] |
Set of shipments which must be performed in the model. |
vehicles[] |
Set of vehicles which can be used to perform visits. |
global_ |
Global start and end time of the model: no times outside of this range can be considered valid. The model's time span must be less than a year, i.e. the When using |
global_ |
If unset, 00:00:00 UTC, January 1, 1971 (i.e. seconds: 31536000, nanos: 0) is used as default. |
global_ |
The "global duration" of the overall plan is the difference between the earliest effective start time and the latest effective end time of all vehicles. Users can assign a cost per hour to that quantity to try and optimize for earliest job completion, for example. This cost must be in the same unit as |
duration_ |
Specifies duration and distance matrices used in the model. If this field is empty, Google Maps or geodesic distances will be used instead, depending on the value of the Usage examples:
|
duration_ |
Tags defining the sources of the duration and distance matrices; Tags correspond to |
duration_ |
Tags defining the destinations of the duration and distance matrices; Tags correspond to |
transition_ |
Transition attributes added to the model. |
shipment_ |
Sets of incompatible shipment_types (see |
shipment_ |
Sets of |
precedence_ |
Set of precedence rules which must be enforced in the model. |
max_ |
Constrains the maximum number of active vehicles. A vehicle is active if its route performs at least one shipment. This can be used to limit the number of routes in the case where there are fewer drivers than vehicles and that the fleet of vehicles is heterogeneous. The optimization will then select the best subset of vehicles to use. Must be strictly positive. |
DurationDistanceMatrix
Specifies a duration and distance matrix from visit and vehicle start locations to visit and vehicle end locations.
Fields | |
---|---|
rows[] |
Specifies the rows of the duration and distance matrix. It must have as many elements as |
vehicle_ |
Tag defining to which vehicles this duration and distance matrix applies. If empty, this applies to all vehicles, and there can only be a single matrix. Each vehicle start must match exactly one matrix, i.e. exactly one of their All matrices must have a different |
Row
Specifies a row of the duration and distance matrix.
Fields | |
---|---|
durations[] |
Duration values for a given row. It must have as many elements as |
meters[] |
Distance values for a given row. If no costs or constraints refer to distances in the model, this can be left empty; otherwise it must have as many elements as |
PrecedenceRule
A precedence rule between two events (each event is the pickup or the delivery of a shipment): the "second" event has to start at least offset_duration
after "first" has started.
Several precedences can refer to the same (or related) events, e.g., "pickup of B happens after delivery of A" and "pickup of C happens after pickup of B".
Furthermore, precedences only apply when both shipments are performed and are otherwise ignored.
Fields | |
---|---|
first_ |
Indicates if the "first" event is a delivery. |
second_ |
Indicates if the "second" event is a delivery. |
offset_ |
The offset between the "first" and "second" event. It can be negative. |
first_ |
Shipment index of the "first" event. This field must be specified. |
second_ |
Shipment index of the "second" event. This field must be specified. |
ShipmentRoute
A vehicle's route can be decomposed, along the time axis, like this (we assume there are n visits):
| | | | | T[2], | | |
| Transition | Visit #0 | | | V[2], | | |
| #0 | aka | T[1] | V[1] | ... | V[n-1] | T[n] |
| aka T[0] | V[0] | | | V[n-2],| | |
| | | | | T[n-1] | | |
^ ^ ^ ^ ^ ^ ^ ^
vehicle V[0].start V[0].end V[1]. V[1]. V[n]. V[n]. vehicle
start (arrival) (departure) start end start end end
Note that we make a difference between:
- "punctual events", such as the vehicle start and end and each visit's start and end (aka arrival and departure). They happen at a given second.
- "time intervals", such as the visits themselves, and the transition between visits. Though time intervals can sometimes have zero duration, i.e. start and end at the same second, they often have a positive duration.
Invariants:
- If there are n visits, there are n+1 transitions.
- A visit is always surrounded by a transition before it (same index) and a transition after it (index + 1).
- The vehicle start is always followed by transition #0.
- The vehicle end is always preceded by transition #n.
Zooming in, here is what happens during a Transition
and a Visit
:
---+-------------------------------------+-----------------------------+-->
| TRANSITION[i] | VISIT[i] |
| | |
| * TRAVEL: the vehicle moves from | PERFORM the visit: |
| VISIT[i-1].departure_location to | |
| VISIT[i].arrival_location, which | * Spend some time: |
| takes a given travel duration | the "visit duration". |
| and distance | |
| | * Load or unload |
| * BREAKS: the driver may have | some quantities from the |
| breaks (e.g. lunch break). | vehicle: the "demand". |
| | |
| * WAIT: the driver/vehicle does | |
| nothing. This can happen for | |
| many reasons, for example when | |
| the vehicle reaches the next | |
| event's destination before the | |
| start of its time window | |
| | |
| * DELAY: *right before* the next | |
| arrival. E.g. the vehicle and/or | |
| driver spends time unloading. | |
| | |
---+-------------------------------------+-----------------------------+-->
^ ^ ^
V[i-1].end V[i].start V[i].end
Lastly, here is how the TRAVEL, BREAKS, DELAY and WAIT can be arranged during a transition.
- They don't overlap.
- The DELAY is unique and must be a contiguous period of time right before the next visit (or vehicle end). Thus, it suffice to know the delay duration to know its start and end time.
- The BREAKS are contiguous, non-overlapping periods of time. The response specifies the start time and duration of each break.
- TRAVEL and WAIT are "preemptable": they can be interrupted several times during this transition. Clients can assume that travel happens "as soon as possible" and that "wait" fills the remaining time.
A (complex) example:
TRANSITION[i]
--++-----+-----------------------------------------------------------++-->
|| | | | | | | ||
|| T | B | T | | B | | D ||
|| r | r | r | W | r | W | e ||
|| a | e | a | a | e | a | l ||
|| v | a | v | i | a | i | a ||
|| e | k | e | t | k | t | y ||
|| l | | l | | | | ||
|| | | | | | | ||
--++-----------------------------------------------------------------++-->
Fields | |
---|---|
vehicle_ |
Vehicle performing the route, identified by its index in the source |
vehicle_ |
Label of the vehicle performing this route, equal to |
vehicle_ |
Time at which the vehicle starts its route. |
vehicle_ |
Time at which the vehicle finishes its route. |
visits[] |
Ordered sequence of visits representing a route. visits[i] is the i-th visit in the route. If this field is empty, the vehicle is considered as unused. |
transitions[] |
Ordered list of transitions for the route. |
has_ |
When
Arrival at next_visit will likely happen later than its current time window due the increased estimate of travel time |
route_ |
The encoded polyline representation of the route. This field is only populated if |
breaks[] |
Breaks scheduled for the vehicle performing this route. The |
metrics |
Duration, distance and load metrics for this route. The fields of |
route_ |
Cost of the route, broken down by cost-related request fields. The keys are proto paths, relative to the input OptimizeToursRequest, e.g. "model.shipments.pickups.cost", and the values are the total cost generated by the corresponding cost field, aggregated over the whole route. In other words, costs["model.shipments.pickups.cost"] is the sum of all pickup costs over the route. All costs defined in the model are reported in detail here with the exception of costs related to TransitionAttributes that are only reported in an aggregated way as of 2022/01. |
route_ |
Total cost of the route. The sum of all costs in the cost map. |
Break
Data representing the execution of a break.
Fields | |
---|---|
start_ |
Start time of a break. |
duration |
Duration of a break. |
EncodedPolyline
The encoded representation of a polyline. More information on polyline encoding can be found here: https://developers.google.com/maps/documentation/utilities/polylinealgorithm https://developers.google.com/maps/documentation/javascript/reference/geometry#encoding.
Fields | |
---|---|
points |
String representing encoded points of the polyline. |
Transition
Transition between two events on the route. See the description of ShipmentRoute
.
If the vehicle does not have a start_location
and/or end_location
, the corresponding travel metrics are 0.
Fields | |
---|---|
travel_ |
Travel duration during this transition. |
travel_ |
Distance traveled during the transition. |
traffic_ |
When traffic is requested via |
delay_ |
Sum of the delay durations applied to this transition. If any, the delay starts exactly |
break_ |
Sum of the duration of the breaks occurring during this transition, if any. Details about each break's start time and duration are stored in |
wait_ |
Time spent waiting during this transition. Wait duration corresponds to idle time and does not include break time. Also note that this wait time may be split into several non-contiguous intervals. |
total_ |
Total duration of the transition, provided for convenience. It is equal to:
|
start_ |
Start time of this transition. |
route_ |
The encoded polyline representation of the route followed during the transition. This field is only populated if |
route_ |
Output only. An opaque token that can be passed to Navigation SDK to reconstruct the route during navigation, and, in the event of rerouting, honor the original intention when the route was created. Treat this token as an opaque blob. Don't compare its value across requests as its value may change even if the service returns the exact same route. This field is only populated if |
vehicle_ |
Vehicle loads during this transition, for each type that either appears in this vehicle's The loads during the first transition are the starting loads of the vehicle route. Then, after each visit, the visit's |
VehicleLoad
Reports the actual load of the vehicle at some point along the route, for a given type (see Transition.vehicle_loads
).
Fields | |
---|---|
amount |
The amount of load on the vehicle, for the given type. The unit of load is usually indicated by the type. See |
Visit
A visit performed during a route. This visit corresponds to a pickup or a delivery of a Shipment
.
Fields | |
---|---|
shipment_ |
Index of the |
is_ |
If true the visit corresponds to a pickup of a |
visit_ |
Index of |
start_ |
Time at which the visit starts. Note that the vehicle may arrive earlier than this at the visit location. Times are consistent with the |
load_ |
Total visit load demand as the sum of the shipment and the visit request |
detour |
Extra detour time due to the shipments visited on the route before the visit and to the potential waiting time induced by time windows. If the visit is a delivery, the detour is computed from the corresponding pickup visit and is equal to:
Otherwise, it is computed from the vehicle
|
shipment_ |
Copy of the corresponding |
visit_ |
Copy of the corresponding |
ShipmentTypeIncompatibility
Specifies incompatibilties between shipments depending on their shipment_type. The appearance of incompatible shipments on the same route is restricted based on the incompatibility mode.
Fields | |
---|---|
types[] |
List of incompatible types. Two shipments having different |
incompatibility_ |
Mode applied to the incompatibility. |
IncompatibilityMode
Modes defining how the appearance of incompatible shipments are restricted on the same route.
Enums | |
---|---|
INCOMPATIBILITY_MODE_UNSPECIFIED |
Unspecified incompatibility mode. This value should never be used. |
NOT_PERFORMED_BY_SAME_VEHICLE |
In this mode, two shipments with incompatible types can never share the same vehicle. |
NOT_IN_SAME_VEHICLE_SIMULTANEOUSLY |
For two shipments with incompatible types with the
|
ShipmentTypeRequirement
Specifies requirements between shipments based on their shipment_type. The specifics of the requirement are defined by the requirement mode.
Fields | |
---|---|
required_ |
List of alternative shipment types required by the |
dependent_ |
All shipments with a type in the NOTE: Chains of requirements such that a |
requirement_ |
Mode applied to the requirement. |
RequirementMode
Modes defining the appearance of dependent shipments on a route.
Enums | |
---|---|
REQUIREMENT_MODE_UNSPECIFIED |
Unspecified requirement mode. This value should never be used. |
PERFORMED_BY_SAME_VEHICLE |
In this mode, all "dependent" shipments must share the same vehicle as at least one of their "required" shipments. |
IN_SAME_VEHICLE_AT_PICKUP_TIME |
With the A "dependent" shipment pickup must therefore have either:
|
IN_SAME_VEHICLE_AT_DELIVERY_TIME |
Same as before, except the "dependent" shipments need to have a "required" shipment on their vehicle at the time of their delivery. |
SkippedShipment
Specifies details of unperformed shipments in a solution. For trivial cases and/or if we are able to identify the cause for skipping, we report the reason here.
Fields | |
---|---|
index |
The index corresponds to the index of the shipment in the source |
label |
Copy of the corresponding |
reasons[] |
A list of reasons that explain why the shipment was skipped. See comment above |
Reason
If we can explain why the shipment was skipped, reasons will be listed here. If the reason is not the same for all vehicles, reason
will have more than 1 element. A skipped shipment cannot have duplicate reasons, i.e. where all fields are the same except for example_vehicle_index
. Example:
reasons {
code: DEMAND_EXCEEDS_VEHICLE_CAPACITY
example_vehicle_index: 1
example_exceeded_capacity_type: "Apples"
}
reasons {
code: DEMAND_EXCEEDS_VEHICLE_CAPACITY
example_vehicle_index: 3
example_exceeded_capacity_type: "Pears"
}
reasons {
code: CANNOT_BE_PERFORMED_WITHIN_VEHICLE_DISTANCE_LIMIT
example_vehicle_index: 1
}
The skipped shipment is incompatible with all vehicles. The reasons may be different for all vehicles but at least one vehicle's "Apples" capacity would be exceeded (including vehicle 1), at least one vehicle's "Pears" capacity would be exceeded (including vehicle 3) and at least one vehicle's distance limit would be exceeded (including vehicle 1).
Fields | |
---|---|
code |
Refer to the comments of Code. |
example_ |
If the reason code is |
example_ |
If the reason is related to a shipment-vehicle incompatibility, this field provides the index of one relevant vehicle. |
Code
Code identifying the reason type. The order here is meaningless. In particular, it gives no indication of whether a given reason will appear before another in the solution, if both apply.
Enums | |
---|---|
CODE_UNSPECIFIED |
This should never be used. |
NO_VEHICLE |
There is no vehicle in the model making all shipments infeasible. |
DEMAND_EXCEEDS_VEHICLE_CAPACITY |
The demand of the shipment exceeds a vehicle's capacity for some capacity types, one of which is example_exceeded_capacity_type . |
CANNOT_BE_PERFORMED_WITHIN_VEHICLE_DISTANCE_LIMIT |
The minimum distance necessary to perform this shipment, i.e. from the vehicle's Note that for this computation we use the geodesic distances. |
CANNOT_BE_PERFORMED_WITHIN_VEHICLE_DURATION_LIMIT |
The minimum time necessary to perform this shipment, including travel time, wait time and service time exceeds the vehicle's Note: travel time is computed in the best-case scenario, namely as geodesic distance x 36 m/s (roughly 130 km/hour). |
CANNOT_BE_PERFORMED_WITHIN_VEHICLE_TRAVEL_DURATION_LIMIT |
Same as above but we only compare minimum travel time and the vehicle's travel_duration_limit . |
CANNOT_BE_PERFORMED_WITHIN_VEHICLE_TIME_WINDOWS |
The vehicle cannot perform this shipment in the best-case scenario (see CANNOT_BE_PERFORMED_WITHIN_VEHICLE_DURATION_LIMIT for time computation) if it starts at its earliest start time: the total time would make the vehicle end after its latest end time. |
VEHICLE_NOT_ALLOWED |
The allowed_vehicle_indices field of the shipment is not empty and this vehicle does not belong to it. |
TimeWindow
Time windows constrain the time of an event, such as the arrival time at a visit, or the start and end time of a vehicle.
Hard time window bounds, start_time
and end_time
, enforce the earliest and latest time of the event, such that start_time <= event_time <=
end_time
. The soft time window lower bound, soft_start_time
, expresses a preference for the event to happen at or after soft_start_time
by incurring a cost proportional to how long before soft_start_time the event occurs. The soft time window upper bound, soft_end_time
, expresses a preference for the event to happen at or before soft_end_time
by incurring a cost proportional to how long after soft_end_time
the event occurs. start_time
, end_time
, soft_start_time
and soft_end_time
should be within the global time limits (see ShipmentModel.global_start_time
and ShipmentModel.global_end_time
) and should respect:
0 <= `start_time` <= `end_time` and
0 <= `start_time` <= `soft_start_time` and
0 <= `soft_end_time` <= `end_time`.
Fields | |
---|---|
start_ |
The hard time window start time. If unspecified it will be set to |
end_ |
The hard time window end time. If unspecified it will be set to |
soft_ |
The soft start time of the time window. |
soft_ |
The soft end time of the time window. |
cost_ |
A cost per hour added to other costs in the model if the event occurs before soft_start_time, computed as:
This cost must be positive, and the field can only be set if soft_start_time has been set. |
cost_ |
A cost per hour added to other costs in the model if the event occurs after
This cost must be positive, and the field can only be set if |
TransitionAttributes
Specifies attributes of transitions between two consecutive visits on a route. Several TransitionAttributes
may apply to the same transition: in that case, all extra costs add up and the strictest constraint or limit applies (following natural "AND" semantics).
Fields | |
---|---|
src_ |
Tags defining the set of (src->dst) transitions these attributes apply to. A source visit or vehicle start matches iff its |
excluded_ |
See |
dst_ |
A destination visit or vehicle end matches iff its |
excluded_ |
See |
cost |
Specifies a cost for performing this transition. This is in the same unit as all other costs in the model and must not be negative. It is applied on top of all other existing costs. |
cost_ |
Specifies a cost per kilometer applied to the distance traveled while performing this transition. It adds up to any |
distance_ |
Specifies a limit on the distance traveled while performing this transition. As of 2021/06, only soft limits are supported. |
delay |
Specifies a delay incurred when performing this transition. This delay always occurs after finishing the source visit and before starting the destination visit. |
Vehicle
Models a vehicle in a shipment problem. Solving a shipment problem will build a route starting from start_location
and ending at end_location
for this vehicle. A route is a sequence of visits (see ShipmentRoute
).
Fields | |
---|---|
display_ |
The user-defined display name of the vehicle. It can be up to 63 characters long and may use UTF-8 characters. |
travel_ |
The travel mode which affects the roads usable by the vehicle and its speed. See also |
route_ |
A set of conditions to satisfy that affect the way routes are calculated for the given vehicle. |
start_ |
Geographic location where the vehicle starts before picking up any shipments. If not specified, the vehicle starts at its first pickup. If the shipment model has duration and distance matrices, |
start_ |
Waypoint representing a geographic location where the vehicle starts before picking up any shipments. If neither |
end_ |
Geographic location where the vehicle ends after it has completed its last |
end_ |
Waypoint representing a geographic location where the vehicle ends after it has completed its last |
start_ |
Specifies tags attached to the start of the vehicle's route. Empty or duplicate strings are not allowed. |
end_ |
Specifies tags attached to the end of the vehicle's route. Empty or duplicate strings are not allowed. |
start_ |
Time windows during which the vehicle may depart its start location. They must be within the global time limits (see Time windows belonging to the same repeated field must be disjoint, i.e. no time window can overlap with or be adjacent to another, and they must be in chronological order.
|
end_ |
Time windows during which the vehicle may arrive at its end location. They must be within the global time limits (see Time windows belonging to the same repeated field must be disjoint, i.e. no time window can overlap with or be adjacent to another, and they must be in chronological order.
|
unloading_ |
Unloading policy enforced on the vehicle. |
load_ |
Capacities of the vehicle (weight, volume, # of pallets for example). The keys in the map are the identifiers of the type of load, consistent with the keys of the |
cost_ |
Vehicle costs: all costs add up and must be in the same unit as Cost per hour of the vehicle route. This cost is applied to the total time taken by the route, and includes travel time, waiting time, and visit time. Using |
cost_ |
Cost per traveled hour of the vehicle route. This cost is applied only to travel time taken by the route (i.e., that reported in |
cost_ |
Cost per kilometer of the vehicle route. This cost is applied to the distance reported in the |
fixed_ |
Fixed cost applied if this vehicle is used to handle a shipment. |
used_ |
This field only applies to vehicles when their route does not serve any shipments. It indicates if the vehicle should be considered as used or not in this case. If true, the vehicle goes from its start to its end location even if it doesn't serve any shipments, and time and distance costs resulting from its start --> end travel are taken into account. Otherwise, it doesn't travel from its start to its end location, and no |
route_ |
Limit applied to the total duration of the vehicle's route. In a given |
travel_ |
Limit applied to the travel duration of the vehicle's route. In a given |
route_ |
Limit applied to the total distance of the vehicle's route. In a given |
extra_ |
Specifies a map from visit_types strings to durations. The duration is time in addition to If a visit request has multiple types, a duration will be added for each type in the map. |
break_ |
Describes the break schedule to be enforced on this vehicle. If empty, no breaks will be scheduled for this vehicle. |
label |
Specifies a label for this vehicle. This label is reported in the response as the |
ignore |
If true, If a shipment is performed by an ignored vehicle in If a shipment is performed by an ignored vehicle in |
travel_ |
Specifies a multiplicative factor that can be used to increase or decrease travel times of this vehicle. For example, setting this to 2.0 means that this vehicle is slower and has travel times that are twice what they are for standard vehicles. This multiple does not affect visit durations. It does affect cost if WARNING: Travel times will be rounded to the nearest second after this multiple is applied but before performing any numerical operations, thus, a small multiple may result in a loss of precision. See also |
DurationLimit
A limit defining a maximum duration of the route of a vehicle. It can be either hard or soft.
When a soft limit field is defined, both the soft max threshold and its associated cost must be defined together.
Fields | |
---|---|
max_ |
A hard limit constraining the duration to be at most max_duration. |
soft_ |
A soft limit not enforcing a maximum duration limit, but when violated makes the route incur a cost. This cost adds up to other costs defined in the model, with the same unit. If defined, |
quadratic_ |
A soft limit not enforcing a maximum duration limit, but when violated makes the route incur a cost, quadratic in the duration. This cost adds up to other costs defined in the model, with the same unit. If defined,
|
cost_ |
Cost per hour incurred if the
The cost must be nonnegative. |
cost_ |
Cost per square hour incurred if the The additional cost is 0 if the duration is under the threshold, otherwise the cost depends on the duration as follows:
The cost must be nonnegative. |
LoadLimit
Defines a load limit applying to a vehicle, e.g. "this truck may only carry up to 3500 kg". See load_limits
.
Fields | |
---|---|
soft_ |
A soft limit of the load. See |
cost_ |
If the load ever exceeds |
start_ |
The acceptable load interval of the vehicle at the start of the route. |
end_ |
The acceptable load interval of the vehicle at the end of the route. |
max_ |
The maximum acceptable amount of load. |
Interval
Interval of acceptable load amounts.
Fields | |
---|---|
min |
A minimum acceptable load. Must be ≥ 0. If they're both specified, |
max |
A maximum acceptable load. Must be ≥ 0. If unspecified, the maximum load is unrestricted by this message. If they're both specified, |
TravelMode
Travel modes which can be used by vehicles.
These should be a subset of the Google Maps Platform Routes Preferred API travel modes, see: https://developers.google.com/maps/documentation/routes_preferred/reference/rest/Shared.Types/RouteTravelMode.
Enums | |
---|---|
TRAVEL_MODE_UNSPECIFIED |
Unspecified travel mode, equivalent to DRIVING . |
DRIVING |
Travel mode corresponding to driving directions (car, ...). |
WALKING |
Travel mode corresponding to walking directions. |
UnloadingPolicy
Policy on how a vehicle can be unloaded. Applies only to shipments having both a pickup and a delivery.
Other shipments are free to occur anywhere on the route independent of unloading_policy
.
Enums | |
---|---|
UNLOADING_POLICY_UNSPECIFIED |
Unspecified unloading policy; deliveries must just occur after their corresponding pickups. |
LAST_IN_FIRST_OUT |
Deliveries must occur in reverse order of pickups |
FIRST_IN_FIRST_OUT |
Deliveries must occur in the same order as pickups |
Waypoint
Encapsulates a waypoint. Waypoints mark arrival and departure locations of VisitRequests, and start and end locations of Vehicles.
Fields | |
---|---|
side_ |
Optional. Indicates that the location of this waypoint is meant to have a preference for the vehicle to stop at a particular side of road. When you set this value, the route will pass through the location so that the vehicle can stop at the side of road that the location is biased towards from the center of the road. This option doesn't work for the 'WALKING' travel mode. |
Union field location_type . Different ways to represent a location. location_type can be only one of the following: |
|
location |
A point specified using geographic coordinates, including an optional heading. |
place_ |
The POI Place ID associated with the waypoint. |