Deprecated: Use
ShipmentRoute.Transition
instead. Travel between each visit along the route: from the
vehicle's start_location to the first visit's
arrival_location, then from the first visit's
departure_location to the second visit's arrival_location,
and so on until the vehicle's end_location. This accounts only
for the actual travel between visits, not counting the waiting time,
the time spent performing a visit, nor the distance covered during a
visit.
If the vehicle does not have a start_ and/or end_location, the
corresponding travel metrics are 0 and/or empty.
Attributes
Name
Description
duration
google.protobuf.duration_pb2.Duration
Duration of the travel step.
distance_meters
float
Distance traveled during the step.
traffic_info_unavailable
bool
When traffic is requested via
OptimizeToursRequest.consider_road_traffic,
and the traffic info couldn't be retrieved for a TravelStep,
this boolean is set to true. This may be temporary (rare
hiccup in the realtime traffic servers) or permanent (no
data for this location).
[[["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-08-07 UTC."],[],[],null,["# Class TravelStep (1.11.2)\n\nVersion latestkeyboard_arrow_down\n\n- [1.11.2 (latest)](/python/docs/reference/optimization/latest/google.cloud.optimization_v1.types.ShipmentRoute.TravelStep)\n- [1.11.0](/python/docs/reference/optimization/1.11.0/google.cloud.optimization_v1.types.ShipmentRoute.TravelStep)\n- [1.10.0](/python/docs/reference/optimization/1.10.0/google.cloud.optimization_v1.types.ShipmentRoute.TravelStep)\n- [1.9.1](/python/docs/reference/optimization/1.9.1/google.cloud.optimization_v1.types.ShipmentRoute.TravelStep)\n- [1.8.5](/python/docs/reference/optimization/1.8.5/google.cloud.optimization_v1.types.ShipmentRoute.TravelStep)\n- [1.7.0](/python/docs/reference/optimization/1.7.0/google.cloud.optimization_v1.types.ShipmentRoute.TravelStep)\n- [1.6.0](/python/docs/reference/optimization/1.6.0/google.cloud.optimization_v1.types.ShipmentRoute.TravelStep)\n- [1.5.0](/python/docs/reference/optimization/1.5.0/google.cloud.optimization_v1.types.ShipmentRoute.TravelStep)\n- [1.4.3](/python/docs/reference/optimization/1.4.3/google.cloud.optimization_v1.types.ShipmentRoute.TravelStep)\n- [1.3.2](/python/docs/reference/optimization/1.3.2/google.cloud.optimization_v1.types.ShipmentRoute.TravelStep)\n- [1.2.0](/python/docs/reference/optimization/1.2.0/google.cloud.optimization_v1.types.ShipmentRoute.TravelStep)\n- [1.1.3](/python/docs/reference/optimization/1.1.3/google.cloud.optimization_v1.types.ShipmentRoute.TravelStep)\n- [1.0.1](/python/docs/reference/optimization/1.0.1/google.cloud.optimization_v1.types.ShipmentRoute.TravelStep)\n- [0.1.1](/python/docs/reference/optimization/0.1.1/google.cloud.optimization_v1.types.ShipmentRoute.TravelStep) \n\n TravelStep(mapping=None, *, ignore_unknown_fields=False, **kwargs)\n\nDeprecated: Use\nShipmentRoute.Transition\ninstead. Travel between each visit along the route: from the\nvehicle's `start_location` to the first visit's\n`arrival_location`, then from the first visit's\n`departure_location` to the second visit's `arrival_location`,\nand so on until the vehicle's `end_location`. This accounts only\nfor the actual travel between visits, not counting the waiting time,\nthe time spent performing a visit, nor the distance covered during a\nvisit.\n\nInvariant: `travel_steps_size() == visits_size() + 1`.\n\nIf the vehicle does not have a start_ and/or end_location, the\ncorresponding travel metrics are 0 and/or empty."]]