Class OptimizeToursResponse.Metrics (1.5.0)

publicstaticfinalclass OptimizeToursResponse.MetricsextendsGeneratedMessageV3implementsOptimizeToursResponse.MetricsOrBuilder

Overall metrics, aggregated over all routes.

Protobuf type google.cloud.optimization.v1.OptimizeToursResponse.Metrics

Inherited Members

Static Fields

AGGREGATED_ROUTE_METRICS_FIELD_NUMBER

publicstaticfinalintAGGREGATED_ROUTE_METRICS_FIELD_NUMBER
Field Value
Type Description
int

COSTS_FIELD_NUMBER

publicstaticfinalintCOSTS_FIELD_NUMBER
Field Value
Type Description
int

EARLIEST_VEHICLE_START_TIME_FIELD_NUMBER

publicstaticfinalintEARLIEST_VEHICLE_START_TIME_FIELD_NUMBER
Field Value
Type Description
int

LATEST_VEHICLE_END_TIME_FIELD_NUMBER

publicstaticfinalintLATEST_VEHICLE_END_TIME_FIELD_NUMBER
Field Value
Type Description
int

SKIPPED_MANDATORY_SHIPMENT_COUNT_FIELD_NUMBER

publicstaticfinalintSKIPPED_MANDATORY_SHIPMENT_COUNT_FIELD_NUMBER
Field Value
Type Description
int

TOTAL_COST_FIELD_NUMBER

publicstaticfinalintTOTAL_COST_FIELD_NUMBER
Field Value
Type Description
int

USED_VEHICLE_COUNT_FIELD_NUMBER

publicstaticfinalintUSED_VEHICLE_COUNT_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

publicstaticOptimizeToursResponse.MetricsgetDefaultInstance()
Returns
Type Description

getDescriptor()

publicstaticfinalDescriptors.DescriptorgetDescriptor()
Returns
Type Description

newBuilder()

publicstaticOptimizeToursResponse.Metrics.BuildernewBuilder()
Returns
Type Description

newBuilder(OptimizeToursResponse.Metrics prototype)

publicstaticOptimizeToursResponse.Metrics.BuildernewBuilder(OptimizeToursResponse.Metricsprototype)
Parameter
Name Description
Returns
Type Description

parseDelimitedFrom(InputStream input)

publicstaticOptimizeToursResponse.MetricsparseDelimitedFrom(InputStreaminput)
Parameter
Name Description
input InputStream
Returns
Type Description
Exceptions
Type Description

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

publicstaticOptimizeToursResponse.MetricsparseDelimitedFrom(InputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Exceptions
Type Description

parseFrom(byte[] data)

publicstaticOptimizeToursResponse.MetricsparseFrom(byte[]data)
Parameter
Name Description
data byte[]
Returns
Type Description
Exceptions
Type Description

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

publicstaticOptimizeToursResponse.MetricsparseFrom(byte[]data,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Exceptions
Type Description

parseFrom(ByteString data)

publicstaticOptimizeToursResponse.MetricsparseFrom(ByteStringdata)
Parameter
Name Description
data ByteString
Returns
Type Description
Exceptions
Type Description

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

publicstaticOptimizeToursResponse.MetricsparseFrom(ByteStringdata,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Exceptions
Type Description

parseFrom(CodedInputStream input)

publicstaticOptimizeToursResponse.MetricsparseFrom(CodedInputStreaminput)
Parameter
Name Description
Returns
Type Description
Exceptions
Type Description

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

publicstaticOptimizeToursResponse.MetricsparseFrom(CodedInputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Exceptions
Type Description

parseFrom(InputStream input)

publicstaticOptimizeToursResponse.MetricsparseFrom(InputStreaminput)
Parameter
Name Description
input InputStream
Returns
Type Description
Exceptions
Type Description

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

publicstaticOptimizeToursResponse.MetricsparseFrom(InputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Exceptions
Type Description

parseFrom(ByteBuffer data)

publicstaticOptimizeToursResponse.MetricsparseFrom(ByteBufferdata)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
Exceptions
Type Description

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

publicstaticOptimizeToursResponse.MetricsparseFrom(ByteBufferdata,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Exceptions
Type Description

parser()

publicstaticParser<OptimizeToursResponse.Metrics>parser()
Returns
Type Description

Methods

containsCosts(String key)

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

equals(Object obj)

publicbooleanequals(Objectobj)
Parameter
Name Description
obj Object
Returns
Type Description
Overrides

getAggregatedRouteMetrics()

publicAggregatedMetricsgetAggregatedRouteMetrics()

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

publicAggregatedMetricsOrBuildergetAggregatedRouteMetricsOrBuilder()

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

getCosts()

publicMap<String,Double>getCosts()

Use #getCostsMap() instead.

Returns
Type Description

getCostsCount()

publicintgetCostsCount()

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

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

getCostsOrDefault(String key, double defaultValue)

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

getCostsOrThrow(String key)

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

getDefaultInstanceForType()

publicOptimizeToursResponse.MetricsgetDefaultInstanceForType()
Returns
Type Description

getEarliestVehicleStartTime()

publicTimestampgetEarliestVehicleStartTime()

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

publicTimestampOrBuildergetEarliestVehicleStartTimeOrBuilder()

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

getLatestVehicleEndTime()

publicTimestampgetLatestVehicleEndTime()

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

publicTimestampOrBuildergetLatestVehicleEndTimeOrBuilder()

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

getParserForType()

publicParser<OptimizeToursResponse.Metrics>getParserForType()
Returns
Type Description
Overrides

getSerializedSize()

publicintgetSerializedSize()
Returns
Type Description
int
Overrides

getSkippedMandatoryShipmentCount()

publicintgetSkippedMandatoryShipmentCount()

Number of mandatory shipments skipped.

int32 skipped_mandatory_shipment_count = 2;

Returns
Type Description
int

The skippedMandatoryShipmentCount.

getTotalCost()

publicdoublegetTotalCost()

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

double total_cost = 6;

Returns
Type Description
double

The totalCost.

getUnknownFields()

publicfinalUnknownFieldSetgetUnknownFields()
Returns
Type Description
Overrides

getUsedVehicleCount()

publicintgetUsedVehicleCount()

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

publicbooleanhasAggregatedRouteMetrics()

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

publicbooleanhasEarliestVehicleStartTime()

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

publicbooleanhasLatestVehicleEndTime()

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.

hashCode()

publicinthashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protectedGeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()
Returns
Type Description
Overrides

internalGetMapField(int number)

protectedMapFieldinternalGetMapField(intnumber)
Parameter
Name Description
number int
Returns
Type Description
Overrides

isInitialized()

publicfinalbooleanisInitialized()
Returns
Type Description
Overrides

newBuilderForType()

publicOptimizeToursResponse.Metrics.BuildernewBuilderForType()
Returns
Type Description

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protectedOptimizeToursResponse.Metrics.BuildernewBuilderForType(GeneratedMessageV3.BuilderParentparent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protectedObjectnewInstance(GeneratedMessageV3.UnusedPrivateParameterunused)
Parameter
Name Description
Returns
Type Description
Overrides

toBuilder()

publicOptimizeToursResponse.Metrics.BuildertoBuilder()
Returns
Type Description

writeTo(CodedOutputStream output)

publicvoidwriteTo(CodedOutputStreamoutput)
Parameter
Name Description
Overrides Exceptions
Type Description

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.