Specifies attributes of transitions between two consecutive visits
on a route. Several TransitionAttributes may apply to the same
transition: in that case, all extra costs add up and the strictest
constraint or limit applies (following natural "AND" semantics).
Attributes
Name
Description
src_tag
str
Tags defining the set of (src->dst) transitions these
attributes apply to.
A source visit or vehicle start matches iff its
VisitRequest.tags
or
Vehicle.start_tags
either contains src_tag or does not contain
excluded_src_tag (depending on which of these two fields
is non-empty).
excluded_src_tag
str
See src_tag. Exactly one of src_tag and
excluded_src_tag must be non-empty.
dst_tag
str
A destination visit or vehicle end matches iff its
VisitRequest.tags
or
Vehicle.end_tags
either contains dst_tag or does not contain
excluded_dst_tag (depending on which of these two fields
is non-empty).
excluded_dst_tag
str
See dst_tag. Exactly one of dst_tag and
excluded_dst_tag must be non-empty.
cost
float
Specifies a cost for performing this
transition. This is in the same unit as all
other costs in the model and must not be
negative. It is applied on top of all other
existing costs.
cost_per_kilometer
float
Specifies a cost per kilometer applied to the distance
traveled while performing this transition. It adds up to any
Vehicle.cost_per_kilometer
specified on vehicles.
google.protobuf.duration_pb2.Duration
Specifies a delay incurred when performing this transition.
This delay always occurs *after* finishing the source visit
and *before* starting the destination visit.
[[["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 TransitionAttributes (1.11.2)\n\nVersion latestkeyboard_arrow_down\n\n- [1.11.2 (latest)](/python/docs/reference/optimization/latest/google.cloud.optimization_v1.types.TransitionAttributes)\n- [1.11.0](/python/docs/reference/optimization/1.11.0/google.cloud.optimization_v1.types.TransitionAttributes)\n- [1.10.0](/python/docs/reference/optimization/1.10.0/google.cloud.optimization_v1.types.TransitionAttributes)\n- [1.9.1](/python/docs/reference/optimization/1.9.1/google.cloud.optimization_v1.types.TransitionAttributes)\n- [1.8.5](/python/docs/reference/optimization/1.8.5/google.cloud.optimization_v1.types.TransitionAttributes)\n- [1.7.0](/python/docs/reference/optimization/1.7.0/google.cloud.optimization_v1.types.TransitionAttributes)\n- [1.6.0](/python/docs/reference/optimization/1.6.0/google.cloud.optimization_v1.types.TransitionAttributes)\n- [1.5.0](/python/docs/reference/optimization/1.5.0/google.cloud.optimization_v1.types.TransitionAttributes)\n- [1.4.3](/python/docs/reference/optimization/1.4.3/google.cloud.optimization_v1.types.TransitionAttributes)\n- [1.3.2](/python/docs/reference/optimization/1.3.2/google.cloud.optimization_v1.types.TransitionAttributes)\n- [1.2.0](/python/docs/reference/optimization/1.2.0/google.cloud.optimization_v1.types.TransitionAttributes)\n- [1.1.3](/python/docs/reference/optimization/1.1.3/google.cloud.optimization_v1.types.TransitionAttributes)\n- [1.0.1](/python/docs/reference/optimization/1.0.1/google.cloud.optimization_v1.types.TransitionAttributes)\n- [0.1.1](/python/docs/reference/optimization/0.1.1/google.cloud.optimization_v1.types.TransitionAttributes) \n\n TransitionAttributes(mapping=None, *, ignore_unknown_fields=False, **kwargs)\n\nSpecifies attributes of transitions between two consecutive visits\non a route. Several `TransitionAttributes` may apply to the same\ntransition: in that case, all extra costs add up and the strictest\nconstraint or limit applies (following natural \"AND\" semantics)."]]