Class ShipmentRoute.Builder (1.16.0)

public static final class ShipmentRoute.Builder extends GeneratedMessageV3.Builder<ShipmentRoute.Builder> implements ShipmentRouteOrBuilder

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. 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 | | | | || || | | | | | | || --++-----------------------------------------------------------------++--> `

    Protobuf type google.cloud.optimization.v1.ShipmentRoute

    Static Methods

    getDescriptor()

    public static final Descriptors.Descriptor getDescriptor()
    Returns
    TypeDescription
    Descriptor

    Methods

    addAllBreaks(Iterable<? extends ShipmentRoute.Break> values)

    public ShipmentRoute.Builder addAllBreaks(Iterable<? extends ShipmentRoute.Break> values)

    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.

    repeated .google.cloud.optimization.v1.ShipmentRoute.Break breaks = 11;

    Parameter
    NameDescription
    valuesIterable<? extends com.google.cloud.optimization.v1.ShipmentRoute.Break>
    Returns
    TypeDescription
    ShipmentRoute.Builder

    addAllEndLoads(Iterable<? extends CapacityQuantity> values)

    public ShipmentRoute.Builder addAllEndLoads(Iterable<? extends CapacityQuantity> values)

    Deprecated: Use Transition.vehicle_loads instead. Vehicle loads upon arrival at its end location, for each type specified in Vehicle.capacities, 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.

    repeated .google.cloud.optimization.v1.CapacityQuantity end_loads = 13 [deprecated = true];

    Parameter
    NameDescription
    valuesIterable<? extends com.google.cloud.optimization.v1.CapacityQuantity>
    Returns
    TypeDescription
    ShipmentRoute.Builder

    addAllTransitions(Iterable<? extends ShipmentRoute.Transition> values)

    public ShipmentRoute.Builder addAllTransitions(Iterable<? extends ShipmentRoute.Transition> values)

    Ordered list of transitions for the route.

    repeated .google.cloud.optimization.v1.ShipmentRoute.Transition transitions = 8;

    Parameter
    NameDescription
    valuesIterable<? extends com.google.cloud.optimization.v1.ShipmentRoute.Transition>
    Returns
    TypeDescription
    ShipmentRoute.Builder

    addAllTravelSteps(Iterable<? extends ShipmentRoute.TravelStep> values)

    public ShipmentRoute.Builder addAllTravelSteps(Iterable<? extends ShipmentRoute.TravelStep> values)

    Deprecated: Use ShipmentRoute.transitions instead. Ordered list of travel steps for the route.

    repeated .google.cloud.optimization.v1.ShipmentRoute.TravelStep travel_steps = 14 [deprecated = true];

    Parameter
    NameDescription
    valuesIterable<? extends com.google.cloud.optimization.v1.ShipmentRoute.TravelStep>
    Returns
    TypeDescription
    ShipmentRoute.Builder

    addAllVisits(Iterable<? extends ShipmentRoute.Visit> values)

    public ShipmentRoute.Builder addAllVisits(Iterable<? extends ShipmentRoute.Visit> values)

    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.

    repeated .google.cloud.optimization.v1.ShipmentRoute.Visit visits = 7;

    Parameter
    NameDescription
    valuesIterable<? extends com.google.cloud.optimization.v1.ShipmentRoute.Visit>
    Returns
    TypeDescription
    ShipmentRoute.Builder

    addBreaks(ShipmentRoute.Break value)

    public ShipmentRoute.Builder addBreaks(ShipmentRoute.Break value)

    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.

    repeated .google.cloud.optimization.v1.ShipmentRoute.Break breaks = 11;

    Parameter
    NameDescription
    valueShipmentRoute.Break
    Returns
    TypeDescription
    ShipmentRoute.Builder

    addBreaks(ShipmentRoute.Break.Builder builderForValue)

    public ShipmentRoute.Builder addBreaks(ShipmentRoute.Break.Builder builderForValue)

    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.

    repeated .google.cloud.optimization.v1.ShipmentRoute.Break breaks = 11;

    Parameter
    NameDescription
    builderForValueShipmentRoute.Break.Builder
    Returns
    TypeDescription
    ShipmentRoute.Builder

    addBreaks(int index, ShipmentRoute.Break value)

    public ShipmentRoute.Builder addBreaks(int index, ShipmentRoute.Break value)

    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.

    repeated .google.cloud.optimization.v1.ShipmentRoute.Break breaks = 11;

    Parameters
    NameDescription
    indexint
    valueShipmentRoute.Break
    Returns
    TypeDescription
    ShipmentRoute.Builder

    addBreaks(int index, ShipmentRoute.Break.Builder builderForValue)

    public ShipmentRoute.Builder addBreaks(int index, ShipmentRoute.Break.Builder builderForValue)

    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.

    repeated .google.cloud.optimization.v1.ShipmentRoute.Break breaks = 11;

    Parameters
    NameDescription
    indexint
    builderForValueShipmentRoute.Break.Builder
    Returns
    TypeDescription
    ShipmentRoute.Builder

    addBreaksBuilder()

    public ShipmentRoute.Break.Builder addBreaksBuilder()

    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.

    repeated .google.cloud.optimization.v1.ShipmentRoute.Break breaks = 11;

    Returns
    TypeDescription
    ShipmentRoute.Break.Builder

    addBreaksBuilder(int index)

    public ShipmentRoute.Break.Builder addBreaksBuilder(int index)

    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.

    repeated .google.cloud.optimization.v1.ShipmentRoute.Break breaks = 11;

    Parameter
    NameDescription
    indexint
    Returns
    TypeDescription
    ShipmentRoute.Break.Builder

    addEndLoads(CapacityQuantity value)

    public ShipmentRoute.Builder addEndLoads(CapacityQuantity value)

    Deprecated: Use Transition.vehicle_loads instead. Vehicle loads upon arrival at its end location, for each type specified in Vehicle.capacities, 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.

    repeated .google.cloud.optimization.v1.CapacityQuantity end_loads = 13 [deprecated = true];

    Parameter
    NameDescription
    valueCapacityQuantity
    Returns
    TypeDescription
    ShipmentRoute.Builder

    addEndLoads(CapacityQuantity.Builder builderForValue)

    public ShipmentRoute.Builder addEndLoads(CapacityQuantity.Builder builderForValue)

    Deprecated: Use Transition.vehicle_loads instead. Vehicle loads upon arrival at its end location, for each type specified in Vehicle.capacities, 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.

    repeated .google.cloud.optimization.v1.CapacityQuantity end_loads = 13 [deprecated = true];

    Parameter
    NameDescription
    builderForValueCapacityQuantity.Builder
    Returns
    TypeDescription
    ShipmentRoute.Builder

    addEndLoads(int index, CapacityQuantity value)

    public ShipmentRoute.Builder addEndLoads(int index, CapacityQuantity value)

    Deprecated: Use Transition.vehicle_loads instead. Vehicle loads upon arrival at its end location, for each type specified in Vehicle.capacities, 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.

    repeated .google.cloud.optimization.v1.CapacityQuantity end_loads = 13 [deprecated = true];

    Parameters
    NameDescription
    indexint
    valueCapacityQuantity
    Returns
    TypeDescription
    ShipmentRoute.Builder

    addEndLoads(int index, CapacityQuantity.Builder builderForValue)

    public ShipmentRoute.Builder addEndLoads(int index, CapacityQuantity.Builder builderForValue)

    Deprecated: Use Transition.vehicle_loads instead. Vehicle loads upon arrival at its end location, for each type specified in Vehicle.capacities, 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.

    repeated .google.cloud.optimization.v1.CapacityQuantity end_loads = 13 [deprecated = true];

    Parameters
    NameDescription
    indexint
    builderForValueCapacityQuantity.Builder
    Returns
    TypeDescription
    ShipmentRoute.Builder

    addEndLoadsBuilder()

    public CapacityQuantity.Builder addEndLoadsBuilder()

    Deprecated: Use Transition.vehicle_loads instead. Vehicle loads upon arrival at its end location, for each type specified in Vehicle.capacities, 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.

    repeated .google.cloud.optimization.v1.CapacityQuantity end_loads = 13 [deprecated = true];

    Returns
    TypeDescription
    CapacityQuantity.Builder

    addEndLoadsBuilder(int index)

    public CapacityQuantity.Builder addEndLoadsBuilder(int index)

    Deprecated: Use Transition.vehicle_loads instead. Vehicle loads upon arrival at its end location, for each type specified in Vehicle.capacities, 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.

    repeated .google.cloud.optimization.v1.CapacityQuantity end_loads = 13 [deprecated = true];

    Parameter
    NameDescription
    indexint
    Returns
    TypeDescription
    CapacityQuantity.Builder

    addRepeatedField(Descriptors.FieldDescriptor field, Object value)

    public ShipmentRoute.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
    Parameters
    NameDescription
    fieldFieldDescriptor
    valueObject
    Returns
    TypeDescription
    ShipmentRoute.Builder
    Overrides

    addTransitions(ShipmentRoute.Transition value)

    public ShipmentRoute.Builder addTransitions(ShipmentRoute.Transition value)

    Ordered list of transitions for the route.

    repeated .google.cloud.optimization.v1.ShipmentRoute.Transition transitions = 8;

    Parameter
    NameDescription
    valueShipmentRoute.Transition
    Returns
    TypeDescription
    ShipmentRoute.Builder

    addTransitions(ShipmentRoute.Transition.Builder builderForValue)

    public ShipmentRoute.Builder addTransitions(ShipmentRoute.Transition.Builder builderForValue)

    Ordered list of transitions for the route.

    repeated .google.cloud.optimization.v1.ShipmentRoute.Transition transitions = 8;

    Parameter
    NameDescription
    builderForValueShipmentRoute.Transition.Builder
    Returns
    TypeDescription
    ShipmentRoute.Builder

    addTransitions(int index, ShipmentRoute.Transition value)

    public ShipmentRoute.Builder addTransitions(int index, ShipmentRoute.Transition value)

    Ordered list of transitions for the route.

    repeated .google.cloud.optimization.v1.ShipmentRoute.Transition transitions = 8;

    Parameters
    NameDescription
    indexint
    valueShipmentRoute.Transition
    Returns
    TypeDescription
    ShipmentRoute.Builder

    addTransitions(int index, ShipmentRoute.Transition.Builder builderForValue)

    public ShipmentRoute.Builder addTransitions(int index, ShipmentRoute.Transition.Builder builderForValue)

    Ordered list of transitions for the route.

    repeated .google.cloud.optimization.v1.ShipmentRoute.Transition transitions = 8;

    Parameters
    NameDescription
    indexint
    builderForValueShipmentRoute.Transition.Builder
    Returns
    TypeDescription
    ShipmentRoute.Builder

    addTransitionsBuilder()

    public ShipmentRoute.Transition.Builder addTransitionsBuilder()

    Ordered list of transitions for the route.

    repeated .google.cloud.optimization.v1.ShipmentRoute.Transition transitions = 8;

    Returns
    TypeDescription
    ShipmentRoute.Transition.Builder

    addTransitionsBuilder(int index)

    public ShipmentRoute.Transition.Builder addTransitionsBuilder(int index)

    Ordered list of transitions for the route.

    repeated .google.cloud.optimization.v1.ShipmentRoute.Transition transitions = 8;

    Parameter
    NameDescription
    indexint
    Returns
    TypeDescription
    ShipmentRoute.Transition.Builder

    addTravelSteps(ShipmentRoute.TravelStep value)

    public ShipmentRoute.Builder addTravelSteps(ShipmentRoute.TravelStep value)

    Deprecated: Use ShipmentRoute.transitions instead. Ordered list of travel steps for the route.

    repeated .google.cloud.optimization.v1.ShipmentRoute.TravelStep travel_steps = 14 [deprecated = true];

    Parameter
    NameDescription
    valueShipmentRoute.TravelStep
    Returns
    TypeDescription
    ShipmentRoute.Builder

    addTravelSteps(ShipmentRoute.TravelStep.Builder builderForValue)

    public ShipmentRoute.Builder addTravelSteps(ShipmentRoute.TravelStep.Builder builderForValue)

    Deprecated: Use ShipmentRoute.transitions instead. Ordered list of travel steps for the route.

    repeated .google.cloud.optimization.v1.ShipmentRoute.TravelStep travel_steps = 14 [deprecated = true];

    Parameter
    NameDescription
    builderForValueShipmentRoute.TravelStep.Builder
    Returns
    TypeDescription
    ShipmentRoute.Builder

    addTravelSteps(int index, ShipmentRoute.TravelStep value)

    public ShipmentRoute.Builder addTravelSteps(int index, ShipmentRoute.TravelStep value)

    Deprecated: Use ShipmentRoute.transitions instead. Ordered list of travel steps for the route.

    repeated .google.cloud.optimization.v1.ShipmentRoute.TravelStep travel_steps = 14 [deprecated = true];

    Parameters
    NameDescription
    indexint
    valueShipmentRoute.TravelStep
    Returns
    TypeDescription
    ShipmentRoute.Builder

    addTravelSteps(int index, ShipmentRoute.TravelStep.Builder builderForValue)

    public ShipmentRoute.Builder addTravelSteps(int index, ShipmentRoute.TravelStep.Builder builderForValue)

    Deprecated: Use ShipmentRoute.transitions instead. Ordered list of travel steps for the route.

    repeated .google.cloud.optimization.v1.ShipmentRoute.TravelStep travel_steps = 14 [deprecated = true];

    Parameters
    NameDescription
    indexint
    builderForValueShipmentRoute.TravelStep.Builder
    Returns
    TypeDescription
    ShipmentRoute.Builder

    addTravelStepsBuilder()

    public ShipmentRoute.TravelStep.Builder addTravelStepsBuilder()

    Deprecated: Use ShipmentRoute.transitions instead. Ordered list of travel steps for the route.

    repeated .google.cloud.optimization.v1.ShipmentRoute.TravelStep travel_steps = 14 [deprecated = true];

    Returns
    TypeDescription
    ShipmentRoute.TravelStep.Builder

    addTravelStepsBuilder(int index)

    public ShipmentRoute.TravelStep.Builder addTravelStepsBuilder(int index)

    Deprecated: Use ShipmentRoute.transitions instead. Ordered list of travel steps for the route.

    repeated .google.cloud.optimization.v1.ShipmentRoute.TravelStep travel_steps = 14 [deprecated = true];

    Parameter
    NameDescription
    indexint
    Returns
    TypeDescription
    ShipmentRoute.TravelStep.Builder

    addVisits(ShipmentRoute.Visit value)

    public ShipmentRoute.Builder addVisits(ShipmentRoute.Visit value)

    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.

    repeated .google.cloud.optimization.v1.ShipmentRoute.Visit visits = 7;

    Parameter
    NameDescription
    valueShipmentRoute.Visit
    Returns
    TypeDescription
    ShipmentRoute.Builder

    addVisits(ShipmentRoute.Visit.Builder builderForValue)

    public ShipmentRoute.Builder addVisits(ShipmentRoute.Visit.Builder builderForValue)

    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.

    repeated .google.cloud.optimization.v1.ShipmentRoute.Visit visits = 7;

    Parameter
    NameDescription
    builderForValueShipmentRoute.Visit.Builder
    Returns
    TypeDescription
    ShipmentRoute.Builder

    addVisits(int index, ShipmentRoute.Visit value)

    public ShipmentRoute.Builder addVisits(int index, ShipmentRoute.Visit value)

    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.

    repeated .google.cloud.optimization.v1.ShipmentRoute.Visit visits = 7;

    Parameters
    NameDescription
    indexint
    valueShipmentRoute.Visit
    Returns
    TypeDescription
    ShipmentRoute.Builder

    addVisits(int index, ShipmentRoute.Visit.Builder builderForValue)

    public ShipmentRoute.Builder addVisits(int index, ShipmentRoute.Visit.Builder builderForValue)

    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.

    repeated .google.cloud.optimization.v1.ShipmentRoute.Visit visits = 7;

    Parameters
    NameDescription
    indexint
    builderForValueShipmentRoute.Visit.Builder
    Returns
    TypeDescription
    ShipmentRoute.Builder

    addVisitsBuilder()

    public ShipmentRoute.Visit.Builder addVisitsBuilder()

    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.

    repeated .google.cloud.optimization.v1.ShipmentRoute.Visit visits = 7;

    Returns
    TypeDescription
    ShipmentRoute.Visit.Builder

    addVisitsBuilder(int index)

    public ShipmentRoute.Visit.Builder addVisitsBuilder(int index)

    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.

    repeated .google.cloud.optimization.v1.ShipmentRoute.Visit visits = 7;

    Parameter
    NameDescription
    indexint
    Returns
    TypeDescription
    ShipmentRoute.Visit.Builder

    build()

    public ShipmentRoute build()
    Returns
    TypeDescription
    ShipmentRoute

    buildPartial()

    public ShipmentRoute buildPartial()
    Returns
    TypeDescription
    ShipmentRoute

    clear()

    public ShipmentRoute.Builder clear()
    Returns
    TypeDescription
    ShipmentRoute.Builder
    Overrides

    clearBreaks()

    public ShipmentRoute.Builder clearBreaks()

    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.

    repeated .google.cloud.optimization.v1.ShipmentRoute.Break breaks = 11;

    Returns
    TypeDescription
    ShipmentRoute.Builder

    clearDelayBeforeVehicleEnd()

    public ShipmentRoute.Builder clearDelayBeforeVehicleEnd()

    Deprecated: Delay occurring before the vehicle end. See TransitionAttributes.delay.

    .google.cloud.optimization.v1.ShipmentRoute.Delay delay_before_vehicle_end = 16 [deprecated = true];

    Returns
    TypeDescription
    ShipmentRoute.Builder

    clearEndLoads()

    public ShipmentRoute.Builder clearEndLoads()

    Deprecated: Use Transition.vehicle_loads instead. Vehicle loads upon arrival at its end location, for each type specified in Vehicle.capacities, 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.

    repeated .google.cloud.optimization.v1.CapacityQuantity end_loads = 13 [deprecated = true];

    Returns
    TypeDescription
    ShipmentRoute.Builder

    clearField(Descriptors.FieldDescriptor field)

    public ShipmentRoute.Builder clearField(Descriptors.FieldDescriptor field)
    Parameter
    NameDescription
    fieldFieldDescriptor
    Returns
    TypeDescription
    ShipmentRoute.Builder
    Overrides

    clearHasTrafficInfeasibilities()

    public ShipmentRoute.Builder clearHasTrafficInfeasibilities()

    When OptimizeToursRequest.consider_road_traffic, 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, <code><code> start_time(previous_visit) + duration(previous_visit) + travel_duration(previous_visit, next_visit) &gt; start_time(next_visit) </code></code><code> Arrival at next_visit will likely happen later than its current time window due the increased estimate of travel time </code>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.

    bool has_traffic_infeasibilities = 9;

    Returns
    TypeDescription
    ShipmentRoute.Builder

    This builder for chaining.

    clearMetrics()

    public ShipmentRoute.Builder clearMetrics()

    Duration, distance and load metrics for this route. The fields of AggregatedMetrics are summed over all ShipmentRoute.transitions or ShipmentRoute.visits, depending on the context.

    .google.cloud.optimization.v1.AggregatedMetrics metrics = 12;

    Returns
    TypeDescription
    ShipmentRoute.Builder

    clearOneof(Descriptors.OneofDescriptor oneof)

    public ShipmentRoute.Builder clearOneof(Descriptors.OneofDescriptor oneof)
    Parameter
    NameDescription
    oneofOneofDescriptor
    Returns
    TypeDescription
    ShipmentRoute.Builder
    Overrides

    clearRouteCosts()

    public ShipmentRoute.Builder clearRouteCosts()
    Returns
    TypeDescription
    ShipmentRoute.Builder

    clearRoutePolyline()

    public ShipmentRoute.Builder clearRoutePolyline()

    The encoded polyline representation of the route. This field is only populated if OptimizeToursRequest.populate_polylines is set to true.

    .google.cloud.optimization.v1.ShipmentRoute.EncodedPolyline route_polyline = 10;

    Returns
    TypeDescription
    ShipmentRoute.Builder

    clearRouteTotalCost()

    public ShipmentRoute.Builder clearRouteTotalCost()

    Total cost of the route. The sum of all costs in the cost map.

    double route_total_cost = 18;

    Returns
    TypeDescription
    ShipmentRoute.Builder

    This builder for chaining.

    clearTransitions()

    public ShipmentRoute.Builder clearTransitions()

    Ordered list of transitions for the route.

    repeated .google.cloud.optimization.v1.ShipmentRoute.Transition transitions = 8;

    Returns
    TypeDescription
    ShipmentRoute.Builder

    clearTravelSteps()

    public ShipmentRoute.Builder clearTravelSteps()

    Deprecated: Use ShipmentRoute.transitions instead. Ordered list of travel steps for the route.

    repeated .google.cloud.optimization.v1.ShipmentRoute.TravelStep travel_steps = 14 [deprecated = true];

    Returns
    TypeDescription
    ShipmentRoute.Builder

    clearVehicleDetour()

    public ShipmentRoute.Builder clearVehicleDetour()

    Deprecated: No longer used. This field will only be populated at the ShipmentRoute.Visit 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.

    .google.protobuf.Duration vehicle_detour = 15 [deprecated = true];

    Returns
    TypeDescription
    ShipmentRoute.Builder

    clearVehicleEndTime()

    public ShipmentRoute.Builder clearVehicleEndTime()

    Time at which the vehicle finishes its route.

    .google.protobuf.Timestamp vehicle_end_time = 6;

    Returns
    TypeDescription
    ShipmentRoute.Builder

    clearVehicleIndex()

    public ShipmentRoute.Builder clearVehicleIndex()

    Vehicle performing the route, identified by its index in the source ShipmentModel.

    int32 vehicle_index = 1;

    Returns
    TypeDescription
    ShipmentRoute.Builder

    This builder for chaining.

    clearVehicleLabel()

    public ShipmentRoute.Builder clearVehicleLabel()

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

    string vehicle_label = 2;

    Returns
    TypeDescription
    ShipmentRoute.Builder

    This builder for chaining.

    clearVehicleStartTime()

    public ShipmentRoute.Builder clearVehicleStartTime()

    Time at which the vehicle starts its route.

    .google.protobuf.Timestamp vehicle_start_time = 5;

    Returns
    TypeDescription
    ShipmentRoute.Builder

    clearVisits()

    public ShipmentRoute.Builder clearVisits()

    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.

    repeated .google.cloud.optimization.v1.ShipmentRoute.Visit visits = 7;

    Returns
    TypeDescription
    ShipmentRoute.Builder

    clone()

    public ShipmentRoute.Builder clone()
    Returns
    TypeDescription
    ShipmentRoute.Builder
    Overrides

    containsRouteCosts(String key)

    public boolean containsRouteCosts(String key)

    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.

    map<string, double> route_costs = 17;

    Parameter
    NameDescription
    keyString
    Returns
    TypeDescription
    boolean

    getBreaks(int index)

    public ShipmentRoute.Break getBreaks(int index)

    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.

    repeated .google.cloud.optimization.v1.ShipmentRoute.Break breaks = 11;

    Parameter
    NameDescription
    indexint
    Returns
    TypeDescription
    ShipmentRoute.Break

    getBreaksBuilder(int index)

    public ShipmentRoute.Break.Builder getBreaksBuilder(int index)

    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.

    repeated .google.cloud.optimization.v1.ShipmentRoute.Break breaks = 11;

    Parameter
    NameDescription
    indexint
    Returns
    TypeDescription
    ShipmentRoute.Break.Builder

    getBreaksBuilderList()

    public List<ShipmentRoute.Break.Builder> getBreaksBuilderList()

    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.

    repeated .google.cloud.optimization.v1.ShipmentRoute.Break breaks = 11;

    Returns
    TypeDescription
    List<Builder>

    getBreaksCount()

    public int getBreaksCount()

    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.

    repeated .google.cloud.optimization.v1.ShipmentRoute.Break breaks = 11;

    Returns
    TypeDescription
    int

    getBreaksList()

    public List<ShipmentRoute.Break> getBreaksList()

    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.

    repeated .google.cloud.optimization.v1.ShipmentRoute.Break breaks = 11;

    Returns
    TypeDescription
    List<Break>

    getBreaksOrBuilder(int index)

    public ShipmentRoute.BreakOrBuilder getBreaksOrBuilder(int index)

    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.

    repeated .google.cloud.optimization.v1.ShipmentRoute.Break breaks = 11;

    Parameter
    NameDescription
    indexint
    Returns
    TypeDescription
    ShipmentRoute.BreakOrBuilder

    getBreaksOrBuilderList()

    public List<? extends ShipmentRoute.BreakOrBuilder> getBreaksOrBuilderList()

    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.

    repeated .google.cloud.optimization.v1.ShipmentRoute.Break breaks = 11;

    Returns
    TypeDescription
    List<? extends com.google.cloud.optimization.v1.ShipmentRoute.BreakOrBuilder>

    getDefaultInstanceForType()

    public ShipmentRoute getDefaultInstanceForType()
    Returns
    TypeDescription
    ShipmentRoute

    getDelayBeforeVehicleEnd() (deprecated)

    public ShipmentRoute.Delay getDelayBeforeVehicleEnd()

    Deprecated. google.cloud.optimization.v1.ShipmentRoute.delay_before_vehicle_end is deprecated. See google/cloud/optimization/v1/fleet_routing.proto;l=2169

    Deprecated: Delay occurring before the vehicle end. See TransitionAttributes.delay.

    .google.cloud.optimization.v1.ShipmentRoute.Delay delay_before_vehicle_end = 16 [deprecated = true];

    Returns
    TypeDescription
    ShipmentRoute.Delay

    The delayBeforeVehicleEnd.

    getDelayBeforeVehicleEndBuilder()

    public ShipmentRoute.Delay.Builder getDelayBeforeVehicleEndBuilder()

    Deprecated: Delay occurring before the vehicle end. See TransitionAttributes.delay.

    .google.cloud.optimization.v1.ShipmentRoute.Delay delay_before_vehicle_end = 16 [deprecated = true];

    Returns
    TypeDescription
    ShipmentRoute.Delay.Builder

    getDelayBeforeVehicleEndOrBuilder()

    public ShipmentRoute.DelayOrBuilder getDelayBeforeVehicleEndOrBuilder()

    Deprecated: Delay occurring before the vehicle end. See TransitionAttributes.delay.

    .google.cloud.optimization.v1.ShipmentRoute.Delay delay_before_vehicle_end = 16 [deprecated = true];

    Returns
    TypeDescription
    ShipmentRoute.DelayOrBuilder

    getDescriptorForType()

    public Descriptors.Descriptor getDescriptorForType()
    Returns
    TypeDescription
    Descriptor
    Overrides

    getEndLoads(int index)

    public CapacityQuantity getEndLoads(int index)

    Deprecated: Use Transition.vehicle_loads instead. Vehicle loads upon arrival at its end location, for each type specified in Vehicle.capacities, 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.

    repeated .google.cloud.optimization.v1.CapacityQuantity end_loads = 13 [deprecated = true];

    Parameter
    NameDescription
    indexint
    Returns
    TypeDescription
    CapacityQuantity

    getEndLoadsBuilder(int index)

    public CapacityQuantity.Builder getEndLoadsBuilder(int index)

    Deprecated: Use Transition.vehicle_loads instead. Vehicle loads upon arrival at its end location, for each type specified in Vehicle.capacities, 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.

    repeated .google.cloud.optimization.v1.CapacityQuantity end_loads = 13 [deprecated = true];

    Parameter
    NameDescription
    indexint
    Returns
    TypeDescription
    CapacityQuantity.Builder

    getEndLoadsBuilderList()

    public List<CapacityQuantity.Builder> getEndLoadsBuilderList()

    Deprecated: Use Transition.vehicle_loads instead. Vehicle loads upon arrival at its end location, for each type specified in Vehicle.capacities, 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.

    repeated .google.cloud.optimization.v1.CapacityQuantity end_loads = 13 [deprecated = true];

    Returns
    TypeDescription
    List<Builder>

    getEndLoadsCount()

    public int getEndLoadsCount()

    Deprecated: Use Transition.vehicle_loads instead. Vehicle loads upon arrival at its end location, for each type specified in Vehicle.capacities, 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.

    repeated .google.cloud.optimization.v1.CapacityQuantity end_loads = 13 [deprecated = true];

    Returns
    TypeDescription
    int

    getEndLoadsList()

    public List<CapacityQuantity> getEndLoadsList()

    Deprecated: Use Transition.vehicle_loads instead. Vehicle loads upon arrival at its end location, for each type specified in Vehicle.capacities, 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.

    repeated .google.cloud.optimization.v1.CapacityQuantity end_loads = 13 [deprecated = true];

    Returns
    TypeDescription
    List<CapacityQuantity>

    getEndLoadsOrBuilder(int index)

    public CapacityQuantityOrBuilder getEndLoadsOrBuilder(int index)

    Deprecated: Use Transition.vehicle_loads instead. Vehicle loads upon arrival at its end location, for each type specified in Vehicle.capacities, 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.

    repeated .google.cloud.optimization.v1.CapacityQuantity end_loads = 13 [deprecated = true];

    Parameter
    NameDescription
    indexint
    Returns
    TypeDescription
    CapacityQuantityOrBuilder

    getEndLoadsOrBuilderList()

    public List<? extends CapacityQuantityOrBuilder> getEndLoadsOrBuilderList()

    Deprecated: Use Transition.vehicle_loads instead. Vehicle loads upon arrival at its end location, for each type specified in Vehicle.capacities, 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.

    repeated .google.cloud.optimization.v1.CapacityQuantity end_loads = 13 [deprecated = true];

    Returns
    TypeDescription
    List<? extends com.google.cloud.optimization.v1.CapacityQuantityOrBuilder>

    getHasTrafficInfeasibilities()

    public boolean getHasTrafficInfeasibilities()

    When OptimizeToursRequest.consider_road_traffic, 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, <code><code> start_time(previous_visit) + duration(previous_visit) + travel_duration(previous_visit, next_visit) &gt; start_time(next_visit) </code></code><code> Arrival at next_visit will likely happen later than its current time window due the increased estimate of travel time </code>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.

    bool has_traffic_infeasibilities = 9;

    Returns
    TypeDescription
    boolean

    The hasTrafficInfeasibilities.

    getMetrics()

    public AggregatedMetrics getMetrics()

    Duration, distance and load metrics for this route. The fields of AggregatedMetrics are summed over all ShipmentRoute.transitions or ShipmentRoute.visits, depending on the context.

    .google.cloud.optimization.v1.AggregatedMetrics metrics = 12;

    Returns
    TypeDescription
    AggregatedMetrics

    The metrics.

    getMetricsBuilder()

    public AggregatedMetrics.Builder getMetricsBuilder()

    Duration, distance and load metrics for this route. The fields of AggregatedMetrics are summed over all ShipmentRoute.transitions or ShipmentRoute.visits, depending on the context.

    .google.cloud.optimization.v1.AggregatedMetrics metrics = 12;

    Returns
    TypeDescription
    AggregatedMetrics.Builder

    getMetricsOrBuilder()

    public AggregatedMetricsOrBuilder getMetricsOrBuilder()

    Duration, distance and load metrics for this route. The fields of AggregatedMetrics are summed over all ShipmentRoute.transitions or ShipmentRoute.visits, depending on the context.

    .google.cloud.optimization.v1.AggregatedMetrics metrics = 12;

    Returns
    TypeDescription
    AggregatedMetricsOrBuilder

    getMutableRouteCosts()

    public Map<String,Double> getMutableRouteCosts()

    Use alternate mutation accessors instead.

    Returns
    TypeDescription
    Map<String,Double>

    getRouteCosts()

    public Map<String,Double> getRouteCosts()

    Use #getRouteCostsMap() instead.

    Returns
    TypeDescription
    Map<String,Double>

    getRouteCostsCount()

    public int getRouteCostsCount()

    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.

    map<string, double> route_costs = 17;

    Returns
    TypeDescription
    int

    getRouteCostsMap()

    public Map<String,Double> getRouteCostsMap()

    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.

    map<string, double> route_costs = 17;

    Returns
    TypeDescription
    Map<String,Double>

    getRouteCostsOrDefault(String key, double defaultValue)

    public double getRouteCostsOrDefault(String key, double defaultValue)

    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.

    map<string, double> route_costs = 17;

    Parameters
    NameDescription
    keyString
    defaultValuedouble
    Returns
    TypeDescription
    double

    getRouteCostsOrThrow(String key)

    public double getRouteCostsOrThrow(String key)

    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.

    map<string, double> route_costs = 17;

    Parameter
    NameDescription
    keyString
    Returns
    TypeDescription
    double

    getRoutePolyline()

    public ShipmentRoute.EncodedPolyline getRoutePolyline()

    The encoded polyline representation of the route. This field is only populated if OptimizeToursRequest.populate_polylines is set to true.

    .google.cloud.optimization.v1.ShipmentRoute.EncodedPolyline route_polyline = 10;

    Returns
    TypeDescription
    ShipmentRoute.EncodedPolyline

    The routePolyline.

    getRoutePolylineBuilder()

    public ShipmentRoute.EncodedPolyline.Builder getRoutePolylineBuilder()

    The encoded polyline representation of the route. This field is only populated if OptimizeToursRequest.populate_polylines is set to true.

    .google.cloud.optimization.v1.ShipmentRoute.EncodedPolyline route_polyline = 10;

    Returns
    TypeDescription
    ShipmentRoute.EncodedPolyline.Builder

    getRoutePolylineOrBuilder()

    public ShipmentRoute.EncodedPolylineOrBuilder getRoutePolylineOrBuilder()

    The encoded polyline representation of the route. This field is only populated if OptimizeToursRequest.populate_polylines is set to true.

    .google.cloud.optimization.v1.ShipmentRoute.EncodedPolyline route_polyline = 10;

    Returns
    TypeDescription
    ShipmentRoute.EncodedPolylineOrBuilder

    getRouteTotalCost()

    public double getRouteTotalCost()

    Total cost of the route. The sum of all costs in the cost map.

    double route_total_cost = 18;

    Returns
    TypeDescription
    double

    The routeTotalCost.

    getTransitions(int index)

    public ShipmentRoute.Transition getTransitions(int index)

    Ordered list of transitions for the route.

    repeated .google.cloud.optimization.v1.ShipmentRoute.Transition transitions = 8;

    Parameter
    NameDescription
    indexint
    Returns
    TypeDescription
    ShipmentRoute.Transition

    getTransitionsBuilder(int index)

    public ShipmentRoute.Transition.Builder getTransitionsBuilder(int index)

    Ordered list of transitions for the route.

    repeated .google.cloud.optimization.v1.ShipmentRoute.Transition transitions = 8;

    Parameter
    NameDescription
    indexint
    Returns
    TypeDescription
    ShipmentRoute.Transition.Builder

    getTransitionsBuilderList()

    public List<ShipmentRoute.Transition.Builder> getTransitionsBuilderList()

    Ordered list of transitions for the route.

    repeated .google.cloud.optimization.v1.ShipmentRoute.Transition transitions = 8;

    Returns
    TypeDescription
    List<Builder>

    getTransitionsCount()

    public int getTransitionsCount()

    Ordered list of transitions for the route.

    repeated .google.cloud.optimization.v1.ShipmentRoute.Transition transitions = 8;

    Returns
    TypeDescription
    int

    getTransitionsList()

    public List<ShipmentRoute.Transition> getTransitionsList()

    Ordered list of transitions for the route.

    repeated .google.cloud.optimization.v1.ShipmentRoute.Transition transitions = 8;

    Returns
    TypeDescription
    List<Transition>

    getTransitionsOrBuilder(int index)

    public ShipmentRoute.TransitionOrBuilder getTransitionsOrBuilder(int index)

    Ordered list of transitions for the route.

    repeated .google.cloud.optimization.v1.ShipmentRoute.Transition transitions = 8;

    Parameter
    NameDescription
    indexint
    Returns
    TypeDescription
    ShipmentRoute.TransitionOrBuilder

    getTransitionsOrBuilderList()

    public List<? extends ShipmentRoute.TransitionOrBuilder> getTransitionsOrBuilderList()

    Ordered list of transitions for the route.

    repeated .google.cloud.optimization.v1.ShipmentRoute.Transition transitions = 8;

    Returns
    TypeDescription
    List<? extends com.google.cloud.optimization.v1.ShipmentRoute.TransitionOrBuilder>

    getTravelSteps(int index)

    public ShipmentRoute.TravelStep getTravelSteps(int index)

    Deprecated: Use ShipmentRoute.transitions instead. Ordered list of travel steps for the route.

    repeated .google.cloud.optimization.v1.ShipmentRoute.TravelStep travel_steps = 14 [deprecated = true];

    Parameter
    NameDescription
    indexint
    Returns
    TypeDescription
    ShipmentRoute.TravelStep

    getTravelStepsBuilder(int index)

    public ShipmentRoute.TravelStep.Builder getTravelStepsBuilder(int index)

    Deprecated: Use ShipmentRoute.transitions instead. Ordered list of travel steps for the route.

    repeated .google.cloud.optimization.v1.ShipmentRoute.TravelStep travel_steps = 14 [deprecated = true];

    Parameter
    NameDescription
    indexint
    Returns
    TypeDescription
    ShipmentRoute.TravelStep.Builder

    getTravelStepsBuilderList()

    public List<ShipmentRoute.TravelStep.Builder> getTravelStepsBuilderList()

    Deprecated: Use ShipmentRoute.transitions instead. Ordered list of travel steps for the route.

    repeated .google.cloud.optimization.v1.ShipmentRoute.TravelStep travel_steps = 14 [deprecated = true];

    Returns
    TypeDescription
    List<Builder>

    getTravelStepsCount()

    public int getTravelStepsCount()

    Deprecated: Use ShipmentRoute.transitions instead. Ordered list of travel steps for the route.

    repeated .google.cloud.optimization.v1.ShipmentRoute.TravelStep travel_steps = 14 [deprecated = true];

    Returns
    TypeDescription
    int

    getTravelStepsList()

    public List<ShipmentRoute.TravelStep> getTravelStepsList()

    Deprecated: Use ShipmentRoute.transitions instead. Ordered list of travel steps for the route.

    repeated .google.cloud.optimization.v1.ShipmentRoute.TravelStep travel_steps = 14 [deprecated = true];

    Returns
    TypeDescription
    List<TravelStep>

    getTravelStepsOrBuilder(int index)

    public ShipmentRoute.TravelStepOrBuilder getTravelStepsOrBuilder(int index)

    Deprecated: Use ShipmentRoute.transitions instead. Ordered list of travel steps for the route.

    repeated .google.cloud.optimization.v1.ShipmentRoute.TravelStep travel_steps = 14 [deprecated = true];

    Parameter
    NameDescription
    indexint
    Returns
    TypeDescription
    ShipmentRoute.TravelStepOrBuilder

    getTravelStepsOrBuilderList()

    public List<? extends ShipmentRoute.TravelStepOrBuilder> getTravelStepsOrBuilderList()

    Deprecated: Use ShipmentRoute.transitions instead. Ordered list of travel steps for the route.

    repeated .google.cloud.optimization.v1.ShipmentRoute.TravelStep travel_steps = 14 [deprecated = true];

    Returns
    TypeDescription
    List<? extends com.google.cloud.optimization.v1.ShipmentRoute.TravelStepOrBuilder>

    getVehicleDetour() (deprecated)

    public Duration getVehicleDetour()

    Deprecated. google.cloud.optimization.v1.ShipmentRoute.vehicle_detour is deprecated. See google/cloud/optimization/v1/fleet_routing.proto;l=2165

    Deprecated: No longer used. This field will only be populated at the ShipmentRoute.Visit 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.

    .google.protobuf.Duration vehicle_detour = 15 [deprecated = true];

    Returns
    TypeDescription
    Duration

    The vehicleDetour.

    getVehicleDetourBuilder()

    public Duration.Builder getVehicleDetourBuilder()

    Deprecated: No longer used. This field will only be populated at the ShipmentRoute.Visit 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.

    .google.protobuf.Duration vehicle_detour = 15 [deprecated = true];

    Returns
    TypeDescription
    Builder

    getVehicleDetourOrBuilder()

    public DurationOrBuilder getVehicleDetourOrBuilder()

    Deprecated: No longer used. This field will only be populated at the ShipmentRoute.Visit 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.

    .google.protobuf.Duration vehicle_detour = 15 [deprecated = true];

    Returns
    TypeDescription
    DurationOrBuilder

    getVehicleEndTime()

    public Timestamp getVehicleEndTime()

    Time at which the vehicle finishes its route.

    .google.protobuf.Timestamp vehicle_end_time = 6;

    Returns
    TypeDescription
    Timestamp

    The vehicleEndTime.

    getVehicleEndTimeBuilder()

    public Timestamp.Builder getVehicleEndTimeBuilder()

    Time at which the vehicle finishes its route.

    .google.protobuf.Timestamp vehicle_end_time = 6;

    Returns
    TypeDescription
    Builder

    getVehicleEndTimeOrBuilder()

    public TimestampOrBuilder getVehicleEndTimeOrBuilder()

    Time at which the vehicle finishes its route.

    .google.protobuf.Timestamp vehicle_end_time = 6;

    Returns
    TypeDescription
    TimestampOrBuilder

    getVehicleIndex()

    public int getVehicleIndex()

    Vehicle performing the route, identified by its index in the source ShipmentModel.

    int32 vehicle_index = 1;

    Returns
    TypeDescription
    int

    The vehicleIndex.

    getVehicleLabel()

    public String getVehicleLabel()

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

    string vehicle_label = 2;

    Returns
    TypeDescription
    String

    The vehicleLabel.

    getVehicleLabelBytes()

    public ByteString getVehicleLabelBytes()

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

    string vehicle_label = 2;

    Returns
    TypeDescription
    ByteString

    The bytes for vehicleLabel.

    getVehicleStartTime()

    public Timestamp getVehicleStartTime()

    Time at which the vehicle starts its route.

    .google.protobuf.Timestamp vehicle_start_time = 5;

    Returns
    TypeDescription
    Timestamp

    The vehicleStartTime.

    getVehicleStartTimeBuilder()

    public Timestamp.Builder getVehicleStartTimeBuilder()

    Time at which the vehicle starts its route.

    .google.protobuf.Timestamp vehicle_start_time = 5;

    Returns
    TypeDescription
    Builder

    getVehicleStartTimeOrBuilder()

    public TimestampOrBuilder getVehicleStartTimeOrBuilder()

    Time at which the vehicle starts its route.

    .google.protobuf.Timestamp vehicle_start_time = 5;

    Returns
    TypeDescription
    TimestampOrBuilder

    getVisits(int index)

    public ShipmentRoute.Visit getVisits(int index)

    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.

    repeated .google.cloud.optimization.v1.ShipmentRoute.Visit visits = 7;

    Parameter
    NameDescription
    indexint
    Returns
    TypeDescription
    ShipmentRoute.Visit

    getVisitsBuilder(int index)

    public ShipmentRoute.Visit.Builder getVisitsBuilder(int index)

    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.

    repeated .google.cloud.optimization.v1.ShipmentRoute.Visit visits = 7;

    Parameter
    NameDescription
    indexint
    Returns
    TypeDescription
    ShipmentRoute.Visit.Builder

    getVisitsBuilderList()

    public List<ShipmentRoute.Visit.Builder> getVisitsBuilderList()

    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.

    repeated .google.cloud.optimization.v1.ShipmentRoute.Visit visits = 7;

    Returns
    TypeDescription
    List<Builder>

    getVisitsCount()

    public int getVisitsCount()

    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.

    repeated .google.cloud.optimization.v1.ShipmentRoute.Visit visits = 7;

    Returns
    TypeDescription
    int

    getVisitsList()

    public List<ShipmentRoute.Visit> getVisitsList()

    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.

    repeated .google.cloud.optimization.v1.ShipmentRoute.Visit visits = 7;

    Returns
    TypeDescription
    List<Visit>

    getVisitsOrBuilder(int index)

    public ShipmentRoute.VisitOrBuilder getVisitsOrBuilder(int index)

    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.

    repeated .google.cloud.optimization.v1.ShipmentRoute.Visit visits = 7;

    Parameter
    NameDescription
    indexint
    Returns
    TypeDescription
    ShipmentRoute.VisitOrBuilder

    getVisitsOrBuilderList()

    public List<? extends ShipmentRoute.VisitOrBuilder> getVisitsOrBuilderList()

    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.

    repeated .google.cloud.optimization.v1.ShipmentRoute.Visit visits = 7;

    Returns
    TypeDescription
    List<? extends com.google.cloud.optimization.v1.ShipmentRoute.VisitOrBuilder>

    hasDelayBeforeVehicleEnd() (deprecated)

    public boolean hasDelayBeforeVehicleEnd()

    Deprecated. google.cloud.optimization.v1.ShipmentRoute.delay_before_vehicle_end is deprecated. See google/cloud/optimization/v1/fleet_routing.proto;l=2169

    Deprecated: Delay occurring before the vehicle end. See TransitionAttributes.delay.

    .google.cloud.optimization.v1.ShipmentRoute.Delay delay_before_vehicle_end = 16 [deprecated = true];

    Returns
    TypeDescription
    boolean

    Whether the delayBeforeVehicleEnd field is set.

    hasMetrics()

    public boolean hasMetrics()

    Duration, distance and load metrics for this route. The fields of AggregatedMetrics are summed over all ShipmentRoute.transitions or ShipmentRoute.visits, depending on the context.

    .google.cloud.optimization.v1.AggregatedMetrics metrics = 12;

    Returns
    TypeDescription
    boolean

    Whether the metrics field is set.

    hasRoutePolyline()

    public boolean hasRoutePolyline()

    The encoded polyline representation of the route. This field is only populated if OptimizeToursRequest.populate_polylines is set to true.

    .google.cloud.optimization.v1.ShipmentRoute.EncodedPolyline route_polyline = 10;

    Returns
    TypeDescription
    boolean

    Whether the routePolyline field is set.

    hasVehicleDetour() (deprecated)

    public boolean hasVehicleDetour()

    Deprecated. google.cloud.optimization.v1.ShipmentRoute.vehicle_detour is deprecated. See google/cloud/optimization/v1/fleet_routing.proto;l=2165

    Deprecated: No longer used. This field will only be populated at the ShipmentRoute.Visit 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.

    .google.protobuf.Duration vehicle_detour = 15 [deprecated = true];

    Returns
    TypeDescription
    boolean

    Whether the vehicleDetour field is set.

    hasVehicleEndTime()

    public boolean hasVehicleEndTime()

    Time at which the vehicle finishes its route.

    .google.protobuf.Timestamp vehicle_end_time = 6;

    Returns
    TypeDescription
    boolean

    Whether the vehicleEndTime field is set.

    hasVehicleStartTime()

    public boolean hasVehicleStartTime()

    Time at which the vehicle starts its route.

    .google.protobuf.Timestamp vehicle_start_time = 5;

    Returns
    TypeDescription
    boolean

    Whether the vehicleStartTime field is set.

    internalGetFieldAccessorTable()

    protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
    Returns
    TypeDescription
    FieldAccessorTable
    Overrides

    internalGetMapField(int number)

    protected MapField internalGetMapField(int number)
    Parameter
    NameDescription
    numberint
    Returns
    TypeDescription
    MapField
    Overrides

    internalGetMutableMapField(int number)

    protected MapField internalGetMutableMapField(int number)
    Parameter
    NameDescription
    numberint
    Returns
    TypeDescription
    MapField
    Overrides

    isInitialized()

    public final boolean isInitialized()
    Returns
    TypeDescription
    boolean
    Overrides

    mergeDelayBeforeVehicleEnd(ShipmentRoute.Delay value)

    public ShipmentRoute.Builder mergeDelayBeforeVehicleEnd(ShipmentRoute.Delay value)

    Deprecated: Delay occurring before the vehicle end. See TransitionAttributes.delay.

    .google.cloud.optimization.v1.ShipmentRoute.Delay delay_before_vehicle_end = 16 [deprecated = true];

    Parameter
    NameDescription
    valueShipmentRoute.Delay
    Returns
    TypeDescription
    ShipmentRoute.Builder

    mergeFrom(ShipmentRoute other)

    public ShipmentRoute.Builder mergeFrom(ShipmentRoute other)
    Parameter
    NameDescription
    otherShipmentRoute
    Returns
    TypeDescription
    ShipmentRoute.Builder

    mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

    public ShipmentRoute.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
    Parameters
    NameDescription
    inputCodedInputStream
    extensionRegistryExtensionRegistryLite
    Returns
    TypeDescription
    ShipmentRoute.Builder
    Overrides
    Exceptions
    TypeDescription
    IOException

    mergeFrom(Message other)

    public ShipmentRoute.Builder mergeFrom(Message other)
    Parameter
    NameDescription
    otherMessage
    Returns
    TypeDescription
    ShipmentRoute.Builder
    Overrides

    mergeMetrics(AggregatedMetrics value)

    public ShipmentRoute.Builder mergeMetrics(AggregatedMetrics value)

    Duration, distance and load metrics for this route. The fields of AggregatedMetrics are summed over all ShipmentRoute.transitions or ShipmentRoute.visits, depending on the context.

    .google.cloud.optimization.v1.AggregatedMetrics metrics = 12;

    Parameter
    NameDescription
    valueAggregatedMetrics
    Returns
    TypeDescription
    ShipmentRoute.Builder

    mergeRoutePolyline(ShipmentRoute.EncodedPolyline value)

    public ShipmentRoute.Builder mergeRoutePolyline(ShipmentRoute.EncodedPolyline value)

    The encoded polyline representation of the route. This field is only populated if OptimizeToursRequest.populate_polylines is set to true.

    .google.cloud.optimization.v1.ShipmentRoute.EncodedPolyline route_polyline = 10;

    Parameter
    NameDescription
    valueShipmentRoute.EncodedPolyline
    Returns
    TypeDescription
    ShipmentRoute.Builder

    mergeUnknownFields(UnknownFieldSet unknownFields)

    public final ShipmentRoute.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
    Parameter
    NameDescription
    unknownFieldsUnknownFieldSet
    Returns
    TypeDescription
    ShipmentRoute.Builder
    Overrides

    mergeVehicleDetour(Duration value)

    public ShipmentRoute.Builder mergeVehicleDetour(Duration value)

    Deprecated: No longer used. This field will only be populated at the ShipmentRoute.Visit 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.

    .google.protobuf.Duration vehicle_detour = 15 [deprecated = true];

    Parameter
    NameDescription
    valueDuration
    Returns
    TypeDescription
    ShipmentRoute.Builder

    mergeVehicleEndTime(Timestamp value)

    public ShipmentRoute.Builder mergeVehicleEndTime(Timestamp value)

    Time at which the vehicle finishes its route.

    .google.protobuf.Timestamp vehicle_end_time = 6;

    Parameter
    NameDescription
    valueTimestamp
    Returns
    TypeDescription
    ShipmentRoute.Builder

    mergeVehicleStartTime(Timestamp value)

    public ShipmentRoute.Builder mergeVehicleStartTime(Timestamp value)

    Time at which the vehicle starts its route.

    .google.protobuf.Timestamp vehicle_start_time = 5;

    Parameter
    NameDescription
    valueTimestamp
    Returns
    TypeDescription
    ShipmentRoute.Builder

    putAllRouteCosts(Map<String,Double> values)

    public ShipmentRoute.Builder putAllRouteCosts(Map<String,Double> values)

    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.

    map<string, double> route_costs = 17;

    Parameter
    NameDescription
    valuesMap<String,Double>
    Returns
    TypeDescription
    ShipmentRoute.Builder

    putRouteCosts(String key, double value)

    public ShipmentRoute.Builder putRouteCosts(String key, double value)

    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.

    map<string, double> route_costs = 17;

    Parameters
    NameDescription
    keyString
    valuedouble
    Returns
    TypeDescription
    ShipmentRoute.Builder

    removeBreaks(int index)

    public ShipmentRoute.Builder removeBreaks(int index)

    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.

    repeated .google.cloud.optimization.v1.ShipmentRoute.Break breaks = 11;

    Parameter
    NameDescription
    indexint
    Returns
    TypeDescription
    ShipmentRoute.Builder

    removeEndLoads(int index)

    public ShipmentRoute.Builder removeEndLoads(int index)

    Deprecated: Use Transition.vehicle_loads instead. Vehicle loads upon arrival at its end location, for each type specified in Vehicle.capacities, 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.

    repeated .google.cloud.optimization.v1.CapacityQuantity end_loads = 13 [deprecated = true];

    Parameter
    NameDescription
    indexint
    Returns
    TypeDescription
    ShipmentRoute.Builder

    removeRouteCosts(String key)

    public ShipmentRoute.Builder removeRouteCosts(String key)

    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.

    map<string, double> route_costs = 17;

    Parameter
    NameDescription
    keyString
    Returns
    TypeDescription
    ShipmentRoute.Builder

    removeTransitions(int index)

    public ShipmentRoute.Builder removeTransitions(int index)

    Ordered list of transitions for the route.

    repeated .google.cloud.optimization.v1.ShipmentRoute.Transition transitions = 8;

    Parameter
    NameDescription
    indexint
    Returns
    TypeDescription
    ShipmentRoute.Builder

    removeTravelSteps(int index)

    public ShipmentRoute.Builder removeTravelSteps(int index)

    Deprecated: Use ShipmentRoute.transitions instead. Ordered list of travel steps for the route.

    repeated .google.cloud.optimization.v1.ShipmentRoute.TravelStep travel_steps = 14 [deprecated = true];

    Parameter
    NameDescription
    indexint
    Returns
    TypeDescription
    ShipmentRoute.Builder

    removeVisits(int index)

    public ShipmentRoute.Builder removeVisits(int index)

    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.

    repeated .google.cloud.optimization.v1.ShipmentRoute.Visit visits = 7;

    Parameter
    NameDescription
    indexint
    Returns
    TypeDescription
    ShipmentRoute.Builder

    setBreaks(int index, ShipmentRoute.Break value)

    public ShipmentRoute.Builder setBreaks(int index, ShipmentRoute.Break value)

    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.

    repeated .google.cloud.optimization.v1.ShipmentRoute.Break breaks = 11;

    Parameters
    NameDescription
    indexint
    valueShipmentRoute.Break
    Returns
    TypeDescription
    ShipmentRoute.Builder

    setBreaks(int index, ShipmentRoute.Break.Builder builderForValue)

    public ShipmentRoute.Builder setBreaks(int index, ShipmentRoute.Break.Builder builderForValue)

    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.

    repeated .google.cloud.optimization.v1.ShipmentRoute.Break breaks = 11;

    Parameters
    NameDescription
    indexint
    builderForValueShipmentRoute.Break.Builder
    Returns
    TypeDescription
    ShipmentRoute.Builder

    setDelayBeforeVehicleEnd(ShipmentRoute.Delay value)

    public ShipmentRoute.Builder setDelayBeforeVehicleEnd(ShipmentRoute.Delay value)

    Deprecated: Delay occurring before the vehicle end. See TransitionAttributes.delay.

    .google.cloud.optimization.v1.ShipmentRoute.Delay delay_before_vehicle_end = 16 [deprecated = true];

    Parameter
    NameDescription
    valueShipmentRoute.Delay
    Returns
    TypeDescription
    ShipmentRoute.Builder

    setDelayBeforeVehicleEnd(ShipmentRoute.Delay.Builder builderForValue)

    public ShipmentRoute.Builder setDelayBeforeVehicleEnd(ShipmentRoute.Delay.Builder builderForValue)

    Deprecated: Delay occurring before the vehicle end. See TransitionAttributes.delay.

    .google.cloud.optimization.v1.ShipmentRoute.Delay delay_before_vehicle_end = 16 [deprecated = true];

    Parameter
    NameDescription
    builderForValueShipmentRoute.Delay.Builder
    Returns
    TypeDescription
    ShipmentRoute.Builder

    setEndLoads(int index, CapacityQuantity value)

    public ShipmentRoute.Builder setEndLoads(int index, CapacityQuantity value)

    Deprecated: Use Transition.vehicle_loads instead. Vehicle loads upon arrival at its end location, for each type specified in Vehicle.capacities, 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.

    repeated .google.cloud.optimization.v1.CapacityQuantity end_loads = 13 [deprecated = true];

    Parameters
    NameDescription
    indexint
    valueCapacityQuantity
    Returns
    TypeDescription
    ShipmentRoute.Builder

    setEndLoads(int index, CapacityQuantity.Builder builderForValue)

    public ShipmentRoute.Builder setEndLoads(int index, CapacityQuantity.Builder builderForValue)

    Deprecated: Use Transition.vehicle_loads instead. Vehicle loads upon arrival at its end location, for each type specified in Vehicle.capacities, 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.

    repeated .google.cloud.optimization.v1.CapacityQuantity end_loads = 13 [deprecated = true];

    Parameters
    NameDescription
    indexint
    builderForValueCapacityQuantity.Builder
    Returns
    TypeDescription
    ShipmentRoute.Builder

    setField(Descriptors.FieldDescriptor field, Object value)

    public ShipmentRoute.Builder setField(Descriptors.FieldDescriptor field, Object value)
    Parameters
    NameDescription
    fieldFieldDescriptor
    valueObject
    Returns
    TypeDescription
    ShipmentRoute.Builder
    Overrides

    setHasTrafficInfeasibilities(boolean value)

    public ShipmentRoute.Builder setHasTrafficInfeasibilities(boolean value)

    When OptimizeToursRequest.consider_road_traffic, 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, <code><code> start_time(previous_visit) + duration(previous_visit) + travel_duration(previous_visit, next_visit) &gt; start_time(next_visit) </code></code><code> Arrival at next_visit will likely happen later than its current time window due the increased estimate of travel time </code>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.

    bool has_traffic_infeasibilities = 9;

    Parameter
    NameDescription
    valueboolean

    The hasTrafficInfeasibilities to set.

    Returns
    TypeDescription
    ShipmentRoute.Builder

    This builder for chaining.

    setMetrics(AggregatedMetrics value)

    public ShipmentRoute.Builder setMetrics(AggregatedMetrics value)

    Duration, distance and load metrics for this route. The fields of AggregatedMetrics are summed over all ShipmentRoute.transitions or ShipmentRoute.visits, depending on the context.

    .google.cloud.optimization.v1.AggregatedMetrics metrics = 12;

    Parameter
    NameDescription
    valueAggregatedMetrics
    Returns
    TypeDescription
    ShipmentRoute.Builder

    setMetrics(AggregatedMetrics.Builder builderForValue)

    public ShipmentRoute.Builder setMetrics(AggregatedMetrics.Builder builderForValue)

    Duration, distance and load metrics for this route. The fields of AggregatedMetrics are summed over all ShipmentRoute.transitions or ShipmentRoute.visits, depending on the context.

    .google.cloud.optimization.v1.AggregatedMetrics metrics = 12;

    Parameter
    NameDescription
    builderForValueAggregatedMetrics.Builder
    Returns
    TypeDescription
    ShipmentRoute.Builder

    setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

    public ShipmentRoute.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
    Parameters
    NameDescription
    fieldFieldDescriptor
    indexint
    valueObject
    Returns
    TypeDescription
    ShipmentRoute.Builder
    Overrides

    setRoutePolyline(ShipmentRoute.EncodedPolyline value)

    public ShipmentRoute.Builder setRoutePolyline(ShipmentRoute.EncodedPolyline value)

    The encoded polyline representation of the route. This field is only populated if OptimizeToursRequest.populate_polylines is set to true.

    .google.cloud.optimization.v1.ShipmentRoute.EncodedPolyline route_polyline = 10;

    Parameter
    NameDescription
    valueShipmentRoute.EncodedPolyline
    Returns
    TypeDescription
    ShipmentRoute.Builder

    setRoutePolyline(ShipmentRoute.EncodedPolyline.Builder builderForValue)

    public ShipmentRoute.Builder setRoutePolyline(ShipmentRoute.EncodedPolyline.Builder builderForValue)

    The encoded polyline representation of the route. This field is only populated if OptimizeToursRequest.populate_polylines is set to true.

    .google.cloud.optimization.v1.ShipmentRoute.EncodedPolyline route_polyline = 10;

    Parameter
    NameDescription
    builderForValueShipmentRoute.EncodedPolyline.Builder
    Returns
    TypeDescription
    ShipmentRoute.Builder

    setRouteTotalCost(double value)

    public ShipmentRoute.Builder setRouteTotalCost(double value)

    Total cost of the route. The sum of all costs in the cost map.

    double route_total_cost = 18;

    Parameter
    NameDescription
    valuedouble

    The routeTotalCost to set.

    Returns
    TypeDescription
    ShipmentRoute.Builder

    This builder for chaining.

    setTransitions(int index, ShipmentRoute.Transition value)

    public ShipmentRoute.Builder setTransitions(int index, ShipmentRoute.Transition value)

    Ordered list of transitions for the route.

    repeated .google.cloud.optimization.v1.ShipmentRoute.Transition transitions = 8;

    Parameters
    NameDescription
    indexint
    valueShipmentRoute.Transition
    Returns
    TypeDescription
    ShipmentRoute.Builder

    setTransitions(int index, ShipmentRoute.Transition.Builder builderForValue)

    public ShipmentRoute.Builder setTransitions(int index, ShipmentRoute.Transition.Builder builderForValue)

    Ordered list of transitions for the route.

    repeated .google.cloud.optimization.v1.ShipmentRoute.Transition transitions = 8;

    Parameters
    NameDescription
    indexint
    builderForValueShipmentRoute.Transition.Builder
    Returns
    TypeDescription
    ShipmentRoute.Builder

    setTravelSteps(int index, ShipmentRoute.TravelStep value)

    public ShipmentRoute.Builder setTravelSteps(int index, ShipmentRoute.TravelStep value)

    Deprecated: Use ShipmentRoute.transitions instead. Ordered list of travel steps for the route.

    repeated .google.cloud.optimization.v1.ShipmentRoute.TravelStep travel_steps = 14 [deprecated = true];

    Parameters
    NameDescription
    indexint
    valueShipmentRoute.TravelStep
    Returns
    TypeDescription
    ShipmentRoute.Builder

    setTravelSteps(int index, ShipmentRoute.TravelStep.Builder builderForValue)

    public ShipmentRoute.Builder setTravelSteps(int index, ShipmentRoute.TravelStep.Builder builderForValue)

    Deprecated: Use ShipmentRoute.transitions instead. Ordered list of travel steps for the route.

    repeated .google.cloud.optimization.v1.ShipmentRoute.TravelStep travel_steps = 14 [deprecated = true];

    Parameters
    NameDescription
    indexint
    builderForValueShipmentRoute.TravelStep.Builder
    Returns
    TypeDescription
    ShipmentRoute.Builder

    setUnknownFields(UnknownFieldSet unknownFields)

    public final ShipmentRoute.Builder setUnknownFields(UnknownFieldSet unknownFields)
    Parameter
    NameDescription
    unknownFieldsUnknownFieldSet
    Returns
    TypeDescription
    ShipmentRoute.Builder
    Overrides

    setVehicleDetour(Duration value)

    public ShipmentRoute.Builder setVehicleDetour(Duration value)

    Deprecated: No longer used. This field will only be populated at the ShipmentRoute.Visit 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.

    .google.protobuf.Duration vehicle_detour = 15 [deprecated = true];

    Parameter
    NameDescription
    valueDuration
    Returns
    TypeDescription
    ShipmentRoute.Builder

    setVehicleDetour(Duration.Builder builderForValue)

    public ShipmentRoute.Builder setVehicleDetour(Duration.Builder builderForValue)

    Deprecated: No longer used. This field will only be populated at the ShipmentRoute.Visit 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.

    .google.protobuf.Duration vehicle_detour = 15 [deprecated = true];

    Parameter
    NameDescription
    builderForValueBuilder
    Returns
    TypeDescription
    ShipmentRoute.Builder

    setVehicleEndTime(Timestamp value)

    public ShipmentRoute.Builder setVehicleEndTime(Timestamp value)

    Time at which the vehicle finishes its route.

    .google.protobuf.Timestamp vehicle_end_time = 6;

    Parameter
    NameDescription
    valueTimestamp
    Returns
    TypeDescription
    ShipmentRoute.Builder

    setVehicleEndTime(Timestamp.Builder builderForValue)

    public ShipmentRoute.Builder setVehicleEndTime(Timestamp.Builder builderForValue)

    Time at which the vehicle finishes its route.

    .google.protobuf.Timestamp vehicle_end_time = 6;

    Parameter
    NameDescription
    builderForValueBuilder
    Returns
    TypeDescription
    ShipmentRoute.Builder

    setVehicleIndex(int value)

    public ShipmentRoute.Builder setVehicleIndex(int value)

    Vehicle performing the route, identified by its index in the source ShipmentModel.

    int32 vehicle_index = 1;

    Parameter
    NameDescription
    valueint

    The vehicleIndex to set.

    Returns
    TypeDescription
    ShipmentRoute.Builder

    This builder for chaining.

    setVehicleLabel(String value)

    public ShipmentRoute.Builder setVehicleLabel(String value)

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

    string vehicle_label = 2;

    Parameter
    NameDescription
    valueString

    The vehicleLabel to set.

    Returns
    TypeDescription
    ShipmentRoute.Builder

    This builder for chaining.

    setVehicleLabelBytes(ByteString value)

    public ShipmentRoute.Builder setVehicleLabelBytes(ByteString value)

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

    string vehicle_label = 2;

    Parameter
    NameDescription
    valueByteString

    The bytes for vehicleLabel to set.

    Returns
    TypeDescription
    ShipmentRoute.Builder

    This builder for chaining.

    setVehicleStartTime(Timestamp value)

    public ShipmentRoute.Builder setVehicleStartTime(Timestamp value)

    Time at which the vehicle starts its route.

    .google.protobuf.Timestamp vehicle_start_time = 5;

    Parameter
    NameDescription
    valueTimestamp
    Returns
    TypeDescription
    ShipmentRoute.Builder

    setVehicleStartTime(Timestamp.Builder builderForValue)

    public ShipmentRoute.Builder setVehicleStartTime(Timestamp.Builder builderForValue)

    Time at which the vehicle starts its route.

    .google.protobuf.Timestamp vehicle_start_time = 5;

    Parameter
    NameDescription
    builderForValueBuilder
    Returns
    TypeDescription
    ShipmentRoute.Builder

    setVisits(int index, ShipmentRoute.Visit value)

    public ShipmentRoute.Builder setVisits(int index, ShipmentRoute.Visit value)

    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.

    repeated .google.cloud.optimization.v1.ShipmentRoute.Visit visits = 7;

    Parameters
    NameDescription
    indexint
    valueShipmentRoute.Visit
    Returns
    TypeDescription
    ShipmentRoute.Builder

    setVisits(int index, ShipmentRoute.Visit.Builder builderForValue)

    public ShipmentRoute.Builder setVisits(int index, ShipmentRoute.Visit.Builder builderForValue)

    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.

    repeated .google.cloud.optimization.v1.ShipmentRoute.Visit visits = 7;

    Parameters
    NameDescription
    indexint
    builderForValueShipmentRoute.Visit.Builder
    Returns
    TypeDescription
    ShipmentRoute.Builder