Interface OptimizeToursResponse.MetricsOrBuilder (1.41.0)

publicstaticinterface OptimizeToursResponse.MetricsOrBuilderextendsMessageOrBuilder

Implements

MessageOrBuilder

Methods

containsCosts(String key)

publicabstractbooleancontainsCosts(Stringkey)

Cost of the solution, 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 solution. In other words, costs["model.shipments.pickups.cost"] is the sum of all pickup costs over the solution. 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> costs = 10;

Parameter
Name Description
key String
Returns
Type Description
boolean

getAggregatedRouteMetrics()

publicabstractAggregatedMetricsgetAggregatedRouteMetrics()

Aggregated over the routes. Each metric is the sum (or max, for loads) over all ShipmentRoute.metrics fields of the same name.

.google.cloud.optimization.v1.AggregatedMetrics aggregated_route_metrics = 1;

Returns
Type Description
AggregatedMetrics

The aggregatedRouteMetrics.

getAggregatedRouteMetricsOrBuilder()

publicabstractAggregatedMetricsOrBuildergetAggregatedRouteMetricsOrBuilder()

Aggregated over the routes. Each metric is the sum (or max, for loads) over all ShipmentRoute.metrics fields of the same name.

.google.cloud.optimization.v1.AggregatedMetrics aggregated_route_metrics = 1;

Returns
Type Description
AggregatedMetricsOrBuilder

getCosts() (deprecated)

publicabstractMap<String,Double>getCosts()

Use #getCostsMap() instead.

Returns
Type Description
Map<String,Double>

getCostsCount()

publicabstractintgetCostsCount()

Cost of the solution, 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 solution. In other words, costs["model.shipments.pickups.cost"] is the sum of all pickup costs over the solution. 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> costs = 10;

Returns
Type Description
int

getCostsMap()

publicabstractMap<String,Double>getCostsMap()

Cost of the solution, 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 solution. In other words, costs["model.shipments.pickups.cost"] is the sum of all pickup costs over the solution. 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> costs = 10;

Returns
Type Description
Map<String,Double>

getCostsOrDefault(String key, double defaultValue)

publicabstractdoublegetCostsOrDefault(Stringkey,doubledefaultValue)

Cost of the solution, 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 solution. In other words, costs["model.shipments.pickups.cost"] is the sum of all pickup costs over the solution. 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> costs = 10;

Parameters
Name Description
key String
defaultValue double
Returns
Type Description
double

getCostsOrThrow(String key)

publicabstractdoublegetCostsOrThrow(Stringkey)

Cost of the solution, 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 solution. In other words, costs["model.shipments.pickups.cost"] is the sum of all pickup costs over the solution. 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> costs = 10;

Parameter
Name Description
key String
Returns
Type Description
double

getEarliestVehicleStartTime()

publicabstractTimestampgetEarliestVehicleStartTime()

The earliest start time for a used vehicle, computed as the minimum over all used vehicles of ShipmentRoute.vehicle_start_time.

.google.protobuf.Timestamp earliest_vehicle_start_time = 4;

Returns
Type Description
Timestamp

The earliestVehicleStartTime.

getEarliestVehicleStartTimeOrBuilder()

publicabstractTimestampOrBuildergetEarliestVehicleStartTimeOrBuilder()

The earliest start time for a used vehicle, computed as the minimum over all used vehicles of ShipmentRoute.vehicle_start_time.

.google.protobuf.Timestamp earliest_vehicle_start_time = 4;

Returns
Type Description
TimestampOrBuilder

getLatestVehicleEndTime()

publicabstractTimestampgetLatestVehicleEndTime()

The latest end time for a used vehicle, computed as the maximum over all used vehicles of ShipmentRoute.vehicle_end_time.

.google.protobuf.Timestamp latest_vehicle_end_time = 5;

Returns
Type Description
Timestamp

The latestVehicleEndTime.

getLatestVehicleEndTimeOrBuilder()

publicabstractTimestampOrBuildergetLatestVehicleEndTimeOrBuilder()

The latest end time for a used vehicle, computed as the maximum over all used vehicles of ShipmentRoute.vehicle_end_time.

.google.protobuf.Timestamp latest_vehicle_end_time = 5;

Returns
Type Description
TimestampOrBuilder

getSkippedMandatoryShipmentCount()

publicabstractintgetSkippedMandatoryShipmentCount()

Number of mandatory shipments skipped.

int32 skipped_mandatory_shipment_count = 2;

Returns
Type Description
int

The skippedMandatoryShipmentCount.

getTotalCost()

publicabstractdoublegetTotalCost()

Total cost of the solution. The sum of all values in the costs map.

double total_cost = 6;

Returns
Type Description
double

The totalCost.

getUsedVehicleCount()

publicabstractintgetUsedVehicleCount()

Number of vehicles used. Note: if a vehicle route is empty and Vehicle.used_if_route_is_empty is true, the vehicle is considered used.

int32 used_vehicle_count = 3;

Returns
Type Description
int

The usedVehicleCount.

hasAggregatedRouteMetrics()

publicabstractbooleanhasAggregatedRouteMetrics()

Aggregated over the routes. Each metric is the sum (or max, for loads) over all ShipmentRoute.metrics fields of the same name.

.google.cloud.optimization.v1.AggregatedMetrics aggregated_route_metrics = 1;

Returns
Type Description
boolean

Whether the aggregatedRouteMetrics field is set.

hasEarliestVehicleStartTime()

publicabstractbooleanhasEarliestVehicleStartTime()

The earliest start time for a used vehicle, computed as the minimum over all used vehicles of ShipmentRoute.vehicle_start_time.

.google.protobuf.Timestamp earliest_vehicle_start_time = 4;

Returns
Type Description
boolean

Whether the earliestVehicleStartTime field is set.

hasLatestVehicleEndTime()

publicabstractbooleanhasLatestVehicleEndTime()

The latest end time for a used vehicle, computed as the maximum over all used vehicles of ShipmentRoute.vehicle_end_time.

.google.protobuf.Timestamp latest_vehicle_end_time = 5;

Returns
Type Description
boolean

Whether the latestVehicleEndTime 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.