# Class TransitionAttributes (1.15.0)

1.15.0 (latest) 1.14.0 1.13.0 1.12.0 1.11.2 1.10.0 1.9.1 1.8.5 1.7.0 1.6.0 1.5.0 1.4.3 1.3.2 1.2.0 1.1.3 1.0.1 0.1.1

    TransitionAttributes(mapping=None, *, ignore_unknown_fields=False, **kwargs)

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. |
| `distance_limit` | `https://docs.cloud.google.com/python/docs/reference/optimization/latest/google.cloud.optimization_v1.types.DistanceLimit` Specifies a limit on the distance traveled while performing this transition. As of 2021/06, only soft limits are supported. |
| `delay` | `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. |