# Cloud Optimization V1 API - Class Google::Cloud::Optimization::V1::ShipmentRoute (v0.16.0)

0.16.0 (latest) 0.15.0 0.14.1 0.13.0 0.12.0 0.11.1 0.10.0 0.9.2 0.8.2 0.7.0 0.6.0 0.5.0 0.4.1 0.3.0 0.2.1 0.1.1 Reference documentation and code samples for the Cloud Optimization V1 API class Google::Cloud::Optimization::V1::ShipmentRoute.

A vehicle's route can be decomposed, along the time axis, like this (we
assume there are n visits):
`
| | | | | T[2], | | |
| Transition | Visit #0 | | | V[2], | | |
| #0 | aka | T[1] | V[1] | ... | V[n-1] | T[n] |
| aka T[0] | V[0] | | | V[n-2],| | |
| | | | | T[n-1] | | |
^ ^ ^ ^ ^ ^ ^ ^
vehicle V[0].start V[0].end V[1]. V[1]. V[n]. V[n]. vehicle
start (arrival) (departure) start end start end end
`
Note that we make a difference between:


- "punctual events", such as the vehicle start and end and each visit's start and end (aka arrival and departure). They happen at a given second.
- "time intervals", such as the visits themselves, and the transition between visits. Though time intervals can sometimes have zero duration, i.e. start and end at the same second, they often have a positive duration.

Invariants:

- If there are n visits, there are n+1 transitions.
- A visit is always surrounded by a transition before it (same index) and a transition after it (index + 1).
- The vehicle start is always followed by transition #0.
- The vehicle end is always preceded by transition #n.

Zooming in, here is what happens during a `Transition` and a `Visit`:
`
---+---+---+-->
| TRANSITION[i] | VISIT[i] |
| | |
| * TRAVEL: the vehicle moves from | PERFORM the visit: |
| VISIT[i-1].departure_location to | |
| VISIT[i].arrival_location, which | * Spend some time: |
| takes a given travel duration | the "visit duration". |
| and distance | |
| | * Load or unload |
| * BREAKS: the driver may have | some quantities from the |
| breaks (e.g. lunch break). | vehicle: the "demand". |
| | |
| * WAIT: the driver/vehicle does | |
| nothing. This can happen for | |
| many reasons, for example when | |
| the vehicle reaches the next | |
| event's destination before the | |
| start of its time window | |
| | |
| * DELAY: right before the next | |
| arrival. E.g. the vehicle and/or | |
| driver spends time unloading. | |
| | |
---+---+---+-->
^ ^ ^
V[i-1].end V[i].start V[i].end
`
Lastly, here is how the TRAVEL, BREAKS, DELAY and WAIT can be arranged
during a transition.

- They don't overlap.
- The DELAY is unique and *must* be a contiguous period of time right before the next visit (or vehicle end). Thus, it suffice to know the delay duration to know its start and end time.
- The BREAKS are contiguous, non-overlapping periods of time. The response specifies the start time and duration of each break.
- TRAVEL and WAIT are "preemptable": they can be interrupted several times during this transition. Clients can assume that travel happens "as soon as possible" and that "wait" fills the remaining time.

<br />

A (complex) example:
`
TRANSITION[i]
--++---+---++-->
|| | | | | | | ||
|| T | B | T | | B | | D ||
|| r | r | r | W | r | W | e ||
|| a | e | a | a | e | a | l ||
|| v | a | v | i | a | i | a ||
|| e | k | e | t | k | t | y ||
|| l | | l | | | | ||
|| | | | | | | ||
--++---++-->
`

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #breaks

    def breaks() -> ::Array<::Google::Cloud::Optimization::V1::ShipmentRoute::Break>

**Returns**

- (::Array\<[::Google::Cloud::Optimization::V1::ShipmentRoute::Break](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-optimization-v1/latest/Google-Cloud-Optimization-V1-ShipmentRoute-Break)\>) --- Breaks scheduled for the vehicle performing this route. The `breaks` sequence represents time intervals, each starting at the corresponding `start_time` and lasting `duration` seconds.

### #breaks=

    def breaks=(value) -> ::Array<::Google::Cloud::Optimization::V1::ShipmentRoute::Break>

**Parameter**

