Interface ShipmentRouteOrBuilder (0.1.2)

publicinterface ShipmentRouteOrBuilderextendsMessageOrBuilder

Implements

MessageOrBuilder

Methods

containsRouteCosts(String key)

publicabstractbooleancontainsRouteCosts(Stringkey)

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

getBreaks(int index)

publicabstractShipmentRoute.BreakgetBreaks(intindex)

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

getBreaksCount()

publicabstractintgetBreaksCount()

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()

publicabstractList<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

getBreaksOrBuilder(int index)

publicabstractShipmentRoute.BreakOrBuildergetBreaksOrBuilder(intindex)

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

getBreaksOrBuilderList()

publicabstractList<?extendsShipmentRoute.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>

getDelayBeforeVehicleEnd()

publicabstractShipmentRoute.DelaygetDelayBeforeVehicleEnd()

Deprecated: Use [ShipmentRoute.Transition.delay_duration][] instead. 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.

getDelayBeforeVehicleEndOrBuilder()

publicabstractShipmentRoute.DelayOrBuildergetDelayBeforeVehicleEndOrBuilder()

Deprecated: Use [ShipmentRoute.Transition.delay_duration][] instead. 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

getEndLoads(int index)

publicabstractCapacityQuantitygetEndLoads(intindex)

Deprecated: Use [ShipmentRoute.Transition.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

getEndLoadsCount()

publicabstractintgetEndLoadsCount()

Deprecated: Use [ShipmentRoute.Transition.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()

publicabstractList<CapacityQuantity>getEndLoadsList()

Deprecated: Use [ShipmentRoute.Transition.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

getEndLoadsOrBuilder(int index)

publicabstractCapacityQuantityOrBuildergetEndLoadsOrBuilder(intindex)

Deprecated: Use [ShipmentRoute.Transition.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

getEndLoadsOrBuilderList()

publicabstractList<?extendsCapacityQuantityOrBuilder>getEndLoadsOrBuilderList()

Deprecated: Use [ShipmentRoute.Transition.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()

publicabstractbooleangetHasTrafficInfeasibilities()

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

The hasTrafficInfeasibilities.

getMetrics()

publicabstractAggregatedMetricsgetMetrics()

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.

getMetricsOrBuilder()

publicabstractAggregatedMetricsOrBuildergetMetricsOrBuilder()

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

getRouteCosts()

publicabstractMap<String,Double>getRouteCosts()

Use #getRouteCostsMap() instead.

Returns
Type Description

getRouteCostsCount()

publicabstractintgetRouteCostsCount()

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()

publicabstractMap<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

getRouteCostsOrDefault(String key, double defaultValue)

publicabstractdoublegetRouteCostsOrDefault(Stringkey,doubledefaultValue)

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

getRouteCostsOrThrow(String key)

publicabstractdoublegetRouteCostsOrThrow(Stringkey)

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

getRoutePolyline()

publicabstractShipmentRoute.EncodedPolylinegetRoutePolyline()

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.

getRoutePolylineOrBuilder()

publicabstractShipmentRoute.EncodedPolylineOrBuildergetRoutePolylineOrBuilder()

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

getRouteTotalCost()

publicabstractdoublegetRouteTotalCost()

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)

publicabstractShipmentRoute.TransitiongetTransitions(intindex)

Ordered list of transitions for the route.

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

Parameter
Name Description
index int
Returns
Type Description

getTransitionsCount()

publicabstractintgetTransitionsCount()

Ordered list of transitions for the route.

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

Returns
Type Description
int

getTransitionsList()

publicabstractList<ShipmentRoute.Transition>getTransitionsList()

Ordered list of transitions for the route.

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

Returns
Type Description

getTransitionsOrBuilder(int index)

publicabstractShipmentRoute.TransitionOrBuildergetTransitionsOrBuilder(intindex)

Ordered list of transitions for the route.

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

Parameter
Name Description
index int
Returns
Type Description

getTransitionsOrBuilderList()

publicabstractList<?extendsShipmentRoute.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)

publicabstractShipmentRoute.TravelStepgetTravelSteps(intindex)

Deprecated: Use [ShipmentRoute.Transition][] 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

getTravelStepsCount()

publicabstractintgetTravelStepsCount()

Deprecated: Use [ShipmentRoute.Transition][] 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()

publicabstractList<ShipmentRoute.TravelStep>getTravelStepsList()

Deprecated: Use [ShipmentRoute.Transition][] instead. Ordered list of travel steps for the route.

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

Returns
Type Description

getTravelStepsOrBuilder(int index)

publicabstractShipmentRoute.TravelStepOrBuildergetTravelStepsOrBuilder(intindex)

Deprecated: Use [ShipmentRoute.Transition][] 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

getTravelStepsOrBuilderList()

publicabstractList<?extendsShipmentRoute.TravelStepOrBuilder>getTravelStepsOrBuilderList()

Deprecated: Use [ShipmentRoute.Transition][] 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()

publicabstractDurationgetVehicleDetour()

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

getVehicleDetourOrBuilder()

publicabstractDurationOrBuildergetVehicleDetourOrBuilder()

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

getVehicleEndTime()

publicabstractTimestampgetVehicleEndTime()

Time at which the vehicle finishes its route.

.google.protobuf.Timestamp vehicle_end_time = 6;

Returns
Type Description
Timestamp

The vehicleEndTime.

getVehicleEndTimeOrBuilder()

publicabstractTimestampOrBuildergetVehicleEndTimeOrBuilder()

Time at which the vehicle finishes its route.

.google.protobuf.Timestamp vehicle_end_time = 6;

Returns
Type Description

getVehicleIndex()

publicabstractintgetVehicleIndex()

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

int32 vehicle_index = 1;

Returns
Type Description
int

The vehicleIndex.

getVehicleLabel()

publicabstractStringgetVehicleLabel()

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()

publicabstractByteStringgetVehicleLabelBytes()

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()

publicabstractTimestampgetVehicleStartTime()

Time at which the vehicle starts its route.

.google.protobuf.Timestamp vehicle_start_time = 5;

Returns
Type Description
Timestamp

The vehicleStartTime.

getVehicleStartTimeOrBuilder()

publicabstractTimestampOrBuildergetVehicleStartTimeOrBuilder()

Time at which the vehicle starts its route.

.google.protobuf.Timestamp vehicle_start_time = 5;

Returns
Type Description

getVisits(int index)

publicabstractShipmentRoute.VisitgetVisits(intindex)

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

getVisitsCount()

publicabstractintgetVisitsCount()

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()

publicabstractList<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

getVisitsOrBuilder(int index)

publicabstractShipmentRoute.VisitOrBuildergetVisitsOrBuilder(intindex)

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

getVisitsOrBuilderList()

publicabstractList<?extendsShipmentRoute.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()

publicabstractbooleanhasDelayBeforeVehicleEnd()

Deprecated: Use [ShipmentRoute.Transition.delay_duration][] instead. 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()

publicabstractbooleanhasMetrics()

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()

publicabstractbooleanhasRoutePolyline()

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()

publicabstractbooleanhasVehicleDetour()

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

publicabstractbooleanhasVehicleEndTime()

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()

publicabstractbooleanhasVehicleStartTime()

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.

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025年10月30日 UTC.