Reference documentation and code samples for the Cloud Optimization V1 API class Google::Cloud::Optimization::V1::ShipmentRoute::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.
Inherits
- Object
Extended By
- Google::Protobuf::MessageExts::ClassMethods
Includes
- Google::Protobuf::MessageExts
Methods
#break_duration
def break_duration() -> ::Google::Protobuf::Duration
- (::Google::Protobuf::Duration) — 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 ShipmentRoute.breaks.
#break_duration=
def break_duration=(value) -> ::Google::Protobuf::Duration
- value (::Google::Protobuf::Duration) — 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 ShipmentRoute.breaks.
- (::Google::Protobuf::Duration) — 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 ShipmentRoute.breaks.
#delay_duration
def delay_duration() -> ::Google::Protobuf::Duration
-
(::Google::Protobuf::Duration) — Sum of the delay durations applied to this transition. If any, the delay
starts exactly
delay_duration
seconds before the next event (visit or vehicle end). See TransitionAttributes.delay.
#delay_duration=
def delay_duration=(value) -> ::Google::Protobuf::Duration
-
value (::Google::Protobuf::Duration) — Sum of the delay durations applied to this transition. If any, the delay
starts exactly
delay_duration
seconds before the next event (visit or vehicle end). See TransitionAttributes.delay.
-
(::Google::Protobuf::Duration) — Sum of the delay durations applied to this transition. If any, the delay
starts exactly
delay_duration
seconds before the next event (visit or vehicle end). See TransitionAttributes.delay.
#loads
def loads() -> ::Array<::Google::Cloud::Optimization::V1::CapacityQuantity>
- (::Array<::Google::Cloud::Optimization::V1::CapacityQuantity>) — Deprecated: Use [Transition.vehicle_loads][] instead.
#loads=
def loads=(value) -> ::Array<::Google::Cloud::Optimization::V1::CapacityQuantity>
- value (::Array<::Google::Cloud::Optimization::V1::CapacityQuantity>) — Deprecated: Use [Transition.vehicle_loads][] instead.
- (::Array<::Google::Cloud::Optimization::V1::CapacityQuantity>) — Deprecated: Use [Transition.vehicle_loads][] instead.
#route_polyline
def route_polyline() -> ::Google::Cloud::Optimization::V1::ShipmentRoute::EncodedPolyline
- (::Google::Cloud::Optimization::V1::ShipmentRoute::EncodedPolyline) — The encoded polyline representation of the route followed during the transition. This field is only populated if [populate_transition_polylines] [google.cloud.optimization.v1.OptimizeToursRequest.populate_transition_polylines] is set to true.
#route_polyline=
def route_polyline=(value) -> ::Google::Cloud::Optimization::V1::ShipmentRoute::EncodedPolyline
- value (::Google::Cloud::Optimization::V1::ShipmentRoute::EncodedPolyline) — The encoded polyline representation of the route followed during the transition. This field is only populated if [populate_transition_polylines] [google.cloud.optimization.v1.OptimizeToursRequest.populate_transition_polylines] is set to true.
- (::Google::Cloud::Optimization::V1::ShipmentRoute::EncodedPolyline) — The encoded polyline representation of the route followed during the transition. This field is only populated if [populate_transition_polylines] [google.cloud.optimization.v1.OptimizeToursRequest.populate_transition_polylines] is set to true.
#start_time
def start_time() -> ::Google::Protobuf::Timestamp
- (::Google::Protobuf::Timestamp) — Start time of this transition.
#start_time=
def start_time=(value) -> ::Google::Protobuf::Timestamp
- value (::Google::Protobuf::Timestamp) — Start time of this transition.
- (::Google::Protobuf::Timestamp) — Start time of this transition.
#total_duration
def total_duration() -> ::Google::Protobuf::Duration
-
(::Google::Protobuf::Duration) —
Total duration of the transition, provided for convenience. It is equal to:
- next visit
start_time
(orvehicle_end_time
if this is the last transition) - this transition'sstart_time
; - if
ShipmentRoute.has_traffic_infeasibilities
is false, the following additionally holds: `total_duration = travel_duration + delay_duration - break_duration + wait_duration`.
- next visit
#total_duration=
def total_duration=(value) -> ::Google::Protobuf::Duration
-
value (::Google::Protobuf::Duration) —
Total duration of the transition, provided for convenience. It is equal to:
- next visit
start_time
(orvehicle_end_time
if this is the last transition) - this transition'sstart_time
; - if
ShipmentRoute.has_traffic_infeasibilities
is false, the following additionally holds: `total_duration = travel_duration + delay_duration - break_duration + wait_duration`.
- next visit
-
(::Google::Protobuf::Duration) —
Total duration of the transition, provided for convenience. It is equal to:
- next visit
start_time
(orvehicle_end_time
if this is the last transition) - this transition'sstart_time
; - if
ShipmentRoute.has_traffic_infeasibilities
is false, the following additionally holds: `total_duration = travel_duration + delay_duration - break_duration + wait_duration`.
- next visit
#traffic_info_unavailable
def traffic_info_unavailable() -> ::Boolean
-
(::Boolean) — When traffic is requested via
[OptimizeToursRequest.consider_road_traffic]
[google.cloud.optimization.v1.OptimizeToursRequest.consider_road_traffic],
and the traffic info couldn't be retrieved for a
Transition
, this boolean is set to true. This may be temporary (rare hiccup in the realtime traffic servers) or permanent (no data for this location).
#traffic_info_unavailable=
def traffic_info_unavailable=(value) -> ::Boolean
-
value (::Boolean) — When traffic is requested via
[OptimizeToursRequest.consider_road_traffic]
[google.cloud.optimization.v1.OptimizeToursRequest.consider_road_traffic],
and the traffic info couldn't be retrieved for a
Transition
, this boolean is set to true. This may be temporary (rare hiccup in the realtime traffic servers) or permanent (no data for this location).
-
(::Boolean) — When traffic is requested via
[OptimizeToursRequest.consider_road_traffic]
[google.cloud.optimization.v1.OptimizeToursRequest.consider_road_traffic],
and the traffic info couldn't be retrieved for a
Transition
, this boolean is set to true. This may be temporary (rare hiccup in the realtime traffic servers) or permanent (no data for this location).
#travel_distance_meters
def travel_distance_meters() -> ::Float
- (::Float) — Distance traveled during the transition.
#travel_distance_meters=
def travel_distance_meters=(value) -> ::Float
- value (::Float) — Distance traveled during the transition.
- (::Float) — Distance traveled during the transition.
#travel_duration
def travel_duration() -> ::Google::Protobuf::Duration
- (::Google::Protobuf::Duration) — Travel duration during this transition.
#travel_duration=
def travel_duration=(value) -> ::Google::Protobuf::Duration
- value (::Google::Protobuf::Duration) — Travel duration during this transition.
- (::Google::Protobuf::Duration) — Travel duration during this transition.
#vehicle_loads
def vehicle_loads() -> ::Google::Protobuf::Map{::String => ::Google::Cloud::Optimization::V1::ShipmentRoute::VehicleLoad}
-
(::Google::Protobuf::Map{::String => ::Google::Cloud::Optimization::V1::ShipmentRoute::VehicleLoad}) — Vehicle loads during this transition, for each type that either appears
in this vehicle's Vehicle.load_limits, or that have non-zero
Shipment.load_demands on some shipment performed on this route.
The loads during the first transition are the starting loads of the vehicle route. Then, after each visit, the visit's
load_demands
are either added or subtracted to get the next transition's loads, depending on whether the visit was a pickup or a delivery.
#vehicle_loads=
def vehicle_loads=(value) -> ::Google::Protobuf::Map{::String => ::Google::Cloud::Optimization::V1::ShipmentRoute::VehicleLoad}
-
value (::Google::Protobuf::Map{::String => ::Google::Cloud::Optimization::V1::ShipmentRoute::VehicleLoad}) — Vehicle loads during this transition, for each type that either appears
in this vehicle's Vehicle.load_limits, or that have non-zero
Shipment.load_demands on some shipment performed on this route.
The loads during the first transition are the starting loads of the vehicle route. Then, after each visit, the visit's
load_demands
are either added or subtracted to get the next transition's loads, depending on whether the visit was a pickup or a delivery.
-
(::Google::Protobuf::Map{::String => ::Google::Cloud::Optimization::V1::ShipmentRoute::VehicleLoad}) — Vehicle loads during this transition, for each type that either appears
in this vehicle's Vehicle.load_limits, or that have non-zero
Shipment.load_demands on some shipment performed on this route.
The loads during the first transition are the starting loads of the vehicle route. Then, after each visit, the visit's
load_demands
are either added or subtracted to get the next transition's loads, depending on whether the visit was a pickup or a delivery.
#wait_duration
def wait_duration() -> ::Google::Protobuf::Duration
- (::Google::Protobuf::Duration) — 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.
#wait_duration=
def wait_duration=(value) -> ::Google::Protobuf::Duration
- value (::Google::Protobuf::Duration) — 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.
- (::Google::Protobuf::Duration) — 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.