struct

Google::Maps::RouteOptimization::ShipmentRoute

Inherits MessagePack::Serializable < JSON::Serializable < Google::Resource < Struct < Value < Object

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 | | | | || || | | | | | | || --++-----------------------------------------------------------------++-->

Constructors

new(pull : JSON::PullParser)
new(*, __pull_for_json_serializable pull : JSON::PullParser)

Instance methods

breaks

Breaks scheduled for the vehicle performing this route

has_traffic_infeasibilities

Indicates that inconsistencies in route timings are predicted using traffic-based travel duration estimates when consider_road_traffic is true

metrics

Duration, distance and load metrics for this route

route_costs

Cost of the route, broken down by cost-related request fields

route_polyline

The encoded polyline representation of the route. This field is only populated if OptimizeToursRequest.populate_polylines is set to true

route_total_cost

Total cost of the route. The sum of all costs in the cost map

transitions

Ordered list of transitions for the route

vehicle_end_time

Time at which the vehicle finishes its route

vehicle_index

Vehicle performing the route, identified by its index in the source ShipmentModel

vehicle_label

Label of the vehicle performing this route, equal to ShipmentModel.vehicles(vehicleIndex).label

vehicle_start_time

Time at which the vehicle starts 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.