struct Google::Maps::RouteOptimization::ShipmentRoute

Overview

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

Included Modules

Extended Modules

Defined in:

maps.cr

Constructors

Instance Method Summary

Macros inherited from module Google::Resource

define(name, *fields) define, field(var, key = nil, **options, &block) field, field!(var, key = nil, **options, &block) field!, field?(var, key = nil, **options, &block) field?

Constructor Detail

def self.new(pull : JSON::PullParser) #

def self.new(pull : MessagePack::Unpacker) #

Instance Method Detail

def breaks : Array(Break) #

Breaks scheduled for the vehicle performing this route


def has_traffic_infeasibilities : Bool #

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


def metrics : AggregatedMetrics #

Duration, distance and load metrics for this route


def route_costs : Hash(String, Float64) #

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


def route_polyline : EncodedPolyline | Nil #

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


def route_total_cost : Float64 #

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


def transitions : Array(Transition) #

Ordered list of transitions for the route


def vehicle_end_time : Time #

Time at which the vehicle finishes its route


def vehicle_index : Int32 #

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


def vehicle_label : String | Nil #

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


def vehicle_start_time : Time #

Time at which the vehicle starts its route


def visits : Array(Visit) #

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.