Transition(mapping=None, *, ignore_unknown_fields=False, **kwargs)
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.
Attributes
Name | Description |
travel_duration |
google.protobuf.duration_pb2.Duration
Travel duration during this transition. |
travel_distance_meters |
float
Distance traveled during the transition. |
traffic_info_unavailable |
bool
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). |
delay_duration |
google.protobuf.duration_pb2.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. |
break_duration |
google.protobuf.duration_pb2.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. |
wait_duration |
google.protobuf.duration_pb2.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. |
total_duration |
google.protobuf.duration_pb2.Duration
Total duration of the transition, provided for convenience. It is equal to: - next visit ``start_time`` (or ``vehicle_end_time`` if this is the last transition) - this transition's ``start_time``; - if ``ShipmentRoute.has_traffic_infeasibilities`` is false, the following additionally holds: \`total_duration = travel_duration + delay_duration - break_duration + wait_duration`. |
start_time |
google.protobuf.timestamp_pb2.Timestamp
Start time of this transition. |
route_polyline |
google.cloud.optimization_v1.types.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. |
vehicle_loads |
Mapping[str, google.cloud.optimization_v1.types.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. |
loads |
Sequence[google.cloud.optimization_v1.types.CapacityQuantity]
Deprecated: Use [Transition.vehicle_loads][] instead. |
Inheritance
builtins.object > proto.message.Message > TransitionClasses
VehicleLoadsEntry
VehicleLoadsEntry(mapping=None, *, ignore_unknown_fields=False, **kwargs)
The abstract base class for a message.
Name | Description |
kwargs |
dict
Keys and values corresponding to the fields of the message. |
mapping |
Union[dict, `.Message`]
A dictionary or message to be used to determine the values for this message. |
ignore_unknown_fields |
Optional(bool)
If True, do not raise errors for unknown fields. Only applied if |