Class ShipmentRoute.Builder (1.43.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
    Type Description
    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
    Name Description
    values Iterable<? extends com.google.cloud.optimization.v1.ShipmentRoute.Break>
    Returns
    Type Description
    ShipmentRoute.Builder

    addAllEndLoads(Iterable<? extends CapacityQuantity> values) (deprecated)

    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
    Name Description
    values Iterable<? extends com.google.cloud.optimization.v1.CapacityQuantity>
    Returns
    Type Description
    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
    Name Description
    values Iterable<? extends com.google.cloud.optimization.v1.ShipmentRoute.Transition>
    Returns
    Type Description
    ShipmentRoute.Builder

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

    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
    Name Description
    values Iterable<? extends com.google.cloud.optimization.v1.ShipmentRoute.TravelStep>
    Returns
    Type Description
    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
    Name Description
    values Iterable<? extends com.google.cloud.optimization.v1.ShipmentRoute.Visit>
    Returns
    Type Description
    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
    Name Description
    value ShipmentRoute.Break
    Returns
    Type Description
    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
    Name Description
    builderForValue ShipmentRoute.Break.Builder
    Returns
    Type Description
    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
    Name Description
    index int
    value ShipmentRoute.Break
    Returns
    Type Description
    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
    Name Description
    index int
    builderForValue ShipmentRoute.Break.Builder
    Returns
    Type Description
    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
    Type Description
    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
    Name Description
    index int
    Returns
    Type Description
    ShipmentRoute.Break.Builder

    addEndLoads(CapacityQuantity value) (deprecated)

    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
    Name Description
    value CapacityQuantity
    Returns
    Type Description
    ShipmentRoute.Builder

    addEndLoads(CapacityQuantity.Builder builderForValue) (deprecated)

    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
    Name Description
    builderForValue CapacityQuantity.Builder
    Returns
    Type Description
    ShipmentRoute.Builder

    addEndLoads(int index, CapacityQuantity value) (deprecated)

    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
    Name Description
    index int
    value CapacityQuantity
    Returns
    Type Description
    ShipmentRoute.Builder

    addEndLoads(int index, CapacityQuantity.Builder builderForValue) (deprecated)

    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
    Name Description
    index int
    builderForValue CapacityQuantity.Builder
    Returns
    Type Description
    ShipmentRoute.Builder

    addEndLoadsBuilder() (deprecated)

    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
    Type Description
    CapacityQuantity.Builder

    addEndLoadsBuilder(int index) (deprecated)

    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
    Name Description
    index int
    Returns
    Type Description
    CapacityQuantity.Builder

    addRepeatedField(Descriptors.FieldDescriptor field, Object value)

    public ShipmentRoute.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
    Parameters
    Name Description
    field FieldDescriptor
    value Object
    Returns
    Type Description
    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
    Name Description
    value ShipmentRoute.Transition
    Returns
    Type Description
    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
    Name Description
    builderForValue ShipmentRoute.Transition.Builder
    Returns
    Type Description
    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
    Name Description
    index int
    value ShipmentRoute.Transition
    Returns
    Type Description
    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
    Name Description
    index int
    builderForValue ShipmentRoute.Transition.Builder
    Returns
    Type Description
    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
    Type Description
    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
    Name Description
    index int
    Returns
    Type Description
    ShipmentRoute.Transition.Builder

    addTravelSteps(ShipmentRoute.TravelStep value) (deprecated)

    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
    Name Description
    value ShipmentRoute.TravelStep
    Returns
    Type Description
    ShipmentRoute.Builder

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

    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
    Name Description
    builderForValue ShipmentRoute.TravelStep.Builder
    Returns
    Type Description
    ShipmentRoute.Builder

    addTravelSteps(int index, ShipmentRoute.TravelStep value) (deprecated)

    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
    Name Description
    index int
    value ShipmentRoute.TravelStep
    Returns
    Type Description
    ShipmentRoute.Builder

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

    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
    Name Description
    index int
    builderForValue ShipmentRoute.TravelStep.Builder
    Returns
    Type Description
    ShipmentRoute.Builder

    addTravelStepsBuilder() (deprecated)

    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
    Type Description
    ShipmentRoute.TravelStep.Builder

    addTravelStepsBuilder(int index) (deprecated)

    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
    Name Description
    index int
    Returns
    Type Description
    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
    Name Description
    value ShipmentRoute.Visit
    Returns
    Type Description
    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
    Name Description
    builderForValue ShipmentRoute.Visit.Builder
    Returns
    Type Description
    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
    Name Description
    index int
    value ShipmentRoute.Visit
    Returns
    Type Description
    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
    Name Description
    index int
    builderForValue ShipmentRoute.Visit.Builder
    Returns
    Type Description
    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
    Type Description
    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
    Name Description
    index int
    Returns
    Type Description
    ShipmentRoute.Visit.Builder

    build()

    public ShipmentRoute build()
    Returns
    Type Description
    ShipmentRoute

    buildPartial()

    public ShipmentRoute buildPartial()
    Returns
    Type Description
    ShipmentRoute

    clear()

    public ShipmentRoute.Builder clear()
    Returns
    Type Description
    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
    Type Description
    ShipmentRoute.Builder

    clearDelayBeforeVehicleEnd() (deprecated)

    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
    Type Description
    ShipmentRoute.Builder

    clearEndLoads() (deprecated)

    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
    Type Description
    ShipmentRoute.Builder

    clearField(Descriptors.FieldDescriptor field)

    public ShipmentRoute.Builder clearField(Descriptors.FieldDescriptor field)
    Parameter
    Name Description
    field FieldDescriptor
    Returns
    Type Description
    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,

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

    bool has_traffic_infeasibilities = 9;

    Returns
    Type Description
    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
    Type Description
    ShipmentRoute.Builder

    clearOneof(Descriptors.OneofDescriptor oneof)

    public ShipmentRoute.Builder clearOneof(Descriptors.OneofDescriptor oneof)
    Parameter
    Name Description
    oneof OneofDescriptor
    Returns
    Type Description
    ShipmentRoute.Builder
    Overrides

    clearRouteCosts()

    public ShipmentRoute.Builder clearRouteCosts()
    Returns
    Type Description
    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
    Type Description
    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
    Type Description
    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
    Type Description
    ShipmentRoute.Builder

    clearTravelSteps() (deprecated)

    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
    Type Description
    ShipmentRoute.Builder

    clearVehicleDetour() (deprecated)

    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
    Type Description
    ShipmentRoute.Builder

    clearVehicleEndTime()

    public ShipmentRoute.Builder clearVehicleEndTime()

    Time at which the vehicle finishes its route.

    .google.protobuf.Timestamp vehicle_end_time = 6;

    Returns
    Type Description
    ShipmentRoute.Builder

    clearVehicleIndex()

    public ShipmentRoute.Builder clearVehicleIndex()

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

    int32 vehicle_index = 1;

    Returns
    Type Description
    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
    Type Description
    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
    Type Description
    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
    Type Description
    ShipmentRoute.Builder

    clone()

    public ShipmentRoute.Builder clone()
    Returns
    Type Description
    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
    Name Description
    key String
    Returns
    Type Description
    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
    Name Description
    index int
    Returns
    Type Description
    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
    Name Description
    index int
    Returns
    Type Description
    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
    Type Description
    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
    Type Description
    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
    Type Description
    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
    Name Description
    index int
    Returns
    Type Description
    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
    Type Description
    List<? extends com.google.cloud.optimization.v1.ShipmentRoute.BreakOrBuilder>

    getDefaultInstanceForType()

    public ShipmentRoute getDefaultInstanceForType()
    Returns
    Type Description
    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=2219

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

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

    Returns
    Type Description
    ShipmentRoute.Delay

    The delayBeforeVehicleEnd.

    getDelayBeforeVehicleEndBuilder() (deprecated)

    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
    Type Description
    ShipmentRoute.Delay.Builder

    getDelayBeforeVehicleEndOrBuilder() (deprecated)

    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
    Type Description
    ShipmentRoute.DelayOrBuilder

    getDescriptorForType()

    public Descriptors.Descriptor getDescriptorForType()
    Returns
    Type Description
    Descriptor
    Overrides

    getEndLoads(int index) (deprecated)

    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
    Name Description
    index int
    Returns
    Type Description
    CapacityQuantity

    getEndLoadsBuilder(int index) (deprecated)

    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
    Name Description
    index int
    Returns
    Type Description
    CapacityQuantity.Builder

    getEndLoadsBuilderList() (deprecated)

    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
    Type Description
    List<Builder>

    getEndLoadsCount() (deprecated)

    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
    Type Description
    int

    getEndLoadsList() (deprecated)

    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
    Type Description
    List<CapacityQuantity>

    getEndLoadsOrBuilder(int index) (deprecated)

    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
    Name Description
    index int
    Returns
    Type Description
    CapacityQuantityOrBuilder

    getEndLoadsOrBuilderList() (deprecated)

    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
    Type Description
    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,

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

    bool has_traffic_infeasibilities = 9;

    Returns
    Type Description
    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
    Type Description
    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
    Type Description
    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
    Type Description
    AggregatedMetricsOrBuilder

    getMutableRouteCosts() (deprecated)

    public Map<String,Double> getMutableRouteCosts()

    Use alternate mutation accessors instead.

    Returns
    Type Description
    Map<String,Double>

    getRouteCosts() (deprecated)

    public Map<String,Double> getRouteCosts()

    Use #getRouteCostsMap() instead.

    Returns
    Type Description
    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
    Type Description
    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
    Type Description
    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
    Name Description
    key String
    defaultValue double
    Returns
    Type Description
    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
    Name Description
    key String
    Returns
    Type Description
    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
    Type Description
    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
    Type Description
    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
    Type Description
    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
    Type Description
    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
    Name Description
    index int
    Returns
    Type Description
    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
    Name Description
    index int
    Returns
    Type Description
    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
    Type Description
    List<Builder>

    getTransitionsCount()

    public int getTransitionsCount()

    Ordered list of transitions for the route.

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

    Returns
    Type Description
    int

    getTransitionsList()

    public List<ShipmentRoute.Transition> getTransitionsList()

    Ordered list of transitions for the route.

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

    Returns
    Type Description
    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
    Name Description
    index int
    Returns
    Type Description
    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
    Type Description
    List<? extends com.google.cloud.optimization.v1.ShipmentRoute.TransitionOrBuilder>

    getTravelSteps(int index) (deprecated)

    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
    Name Description
    index int
    Returns
    Type Description
    ShipmentRoute.TravelStep

    getTravelStepsBuilder(int index) (deprecated)

    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
    Name Description
    index int
    Returns
    Type Description
    ShipmentRoute.TravelStep.Builder

    getTravelStepsBuilderList() (deprecated)

    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
    Type Description
    List<Builder>

    getTravelStepsCount() (deprecated)

    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
    Type Description
    int

    getTravelStepsList() (deprecated)

    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
    Type Description
    List<TravelStep>

    getTravelStepsOrBuilder(int index) (deprecated)

    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
    Name Description
    index int
    Returns
    Type Description
    ShipmentRoute.TravelStepOrBuilder

    getTravelStepsOrBuilderList() (deprecated)

    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
    Type Description
    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=2215

    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
    Type Description
    Duration

    The vehicleDetour.

    getVehicleDetourBuilder() (deprecated)

    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
    Type Description
    Builder

    getVehicleDetourOrBuilder() (deprecated)

    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
    Type Description
    DurationOrBuilder

    getVehicleEndTime()

    public Timestamp getVehicleEndTime()

    Time at which the vehicle finishes its route.

    .google.protobuf.Timestamp vehicle_end_time = 6;

    Returns
    Type Description
    Timestamp

    The vehicleEndTime.

    getVehicleEndTimeBuilder()

    public Timestamp.Builder getVehicleEndTimeBuilder()

    Time at which the vehicle finishes its route.

    .google.protobuf.Timestamp vehicle_end_time = 6;

    Returns
    Type Description
    Builder

    getVehicleEndTimeOrBuilder()

    public TimestampOrBuilder getVehicleEndTimeOrBuilder()

    Time at which the vehicle finishes its route.

    .google.protobuf.Timestamp vehicle_end_time = 6;

    Returns
    Type Description
    TimestampOrBuilder

    getVehicleIndex()

    public int getVehicleIndex()

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

    int32 vehicle_index = 1;

    Returns
    Type Description
    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
    Type Description
    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
    Type Description
    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
    Type Description
    Timestamp

    The vehicleStartTime.

    getVehicleStartTimeBuilder()

    public Timestamp.Builder getVehicleStartTimeBuilder()

    Time at which the vehicle starts its route.

    .google.protobuf.Timestamp vehicle_start_time = 5;

    Returns
    Type Description
    Builder

    getVehicleStartTimeOrBuilder()

    public TimestampOrBuilder getVehicleStartTimeOrBuilder()

    Time at which the vehicle starts its route.

    .google.protobuf.Timestamp vehicle_start_time = 5;

    Returns
    Type Description
    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
    Name Description
    index int
    Returns
    Type Description
    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
    Name Description
    index int
    Returns
    Type Description
    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
    Type Description
    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
    Type Description
    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
    Type Description
    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
    Name Description
    index int
    Returns
    Type Description
    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
    Type Description
    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=2219

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

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

    Returns
    Type Description
    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
    Type Description
    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
    Type Description
    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=2215

    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
    Type Description
    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
    Type Description
    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
    Type Description
    boolean

    Whether the vehicleStartTime field is set.

    internalGetFieldAccessorTable()

    protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
    Returns
    Type Description
    FieldAccessorTable
    Overrides

    internalGetMapFieldReflection(int number)

    protected MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
    Parameter
    Name Description
    number int
    Returns
    Type Description
    com.google.protobuf.MapFieldReflectionAccessor
    Overrides
    com.google.protobuf.GeneratedMessageV3.Builder.internalGetMapFieldReflection(int)

    internalGetMutableMapFieldReflection(int number)

    protected MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number)
    Parameter
    Name Description
    number int
    Returns
    Type Description
    com.google.protobuf.MapFieldReflectionAccessor
    Overrides
    com.google.protobuf.GeneratedMessageV3.Builder.internalGetMutableMapFieldReflection(int)

    isInitialized()

    public final boolean isInitialized()
    Returns
    Type Description
    boolean
    Overrides

    mergeDelayBeforeVehicleEnd(ShipmentRoute.Delay value) (deprecated)

    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
    Name Description
    value ShipmentRoute.Delay
    Returns
    Type Description
    ShipmentRoute.Builder

    mergeFrom(ShipmentRoute other)

    public ShipmentRoute.Builder mergeFrom(ShipmentRoute other)
    Parameter
    Name Description
    other ShipmentRoute
    Returns
    Type Description
    ShipmentRoute.Builder

    mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

    public ShipmentRoute.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
    Parameters
    Name Description
    input CodedInputStream
    extensionRegistry ExtensionRegistryLite
    Returns
    Type Description
    ShipmentRoute.Builder
    Overrides
    Exceptions
    Type Description
    IOException

    mergeFrom(Message other)

    public ShipmentRoute.Builder mergeFrom(Message other)
    Parameter
    Name Description
    other Message
    Returns
    Type Description
    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
    Name Description
    value AggregatedMetrics
    Returns
    Type Description
    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
    Name Description
    value ShipmentRoute.EncodedPolyline
    Returns
    Type Description
    ShipmentRoute.Builder

    mergeUnknownFields(UnknownFieldSet unknownFields)

    public final ShipmentRoute.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
    Parameter
    Name Description
    unknownFields UnknownFieldSet
    Returns
    Type Description
    ShipmentRoute.Builder
    Overrides

    mergeVehicleDetour(Duration value) (deprecated)

    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
    Name Description
    value Duration
    Returns
    Type Description
    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
    Name Description
    value Timestamp
    Returns
    Type Description
    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
    Name Description
    value Timestamp
    Returns
    Type Description
    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
    Name Description
    values Map<String,Double>
    Returns
    Type Description
    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
    Name Description
    key String
    value double
    Returns
    Type Description
    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
    Name Description
    index int
    Returns
    Type Description
    ShipmentRoute.Builder

    removeEndLoads(int index) (deprecated)

    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
    Name Description
    index int
    Returns
    Type Description
    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
    Name Description
    key String
    Returns
    Type Description
    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
    Name Description
    index int
    Returns
    Type Description
    ShipmentRoute.Builder

    removeTravelSteps(int index) (deprecated)

    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
    Name Description
    index int
    Returns
    Type Description
    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
    Name Description
    index int
    Returns
    Type Description
    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
    Name Description
    index int
    value ShipmentRoute.Break
    Returns
    Type Description
    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
    Name Description
    index int
    builderForValue ShipmentRoute.Break.Builder
    Returns
    Type Description
    ShipmentRoute.Builder

    setDelayBeforeVehicleEnd(ShipmentRoute.Delay value) (deprecated)

    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
    Name Description
    value ShipmentRoute.Delay
    Returns
    Type Description
    ShipmentRoute.Builder

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

    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
    Name Description
    builderForValue ShipmentRoute.Delay.Builder
    Returns
    Type Description
    ShipmentRoute.Builder

    setEndLoads(int index, CapacityQuantity value) (deprecated)

    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
    Name Description
    index int
    value CapacityQuantity
    Returns
    Type Description
    ShipmentRoute.Builder

    setEndLoads(int index, CapacityQuantity.Builder builderForValue) (deprecated)

    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
    Name Description
    index int
    builderForValue CapacityQuantity.Builder
    Returns
    Type Description
    ShipmentRoute.Builder

    setField(Descriptors.FieldDescriptor field, Object value)

    public ShipmentRoute.Builder setField(Descriptors.FieldDescriptor field, Object value)
    Parameters
    Name Description
    field FieldDescriptor
    value Object
    Returns
    Type Description
    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,

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

    bool has_traffic_infeasibilities = 9;

    Parameter
    Name Description
    value boolean

    The hasTrafficInfeasibilities to set.

    Returns
    Type Description
    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
    Name Description
    value AggregatedMetrics
    Returns
    Type Description
    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
    Name Description
    builderForValue AggregatedMetrics.Builder
    Returns
    Type Description
    ShipmentRoute.Builder

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

    public ShipmentRoute.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
    Parameters
    Name Description
    field FieldDescriptor
    index int
    value Object
    Returns
    Type Description
    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
    Name Description
    value ShipmentRoute.EncodedPolyline
    Returns
    Type Description
    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
    Name Description
    builderForValue ShipmentRoute.EncodedPolyline.Builder
    Returns
    Type Description
    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
    Name Description
    value double

    The routeTotalCost to set.

    Returns
    Type Description
    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
    Name Description
    index int
    value ShipmentRoute.Transition
    Returns
    Type Description
    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
    Name Description
    index int
    builderForValue ShipmentRoute.Transition.Builder
    Returns
    Type Description
    ShipmentRoute.Builder

    setTravelSteps(int index, ShipmentRoute.TravelStep value) (deprecated)

    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
    Name Description
    index int
    value ShipmentRoute.TravelStep
    Returns
    Type Description
    ShipmentRoute.Builder

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

    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
    Name Description
    index int
    builderForValue ShipmentRoute.TravelStep.Builder
    Returns
    Type Description
    ShipmentRoute.Builder

    setUnknownFields(UnknownFieldSet unknownFields)

    public final ShipmentRoute.Builder setUnknownFields(UnknownFieldSet unknownFields)
    Parameter
    Name Description
    unknownFields UnknownFieldSet
    Returns
    Type Description
    ShipmentRoute.Builder
    Overrides

    setVehicleDetour(Duration value) (deprecated)

    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
    Name Description
    value Duration
    Returns
    Type Description
    ShipmentRoute.Builder

    setVehicleDetour(Duration.Builder builderForValue) (deprecated)

    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
    Name Description
    builderForValue Builder
    Returns
    Type Description
    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
    Name Description
    value Timestamp
    Returns
    Type Description
    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
    Name Description
    builderForValue Builder
    Returns
    Type Description
    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
    Name Description
    value int

    The vehicleIndex to set.

    Returns
    Type Description
    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
    Name Description
    value String

    The vehicleLabel to set.

    Returns
    Type Description
    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
    Name Description
    value ByteString

    The bytes for vehicleLabel to set.

    Returns
    Type Description
    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
    Name Description
    value Timestamp
    Returns
    Type Description
    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
    Name Description
    builderForValue Builder
    Returns
    Type Description
    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
    Name Description
    index int
    value ShipmentRoute.Visit
    Returns
    Type Description
    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
    Name Description
    index int
    builderForValue ShipmentRoute.Visit.Builder
    Returns
    Type Description
    ShipmentRoute.Builder