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 aTransition, this boolean is set to true. This may be temporary (rare hiccup in the realtime traffic servers) or permanent (no data for this location).
Sum of the delay durations applied to this transition. If any, the delay starts exactlydelay_durationseconds before the next event (visit or vehicle end). SeeTransitionAttributes.delay.
Sum of the duration of the breaks occurring during this transition, if any. Details about each break's start time and duration are stored inShipmentRoute.breaks.
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 of the transition, provided for convenience. It is equal to: * * next visitstart_time(orvehicle_end_timeif this is the last transition) - this transition'sstart_time; * * ifShipmentRoute.has_traffic_infeasibilitiesis false, the following additionally holds:total_duration = travel_duration + delay_duration + break_duration + wait_duration.
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 during this transition, for each type that either appears in this vehicle'sVehicle.load_limits, or that have non-zeroShipment.load_demandson 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'sload_demandsare either added or subtracted to get the next transition's loads, depending on whether the visit was a pickup or a delivery.
When traffic is requested viaOptimizeToursRequest.consider_road_traffic,
and the traffic info couldn't be retrieved for aTransition, this
boolean is set to true. This may be temporary (rare hiccup in the
realtime traffic servers) or permanent (no data for this location).
Returns
Type
Description
bool
setTrafficInfoUnavailable
When traffic is requested viaOptimizeToursRequest.consider_road_traffic,
and the traffic info couldn't be retrieved for aTransition, this
boolean is set to true. This may be temporary (rare hiccup in the
realtime traffic servers) or permanent (no data for this location).
Parameter
Name
Description
var
bool
Returns
Type
Description
$this
getDelayDuration
Sum of the delay durations applied to this transition. If any, the delay
starts exactlydelay_durationseconds before the next event (visit or
vehicle end). SeeTransitionAttributes.delay.
Sum of the delay durations applied to this transition. If any, the delay
starts exactlydelay_durationseconds before the next event (visit or
vehicle end). SeeTransitionAttributes.delay.
Sum of the duration of the breaks occurring during this transition, if
any. Details about each break's start time and duration are stored inShipmentRoute.breaks.
Sum of the duration of the breaks occurring during this transition, if
any. Details about each break's start time and duration are stored inShipmentRoute.breaks.
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.
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.
Vehicle loads during this transition, for each type that either appears
in this vehicle'sVehicle.load_limits,
or that have non-zeroShipment.load_demandson 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'sload_demandsare
either added or subtracted to get the next transition's loads, depending
on whether the visit was a pickup or a delivery.
Vehicle loads during this transition, for each type that either appears
in this vehicle'sVehicle.load_limits,
or that have non-zeroShipment.load_demandson 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'sload_demandsare
either added or subtracted to get the next transition's loads, depending
on whether the visit was a pickup or a delivery.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Google Cloud Optimization V1 Client - Class Transition (1.0.5)\n\nVersion latestkeyboard_arrow_down\n\n- [1.0.5 (latest)](/php/docs/reference/cloud-optimization/latest/V1.ShipmentRoute.Transition)\n- [1.0.4](/php/docs/reference/cloud-optimization/1.0.4/V1.ShipmentRoute.Transition)\n- [0.7.0](/php/docs/reference/cloud-optimization/0.7.0/V1.ShipmentRoute.Transition)\n- [0.6.5](/php/docs/reference/cloud-optimization/0.6.5/V1.ShipmentRoute.Transition)\n- [0.5.1](/php/docs/reference/cloud-optimization/0.5.1/V1.ShipmentRoute.Transition)\n- [0.4.0](/php/docs/reference/cloud-optimization/0.4.0/V1.ShipmentRoute.Transition)\n- [0.3.4](/php/docs/reference/cloud-optimization/0.3.4/V1.ShipmentRoute.Transition)\n- [0.2.0](/php/docs/reference/cloud-optimization/0.2.0/V1.ShipmentRoute.Transition)\n- [0.1.9](/php/docs/reference/cloud-optimization/0.1.9/V1.ShipmentRoute.Transition) \nReference documentation and code samples for the Google Cloud Optimization V1 Client class Transition.\n\nTransition between two events on the route. See the description of\n[ShipmentRoute](/php/docs/reference/cloud-optimization/latest/V1.ShipmentRoute).\n\nIf the vehicle does not have a `start_location` and/or `end_location`, the\ncorresponding travel metrics are 0.\n\nGenerated from protobuf message `google.cloud.optimization.v1.ShipmentRoute.Transition`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ Optimization \\\\ V1 \\\\ ShipmentRoute\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getTravelDuration\n\nTravel duration during this transition.\n\n### hasTravelDuration\n\n### clearTravelDuration\n\n### setTravelDuration\n\nTravel duration during this transition.\n\n### getTravelDistanceMeters\n\nDistance traveled during the transition.\n\n### setTravelDistanceMeters\n\nDistance traveled during the transition.\n\n### getTrafficInfoUnavailable\n\nWhen traffic is requested via\n[OptimizeToursRequest.consider_road_traffic](/php/docs/reference/cloud-optimization/latest/V1.OptimizeToursRequest#_Google_Cloud_Optimization_V1_OptimizeToursRequest__getConsiderRoadTraffic__),\nand the traffic info couldn't be retrieved for a `Transition`, this\nboolean is set to true. This may be temporary (rare hiccup in the\nrealtime traffic servers) or permanent (no data for this location).\n\n### setTrafficInfoUnavailable\n\nWhen traffic is requested via\n[OptimizeToursRequest.consider_road_traffic](/php/docs/reference/cloud-optimization/latest/V1.OptimizeToursRequest#_Google_Cloud_Optimization_V1_OptimizeToursRequest__getConsiderRoadTraffic__),\nand the traffic info couldn't be retrieved for a `Transition`, this\nboolean is set to true. This may be temporary (rare hiccup in the\nrealtime traffic servers) or permanent (no data for this location).\n\n### getDelayDuration\n\nSum of the delay durations applied to this transition. If any, the delay\nstarts exactly `delay_duration` seconds before the next event (visit or\nvehicle end). See\n[TransitionAttributes.delay](/php/docs/reference/cloud-optimization/latest/V1.TransitionAttributes#_Google_Cloud_Optimization_V1_TransitionAttributes__getDelay__).\n\n### hasDelayDuration\n\n### clearDelayDuration\n\n### setDelayDuration\n\nSum of the delay durations applied to this transition. If any, the delay\nstarts exactly `delay_duration` seconds before the next event (visit or\nvehicle end). See\n[TransitionAttributes.delay](/php/docs/reference/cloud-optimization/latest/V1.TransitionAttributes#_Google_Cloud_Optimization_V1_TransitionAttributes__getDelay__).\n\n### getBreakDuration\n\nSum of the duration of the breaks occurring during this transition, if\nany. Details about each break's start time and duration are stored in\n[ShipmentRoute.breaks](/php/docs/reference/cloud-optimization/latest/V1.ShipmentRoute#_Google_Cloud_Optimization_V1_ShipmentRoute__getBreaks__).\n\n### hasBreakDuration\n\n### clearBreakDuration\n\n### setBreakDuration\n\nSum of the duration of the breaks occurring during this transition, if\nany. Details about each break's start time and duration are stored in\n[ShipmentRoute.breaks](/php/docs/reference/cloud-optimization/latest/V1.ShipmentRoute#_Google_Cloud_Optimization_V1_ShipmentRoute__getBreaks__).\n\n### getWaitDuration\n\nTime spent waiting during this transition. Wait duration corresponds to\nidle time and does not include break time. Also note that this wait time\nmay be split into several non-contiguous intervals.\n\n### hasWaitDuration\n\n### clearWaitDuration\n\n### setWaitDuration\n\nTime spent waiting during this transition. Wait duration corresponds to\nidle time and does not include break time. Also note that this wait time\nmay be split into several non-contiguous intervals.\n\n### getTotalDuration\n\nTotal duration of the transition, provided for convenience. It is equal\nto:\n\n- next visit `start_time` (or `vehicle_end_time` if this is the last transition) - this transition's `start_time`;\n- if `ShipmentRoute.has_traffic_infeasibilities` is false, the following additionally holds: \\`total_duration = travel_duration + delay_duration\n- break_duration + wait_duration\\`.\n\n### hasTotalDuration\n\n### clearTotalDuration\n\n### setTotalDuration\n\nTotal duration of the transition, provided for convenience. It is equal\nto:\n\n- next visit `start_time` (or `vehicle_end_time` if this is the last transition) - this transition's `start_time`;\n- if `ShipmentRoute.has_traffic_infeasibilities` is false, the following additionally holds: \\`total_duration = travel_duration + delay_duration\n- break_duration + wait_duration\\`.\n\n### getStartTime\n\nStart time of this transition.\n\n### hasStartTime\n\n### clearStartTime\n\n### setStartTime\n\nStart time of this transition.\n\n### getRoutePolyline\n\nThe encoded polyline representation of the route followed during the\ntransition.\n\nThis field is only populated if [populate_transition_polylines](/php/docs/reference/cloud-optimization/latest/V1.OptimizeToursRequest#_Google_Cloud_Optimization_V1_OptimizeToursRequest__getPopulateTransitionPolylines__)\nis set to true.\n\n### hasRoutePolyline\n\n### clearRoutePolyline\n\n### setRoutePolyline\n\nThe encoded polyline representation of the route followed during the\ntransition.\n\nThis field is only populated if [populate_transition_polylines](/php/docs/reference/cloud-optimization/latest/V1.OptimizeToursRequest#_Google_Cloud_Optimization_V1_OptimizeToursRequest__getPopulateTransitionPolylines__)\nis set to true.\n\n### getVehicleLoads\n\nVehicle loads during this transition, for each type that either appears\nin this vehicle's\n[Vehicle.load_limits](/php/docs/reference/cloud-optimization/latest/V1.Vehicle#_Google_Cloud_Optimization_V1_Vehicle__getLoadLimits__),\nor that have non-zero\n[Shipment.load_demands](/php/docs/reference/cloud-optimization/latest/V1.Shipment#_Google_Cloud_Optimization_V1_Shipment__getLoadDemands__)\non some shipment performed on this route.\n\nThe loads during the first transition are the starting loads of the\nvehicle route. Then, after each visit, the visit's `load_demands` are\neither added or subtracted to get the next transition's loads, depending\non whether the visit was a pickup or a delivery.\n\n### setVehicleLoads\n\nVehicle loads during this transition, for each type that either appears\nin this vehicle's\n[Vehicle.load_limits](/php/docs/reference/cloud-optimization/latest/V1.Vehicle#_Google_Cloud_Optimization_V1_Vehicle__getLoadLimits__),\nor that have non-zero\n[Shipment.load_demands](/php/docs/reference/cloud-optimization/latest/V1.Shipment#_Google_Cloud_Optimization_V1_Shipment__getLoadDemands__)\non some shipment performed on this route.\n\nThe loads during the first transition are the starting loads of the\nvehicle route. Then, after each visit, the visit's `load_demands` are\neither added or subtracted to get the next transition's loads, depending\non whether the visit was a pickup or a delivery.\n\n### getLoads\n\nDeprecated: Use\n[Transition.vehicle_loads](/php/docs/reference/cloud-optimization/latest/V1.ShipmentRoute.Transition#_Google_Cloud_Optimization_V1_ShipmentRoute_Transition__getVehicleLoads__)\ninstead.\n\n### setLoads\n\nDeprecated: Use\n[Transition.vehicle_loads](/php/docs/reference/cloud-optimization/latest/V1.ShipmentRoute.Transition#_Google_Cloud_Optimization_V1_ShipmentRoute_Transition__getVehicleLoads__)\ninstead."]]