- **value** (::Array\<[::Google::Cloud::Optimization::V1::ShipmentRoute::Break](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-optimization-v1/latest/Google-Cloud-Optimization-V1-ShipmentRoute-Break)\>) --- Breaks scheduled for the vehicle performing this route. The `breaks` sequence represents time intervals, each starting at the corresponding `start_time` and lasting `duration` seconds.
**Returns**

- (::Array\<[::Google::Cloud::Optimization::V1::ShipmentRoute::Break](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-optimization-v1/latest/Google-Cloud-Optimization-V1-ShipmentRoute-Break)\>) --- Breaks scheduled for the vehicle performing this route. The `breaks` sequence represents time intervals, each starting at the corresponding `start_time` and lasting `duration` seconds.

### #delay_before_vehicle_end

    def delay_before_vehicle_end() -> ::Google::Cloud::Optimization::V1::ShipmentRoute::Delay

**Returns**

- ([::Google::Cloud::Optimization::V1::ShipmentRoute::Delay](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-optimization-v1/latest/Google-Cloud-Optimization-V1-ShipmentRoute-Delay)) --- Deprecated: Delay occurring before the vehicle end. See [TransitionAttributes.delay](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-optimization-v1/latest/Google-Cloud-Optimization-V1-TransitionAttributes#Google__Cloud__Optimization__V1__TransitionAttributes_delay_instance_ "Google::Cloud::Optimization::V1::TransitionAttributes#delay (method)").

### #delay_before_vehicle_end=

    def delay_before_vehicle_end=(value) -> ::Google::Cloud::Optimization::V1::ShipmentRoute::Delay

**Parameter**

- **value** ([::Google::Cloud::Optimization::V1::ShipmentRoute::Delay](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-optimization-v1/latest/Google-Cloud-Optimization-V1-ShipmentRoute-Delay)) --- Deprecated: Delay occurring before the vehicle end. See [TransitionAttributes.delay](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-optimization-v1/latest/Google-Cloud-Optimization-V1-TransitionAttributes#Google__Cloud__Optimization__V1__TransitionAttributes_delay_instance_ "Google::Cloud::Optimization::V1::TransitionAttributes#delay (method)").
**Returns**

- ([::Google::Cloud::Optimization::V1::ShipmentRoute::Delay](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-optimization-v1/latest/Google-Cloud-Optimization-V1-ShipmentRoute-Delay)) --- Deprecated: Delay occurring before the vehicle end. See [TransitionAttributes.delay](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-optimization-v1/latest/Google-Cloud-Optimization-V1-TransitionAttributes#Google__Cloud__Optimization__V1__TransitionAttributes_delay_instance_ "Google::Cloud::Optimization::V1::TransitionAttributes#delay (method)").

### #end_loads

    def end_loads() -> ::Array<::Google::Cloud::Optimization::V1::CapacityQuantity>

**Returns**

- (::Array\<[::Google::Cloud::Optimization::V1::CapacityQuantity](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-optimization-v1/latest/Google-Cloud-Optimization-V1-CapacityQuantity)\>) --- Deprecated: Use [Transition.vehicle_loads](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-optimization-v1/latest/Google-Cloud-Optimization-V1-ShipmentRoute-Transition#Google__Cloud__Optimization__V1__ShipmentRoute__Transition_vehicle_loads_instance_ "Google::Cloud::Optimization::V1::ShipmentRoute::Transition#vehicle_loads (method)") instead. Vehicle loads upon arrival at its end location, for each type specified in [Vehicle.capacities](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-optimization-v1/latest/Google-Cloud-Optimization-V1-Vehicle#Google__Cloud__Optimization__V1__Vehicle_capacities_instance_ "Google::Cloud::Optimization::V1::Vehicle#capacities (method)"), `start_load_intervals`, `end_load_intervals` or demands. Exception: we omit loads for quantity types unconstrained by intervals and that don't have any non-zero demand on the route.

### #end_loads=

    def end_loads=(value) -> ::Array<::Google::Cloud::Optimization::V1::CapacityQuantity>

**Parameter**

- **value** (::Array\<[::Google::Cloud::Optimization::V1::CapacityQuantity](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-optimization-v1/latest/Google-Cloud-Optimization-V1-CapacityQuantity)\>) --- Deprecated: Use [Transition.vehicle_loads](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-optimization-v1/latest/Google-Cloud-Optimization-V1-ShipmentRoute-Transition#Google__Cloud__Optimization__V1__ShipmentRoute__Transition_vehicle_loads_instance_ "Google::Cloud::Optimization::V1::ShipmentRoute::Transition#vehicle_loads (method)") instead. Vehicle loads upon arrival at its end location, for each type specified in [Vehicle.capacities](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-optimization-v1/latest/Google-Cloud-Optimization-V1-Vehicle#Google__Cloud__Optimization__V1__Vehicle_capacities_instance_ "Google::Cloud::Optimization::V1::Vehicle#capacities (method)"), `start_load_intervals`, `end_load_intervals` or demands. Exception: we omit loads for quantity types unconstrained by intervals and that don't have any non-zero demand on the route.
**Returns**

- (::Array\<[::Google::Cloud::Optimization::V1::CapacityQuantity](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-optimization-v1/latest/Google-Cloud-Optimization-V1-CapacityQuantity)\>) --- Deprecated: Use [Transition.vehicle_loads](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-optimization-v1/latest/Google-Cloud-Optimization-V1-ShipmentRoute-Transition#Google__Cloud__Optimization__V1__ShipmentRoute__Transition_vehicle_loads_instance_ "Google::Cloud::Optimization::V1::ShipmentRoute::Transition#vehicle_loads (method)") instead. Vehicle loads upon arrival at its end location, for each type specified in [Vehicle.capacities](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-optimization-v1/latest/Google-Cloud-Optimization-V1-Vehicle#Google__Cloud__Optimization__V1__Vehicle_capacities_instance_ "Google::Cloud::Optimization::V1::Vehicle#capacities (method)"), `start_load_intervals`, `end_load_intervals` or demands. Exception: we omit loads for quantity types unconstrained by intervals and that don't have any non-zero demand on the route.

### #has_traffic_infeasibilities

    def has_traffic_infeasibilities() -> ::Boolean

**Returns**

- (::Boolean) --- When [OptimizeToursRequest.consider_road_traffic](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-optimization-v1/latest/Google-Cloud-Optimization-V1-OptimizeToursRequest#Google__Cloud__Optimization__V1__OptimizeToursRequest_consider_road_traffic_instance_ "Google::Cloud::Optimization::V1::OptimizeToursRequest#consider_road_traffic (method)"), is set to true, this field indicates that inconsistencies in route timings are predicted using traffic-based travel duration estimates. There may be insufficient time to complete traffic-adjusted travel, delays, and breaks between visits, before the first visit, or after the last visit, while still satisfying the visit and vehicle time windows. For example,


  `
  start_time(previous_visit) + duration(previous_visit) +
  travel_duration(previous_visit, next_visit) > start_time(next_visit)
  `

  Arrival at next_visit will likely happen later than its current
  time window due the increased estimate of travel time
  `travel_duration(previous_visit, next_visit)` due to traffic. Also, a break
  may be forced to overlap with a visit due to an increase in travel time
  estimates and visit or break time window restrictions.

### #has_traffic_infeasibilities=

    def has_traffic_infeasibilities=(value) -> ::Boolean

**Parameter**

- **value** (::Boolean) --- When [OptimizeToursRequest.consider_road_traffic](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-optimization-v1/latest/Google-Cloud-Optimization-V1-OptimizeToursRequest#Google__Cloud__Optimization__V1__OptimizeToursRequest_consider_road_traffic_instance_ "Google::Cloud::Optimization::V1::OptimizeToursRequest#consider_road_traffic (method)"), is set to true, this field indicates that inconsistencies in route timings are predicted using traffic-based travel duration estimates. There may be insufficient time to complete traffic-adjusted travel, delays, and breaks between visits, before the first visit, or after the last visit, while still satisfying the visit and vehicle time windows. For example,


  `
  start_time(previous_visit) + duration(previous_visit) +
  travel_duration(previous_visit, next_visit) > start_time(next_visit)
  `

  Arrival at next_visit will likely happen later than its current
  time window due the increased estimate of travel time
  `travel_duration(previous_visit, next_visit)` due to traffic. Also, a break
  may be forced to overlap with a visit due to an increase in travel time
  estimates and visit or break time window restrictions.
**Returns**

- (::Boolean) --- When [OptimizeToursRequest.consider_road_traffic](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-optimization-v1/latest/Google-Cloud-Optimization-V1-OptimizeToursRequest#Google__Cloud__Optimization__V1__OptimizeToursRequest_consider_road_traffic_instance_ "Google::Cloud::Optimization::V1::OptimizeToursRequest#consider_road_traffic (method)"), is set to true, this field indicates that inconsistencies in route timings are predicted using traffic-based travel duration estimates. There may be insufficient time to complete traffic-adjusted travel, delays, and breaks between visits, before the first visit, or after the last visit, while still satisfying the visit and vehicle time windows. For example,


  `
  start_time(previous_visit) + duration(previous_visit) +
  travel_duration(previous_visit, next_visit) > start_time(next_visit)
  `

  Arrival at next_visit will likely happen later than its current
  time window due the increased estimate of travel time
  `travel_duration(previous_visit, next_visit)` due to traffic. Also, a break
  may be forced to overlap with a visit due to an increase in travel time
  estimates and visit or break time window restrictions.

### #metrics

    def metrics() -> ::Google::Cloud::Optimization::V1::AggregatedMetrics

**Returns**

- ([::Google::Cloud::Optimization::V1::AggregatedMetrics](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-optimization-v1/latest/Google-Cloud-Optimization-V1-AggregatedMetrics)) --- Duration, distance and load metrics for this route. The fields of [AggregatedMetrics](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-optimization-v1/latest/Google-Cloud-Optimization-V1-AggregatedMetrics "Google::Cloud::Optimization::V1::AggregatedMetrics (class)") are summed over all [ShipmentRoute.transitions](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-optimization-v1/latest/Google-Cloud-Optimization-V1-ShipmentRoute#Google__Cloud__Optimization__V1__ShipmentRoute_transitions_instance_ "Google::Cloud::Optimization::V1::ShipmentRoute#transitions (method)") or [ShipmentRoute.visits](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-optimization-v1/latest/Google-Cloud-Optimization-V1-ShipmentRoute#Google__Cloud__Optimization__V1__ShipmentRoute_visits_instance_ "Google::Cloud::Optimization::V1::ShipmentRoute#visits (method)"), depending on the context.

### #metrics=

    def metrics=(value) -> ::Google::Cloud::Optimization::V1::AggregatedMetrics

**Parameter**

- **value** ([::Google::Cloud::Optimization::V1::AggregatedMetrics](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-optimization-v1/latest/Google-Cloud-Optimization-V1-AggregatedMetrics)) --- Duration, distance and load metrics for this route. The fields of [AggregatedMetrics](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-optimization-v1/latest/Google-Cloud-Optimization-V1-AggregatedMetrics "Google::Cloud::Optimization::V1::AggregatedMetrics (class)") are summed over all [ShipmentRoute.transitions](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-optimization-v1/latest/Google-Cloud-Optimization-V1-ShipmentRoute#Google__Cloud__Optimization__V1__ShipmentRoute_transitions_instance_ "Google::Cloud::Optimization::V1::ShipmentRoute#transitions (method)") or [ShipmentRoute.visits](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-optimization-v1/latest/Google-Cloud-Optimization-V1-ShipmentRoute#Google__Cloud__Optimization__V1__ShipmentRoute_visits_instance_ "Google::Cloud::Optimization::V1::ShipmentRoute#visits (method)"), depending on the context.
**Returns**

- ([::Google::Cloud::Optimization::V1::AggregatedMetrics](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-optimization-v1/latest/Google-Cloud-Optimization-V1-AggregatedMetrics)) --- Duration, distance and load metrics for this route. The fields of [AggregatedMetrics](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-optimization-v1/latest/Google-Cloud-Optimization-V1-AggregatedMetrics "Google::Cloud::Optimization::V1::AggregatedMetrics (class)") are summed over all [ShipmentRoute.transitions](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-optimization-v1/latest/Google-Cloud-Optimization-V1-ShipmentRoute#Google__Cloud__Optimization__V1__ShipmentRoute_transitions_instance_ "Google::Cloud::Optimization::V1::ShipmentRoute#transitions (method)") or [ShipmentRoute.visits](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-optimization-v1/latest/Google-Cloud-Optimization-V1-ShipmentRoute#Google__Cloud__Optimization__V1__ShipmentRoute_visits_instance_ "Google::Cloud::Optimization::V1::ShipmentRoute#visits (method)"), depending on the context.

### #route_costs

    def route_costs() -> ::Google::Protobuf::Map{::String => ::Float}

**Returns**

- (::Google::Protobuf::Map{::String =\> ::Float}) --- Cost of the route, broken down by cost-related request fields. The keys are proto paths, relative to the input OptimizeToursRequest, e.g. "model.shipments.pickups.cost", and the values are the total cost generated by the corresponding cost field, aggregated over the whole route. In other words, costs\["model.shipments.pickups.cost"\] is the sum of all pickup costs over the route. All costs defined in the model are reported in detail here with the exception of costs related to TransitionAttributes that are only reported in an aggregated way as of 2022/01.

### #route_costs=

    def route_costs=(value) -> ::Google::Protobuf::Map{::String => ::Float}

**Parameter**

- **value** (::Google::Protobuf::Map{::String =\> ::Float}) --- Cost of the route, broken down by cost-related request fields. The keys are proto paths, relative to the input OptimizeToursRequest, e.g. "model.shipments.pickups.cost", and the values are the total cost generated by the corresponding cost field, aggregated over the whole route. In other words, costs\["model.shipments.pickups.cost"\] is the sum of all pickup costs over the route. All costs defined in the model are reported in detail here with the exception of costs related to TransitionAttributes that are only reported in an aggregated way as of 2022/01.
**Returns**

- (::Google::Protobuf::Map{::String =\> ::Float}) --- Cost of the route, broken down by cost-related request fields. The keys are proto paths, relative to the input OptimizeToursRequest, e.g. "model.shipments.pickups.cost", and the values are the total cost generated by the corresponding cost field, aggregated over the whole route. In other words, costs\["model.shipments.pickups.cost"\] is the sum of all pickup costs over the route. All costs defined in the model are reported in detail here with the exception of costs related to TransitionAttributes that are only reported in an aggregated way as of 2022/01.

### #route_polyline

    def route_polyline() -> ::Google::Cloud::Optimization::V1::ShipmentRoute::EncodedPolyline

**Returns**

- ([::Google::Cloud::Optimization::V1::ShipmentRoute::EncodedPolyline](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-optimization-v1/latest/Google-Cloud-Optimization-V1-ShipmentRoute-EncodedPolyline)) --- The encoded polyline representation of the route. This field is only populated if [OptimizeToursRequest.populate_polylines](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-optimization-v1/latest/Google-Cloud-Optimization-V1-OptimizeToursRequest#Google__Cloud__Optimization__V1__OptimizeToursRequest_populate_polylines_instance_ "Google::Cloud::Optimization::V1::OptimizeToursRequest#populate_polylines (method)") is set to true.

### #route_polyline=

    def route_polyline=(value) -> ::Google::Cloud::Optimization::V1::ShipmentRoute::EncodedPolyline

**Parameter**

- **value** ([::Google::Cloud::Optimization::V1::ShipmentRoute::EncodedPolyline](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-optimization-v1/latest/Google-Cloud-Optimization-V1-ShipmentRoute-EncodedPolyline)) --- The encoded polyline representation of the route. This field is only populated if [OptimizeToursRequest.populate_polylines](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-optimization-v1/latest/Google-Cloud-Optimization-V1-OptimizeToursRequest#Google__Cloud__Optimization__V1__OptimizeToursRequest_populate_polylines_instance_ "Google::Cloud::Optimization::V1::OptimizeToursRequest#populate_polylines (method)") is set to true.
**Returns**

- ([::Google::Cloud::Optimization::V1::ShipmentRoute::EncodedPolyline](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-optimization-v1/latest/Google-Cloud-Optimization-V1-ShipmentRoute-EncodedPolyline)) --- The encoded polyline representation of the route. This field is only populated if [OptimizeToursRequest.populate_polylines](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-optimization-v1/latest/Google-Cloud-Optimization-V1-OptimizeToursRequest#Google__Cloud__Optimization__V1__OptimizeToursRequest_populate_polylines_instance_ "Google::Cloud::Optimization::V1::OptimizeToursRequest#populate_polylines (method)") is set to true.

### #route_total_cost

    def route_total_cost() -> ::Float

**Returns**

- (::Float) --- Total cost of the route. The sum of all costs in the cost map.

### #route_total_cost=

    def route_total_cost=(value) -> ::Float

**Parameter**

- **value** (::Float) --- Total cost of the route. The sum of all costs in the cost map.
**Returns**

- (::Float) --- Total cost of the route. The sum of all costs in the cost map.

### #transitions

    def transitions() -> ::Array<::Google::Cloud::Optimization::V1::ShipmentRoute::Transition>

**Returns**

- (::Array\<[::Google::Cloud::Optimization::V1::ShipmentRoute::Transition](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-optimization-v1/latest/Google-Cloud-Optimization-V1-ShipmentRoute-Transition)\>) --- Ordered list of transitions for the route.

### #transitions=

    def transitions=(value) -> ::Array<::Google::Cloud::Optimization::V1::ShipmentRoute::Transition>

**Parameter**

- **value** (::Array\<[::Google::Cloud::Optimization::V1::ShipmentRoute::Transition](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-optimization-v1/latest/Google-Cloud-Optimization-V1-ShipmentRoute-Transition)\>) --- Ordered list of transitions for the route.
**Returns**

- (::Array\<[::Google::Cloud::Optimization::V1::ShipmentRoute::Transition](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-optimization-v1/latest/Google-Cloud-Optimization-V1-ShipmentRoute-Transition)\>) --- Ordered list of transitions for the route.

### #travel_steps

    def travel_steps() -> ::Array<::Google::Cloud::Optimization::V1::ShipmentRoute::TravelStep>

**Returns**

- (::Array\<[::Google::Cloud::Optimization::V1::ShipmentRoute::TravelStep](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-optimization-v1/latest/Google-Cloud-Optimization-V1-ShipmentRoute-TravelStep)\>) --- Deprecated: Use [ShipmentRoute.transitions](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-optimization-v1/latest/Google-Cloud-Optimization-V1-ShipmentRoute#Google__Cloud__Optimization__V1__ShipmentRoute_transitions_instance_ "Google::Cloud::Optimization::V1::ShipmentRoute#transitions (method)") instead. Ordered list of travel steps for the route.

### #travel_steps=

    def travel_steps=(value) -> ::Array<::Google::Cloud::Optimization::V1::ShipmentRoute::TravelStep>

**Parameter**

- **value** (::Array\<[::Google::Cloud::Optimization::V1::ShipmentRoute::TravelStep](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-optimization-v1/latest/Google-Cloud-Optimization-V1-ShipmentRoute-TravelStep)\>) --- Deprecated: Use [ShipmentRoute.transitions](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-optimization-v1/latest/Google-Cloud-Optimization-V1-ShipmentRoute#Google__Cloud__Optimization__V1__ShipmentRoute_transitions_instance_ "Google::Cloud::Optimization::V1::ShipmentRoute#transitions (method)") instead. Ordered list of travel steps for the route.
**Returns**

- (::Array\<[::Google::Cloud::Optimization::V1::ShipmentRoute::TravelStep](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-optimization-v1/latest/Google-Cloud-Optimization-V1-ShipmentRoute-TravelStep)\>) --- Deprecated: Use [ShipmentRoute.transitions](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-optimization-v1/latest/Google-Cloud-Optimization-V1-ShipmentRoute#Google__Cloud__Optimization__V1__ShipmentRoute_transitions_instance_ "Google::Cloud::Optimization::V1::ShipmentRoute#transitions (method)") instead. Ordered list of travel steps for the route.

### #vehicle_detour

    def vehicle_detour() -> ::Google::Protobuf::Duration

**Returns**

- ([::Google::Protobuf::Duration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-optimization-v1/latest/Google-Protobuf-Duration)) --- Deprecated: No longer used. This field will only be populated at the [ShipmentRoute.Visit](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-optimization-v1/latest/Google-Cloud-Optimization-V1-ShipmentRoute-Visit "Google::Cloud::Optimization::V1::ShipmentRoute::Visit (class)") level.


  This field is the extra detour time due to the shipments visited on the
  route.

  It is equal to `vehicle_end_time` - `vehicle_start_time` - travel duration
  from the vehicle's start_location to its `end_location`.

### #vehicle_detour=

    def vehicle_detour=(value) -> ::Google::Protobuf::Duration

**Parameter**

- **value** ([::Google::Protobuf::Duration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-optimization-v1/latest/Google-Protobuf-Duration)) --- Deprecated: No longer used. This field will only be populated at the [ShipmentRoute.Visit](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-optimization-v1/latest/Google-Cloud-Optimization-V1-ShipmentRoute-Visit "Google::Cloud::Optimization::V1::ShipmentRoute::Visit (class)") level.


  This field is the extra detour time due to the shipments visited on the
  route.

  It is equal to `vehicle_end_time` - `vehicle_start_time` - travel duration
  from the vehicle's start_location to its `end_location`.
**Returns**

- ([::Google::Protobuf::Duration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-optimization-v1/latest/Google-Protobuf-Duration)) --- Deprecated: No longer used. This field will only be populated at the [ShipmentRoute.Visit](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-optimization-v1/latest/Google-Cloud-Optimization-V1-ShipmentRoute-Visit "Google::Cloud::Optimization::V1::ShipmentRoute::Visit (class)") level.


  This field is the extra detour time due to the shipments visited on the
  route.

  It is equal to `vehicle_end_time` - `vehicle_start_time` - travel duration
  from the vehicle's start_location to its `end_location`.

### #vehicle_end_time

    def vehicle_end_time() -> ::Google::Protobuf::Timestamp

**Returns**

- ([::Google::Protobuf::Timestamp](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-optimization-v1/latest/Google-Protobuf-Timestamp)) --- Time at which the vehicle finishes its route.

### #vehicle_end_time=

    def vehicle_end_time=(value) -> ::Google::Protobuf::Timestamp

**Parameter**

- **value** ([::Google::Protobuf::Timestamp](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-optimization-v1/latest/Google-Protobuf-Timestamp)) --- Time at which the vehicle finishes its route.
**Returns**

- ([::Google::Protobuf::Timestamp](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-optimization-v1/latest/Google-Protobuf-Timestamp)) --- Time at which the vehicle finishes its route.

### #vehicle_index

    def vehicle_index() -> ::Integer

**Returns**

- (::Integer) --- Vehicle performing the route, identified by its index in the source `ShipmentModel`.

### #vehicle_index=

    def vehicle_index=(value) -> ::Integer

**Parameter**

- **value** (::Integer) --- Vehicle performing the route, identified by its index in the source `ShipmentModel`.
**Returns**

- (::Integer) --- Vehicle performing the route, identified by its index in the source `ShipmentModel`.

### #vehicle_label

    def vehicle_label() -> ::String

**Returns**

- (::String) --- Label of the vehicle performing this route, equal to `ShipmentModel.vehicles(vehicle_index).label`, if specified.

### #vehicle_label=

    def vehicle_label=(value) -> ::String

**Parameter**

- **value** (::String) --- Label of the vehicle performing this route, equal to `ShipmentModel.vehicles(vehicle_index).label`, if specified.
**Returns**

- (::String) --- Label of the vehicle performing this route, equal to `ShipmentModel.vehicles(vehicle_index).label`, if specified.

### #vehicle_start_time

    def vehicle_start_time() -> ::Google::Protobuf::Timestamp

**Returns**

- ([::Google::Protobuf::Timestamp](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-optimization-v1/latest/Google-Protobuf-Timestamp)) --- Time at which the vehicle starts its route.

### #vehicle_start_time=

    def vehicle_start_time=(value) -> ::Google::Protobuf::Timestamp

**Parameter**

- **value** ([::Google::Protobuf::Timestamp](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-optimization-v1/latest/Google-Protobuf-Timestamp)) --- Time at which the vehicle starts its route.
**Returns**

- ([::Google::Protobuf::Timestamp](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-optimization-v1/latest/Google-Protobuf-Timestamp)) --- Time at which the vehicle starts its route.

### #visits

    def visits() -> ::Array<::Google::Cloud::Optimization::V1::ShipmentRoute::Visit>

**Returns**

- (::Array\<[::Google::Cloud::Optimization::V1::ShipmentRoute::Visit](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-optimization-v1/latest/Google-Cloud-Optimization-V1-ShipmentRoute-Visit)\>) --- Ordered sequence of visits representing a route. visits\[i\] is the i-th visit in the route. If this field is empty, the vehicle is considered as unused.

### #visits=

    def visits=(value) -> ::Array<::Google::Cloud::Optimization::V1::ShipmentRoute::Visit>

**Parameter**

- **value** (::Array\<[::Google::Cloud::Optimization::V1::ShipmentRoute::Visit](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-optimization-v1/latest/Google-Cloud-Optimization-V1-ShipmentRoute-Visit)\>) --- Ordered sequence of visits representing a route. visits\[i\] is the i-th visit in the route. If this field is empty, the vehicle is considered as unused.
**Returns**

- (::Array\<[::Google::Cloud::Optimization::V1::ShipmentRoute::Visit](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-optimization-v1/latest/Google-Cloud-Optimization-V1-ShipmentRoute-Visit)\>) --- Ordered sequence of visits representing a route. visits\[i\] is the i-th visit in the route. If this field is empty, the vehicle is considered as unused.