Class OptimizeToursResponse (1.18.0)

publicfinalclass OptimizeToursResponseextendsGeneratedMessageV3implementsOptimizeToursResponseOrBuilder

Response after solving a tour optimization problem containing the routes followed by each vehicle, the shipments which have been skipped and the overall cost of the solution.

Protobuf type google.cloud.optimization.v1.OptimizeToursResponse

Inherited Members

com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT)

Static Fields

METRICS_FIELD_NUMBER

publicstaticfinalintMETRICS_FIELD_NUMBER
Field Value
Type Description
int

REQUEST_LABEL_FIELD_NUMBER

publicstaticfinalintREQUEST_LABEL_FIELD_NUMBER
Field Value
Type Description
int

ROUTES_FIELD_NUMBER

publicstaticfinalintROUTES_FIELD_NUMBER
Field Value
Type Description
int

SKIPPED_SHIPMENTS_FIELD_NUMBER

publicstaticfinalintSKIPPED_SHIPMENTS_FIELD_NUMBER
Field Value
Type Description
int

TOTAL_COST_FIELD_NUMBER

publicstaticfinalintTOTAL_COST_FIELD_NUMBER
Field Value
Type Description
int

VALIDATION_ERRORS_FIELD_NUMBER

publicstaticfinalintVALIDATION_ERRORS_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

publicstaticOptimizeToursResponsegetDefaultInstance()
Returns
Type Description
OptimizeToursResponse

getDescriptor()

publicstaticfinalDescriptors.DescriptorgetDescriptor()
Returns
Type Description
Descriptor

newBuilder()

publicstaticOptimizeToursResponse.BuildernewBuilder()
Returns
Type Description
OptimizeToursResponse.Builder

newBuilder(OptimizeToursResponse prototype)

publicstaticOptimizeToursResponse.BuildernewBuilder(OptimizeToursResponseprototype)
Parameter
Name Description
prototype OptimizeToursResponse
Returns
Type Description
OptimizeToursResponse.Builder

parseDelimitedFrom(InputStream input)

publicstaticOptimizeToursResponseparseDelimitedFrom(InputStreaminput)
Parameter
Name Description
input InputStream
Returns
Type Description
OptimizeToursResponse
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

publicstaticOptimizeToursResponseparseDelimitedFrom(InputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
OptimizeToursResponse
Exceptions
Type Description
IOException

parseFrom(byte[] data)

publicstaticOptimizeToursResponseparseFrom(byte[]data)
Parameter
Name Description
data byte[]
Returns
Type Description
OptimizeToursResponse
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

publicstaticOptimizeToursResponseparseFrom(byte[]data,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
OptimizeToursResponse
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

publicstaticOptimizeToursResponseparseFrom(ByteStringdata)
Parameter
Name Description
data ByteString
Returns
Type Description
OptimizeToursResponse
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

publicstaticOptimizeToursResponseparseFrom(ByteStringdata,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
OptimizeToursResponse
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

publicstaticOptimizeToursResponseparseFrom(CodedInputStreaminput)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
OptimizeToursResponse
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

publicstaticOptimizeToursResponseparseFrom(CodedInputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
OptimizeToursResponse
Exceptions
Type Description
IOException

parseFrom(InputStream input)

publicstaticOptimizeToursResponseparseFrom(InputStreaminput)
Parameter
Name Description
input InputStream
Returns
Type Description
OptimizeToursResponse
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

publicstaticOptimizeToursResponseparseFrom(InputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
OptimizeToursResponse
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

publicstaticOptimizeToursResponseparseFrom(ByteBufferdata)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
OptimizeToursResponse
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

publicstaticOptimizeToursResponseparseFrom(ByteBufferdata,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
OptimizeToursResponse
Exceptions
Type Description
InvalidProtocolBufferException

parser()

publicstaticParser<OptimizeToursResponse>parser()
Returns
Type Description
Parser<OptimizeToursResponse>

Methods

equals(Object obj)

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

getDefaultInstanceForType()

publicOptimizeToursResponsegetDefaultInstanceForType()
Returns
Type Description
OptimizeToursResponse

getMetrics()

publicOptimizeToursResponse.MetricsgetMetrics()

Duration, distance and usage metrics for this solution.

.google.cloud.optimization.v1.OptimizeToursResponse.Metrics metrics = 6;

Returns
Type Description
OptimizeToursResponse.Metrics

The metrics.

getMetricsOrBuilder()

publicOptimizeToursResponse.MetricsOrBuildergetMetricsOrBuilder()

Duration, distance and usage metrics for this solution.

.google.cloud.optimization.v1.OptimizeToursResponse.Metrics metrics = 6;

Returns
Type Description
OptimizeToursResponse.MetricsOrBuilder

getParserForType()

publicParser<OptimizeToursResponse>getParserForType()
Returns
Type Description
Parser<OptimizeToursResponse>
Overrides

getRequestLabel()

publicStringgetRequestLabel()

Copy of the OptimizeToursRequest.label, if a label was specified in the request.

string request_label = 3;

Returns
Type Description
String

The requestLabel.

getRequestLabelBytes()

publicByteStringgetRequestLabelBytes()

Copy of the OptimizeToursRequest.label, if a label was specified in the request.

string request_label = 3;

Returns
Type Description
ByteString

The bytes for requestLabel.

getRoutes(int index)

publicShipmentRoutegetRoutes(intindex)

Routes computed for each vehicle; the i-th route corresponds to the i-th vehicle in the model.

repeated .google.cloud.optimization.v1.ShipmentRoute routes = 1;

Parameter
Name Description
index int
Returns
Type Description
ShipmentRoute

getRoutesCount()

publicintgetRoutesCount()

Routes computed for each vehicle; the i-th route corresponds to the i-th vehicle in the model.

repeated .google.cloud.optimization.v1.ShipmentRoute routes = 1;

Returns
Type Description
int

getRoutesList()

publicList<ShipmentRoute>getRoutesList()

Routes computed for each vehicle; the i-th route corresponds to the i-th vehicle in the model.

repeated .google.cloud.optimization.v1.ShipmentRoute routes = 1;

Returns
Type Description
List<ShipmentRoute>

getRoutesOrBuilder(int index)

publicShipmentRouteOrBuildergetRoutesOrBuilder(intindex)

Routes computed for each vehicle; the i-th route corresponds to the i-th vehicle in the model.

repeated .google.cloud.optimization.v1.ShipmentRoute routes = 1;

Parameter
Name Description
index int
Returns
Type Description
ShipmentRouteOrBuilder

getRoutesOrBuilderList()

publicList<?extendsShipmentRouteOrBuilder>getRoutesOrBuilderList()

Routes computed for each vehicle; the i-th route corresponds to the i-th vehicle in the model.

repeated .google.cloud.optimization.v1.ShipmentRoute routes = 1;

Returns
Type Description
List<? extends com.google.cloud.optimization.v1.ShipmentRouteOrBuilder>

getSerializedSize()

publicintgetSerializedSize()
Returns
Type Description
int
Overrides

getSkippedShipments(int index)

publicSkippedShipmentgetSkippedShipments(intindex)

The list of all shipments skipped.

repeated .google.cloud.optimization.v1.SkippedShipment skipped_shipments = 4;

Parameter
Name Description
index int
Returns
Type Description
SkippedShipment

getSkippedShipmentsCount()

publicintgetSkippedShipmentsCount()

The list of all shipments skipped.

repeated .google.cloud.optimization.v1.SkippedShipment skipped_shipments = 4;

Returns
Type Description
int

getSkippedShipmentsList()

publicList<SkippedShipment>getSkippedShipmentsList()

The list of all shipments skipped.

repeated .google.cloud.optimization.v1.SkippedShipment skipped_shipments = 4;

Returns
Type Description
List<SkippedShipment>

getSkippedShipmentsOrBuilder(int index)

publicSkippedShipmentOrBuildergetSkippedShipmentsOrBuilder(intindex)

The list of all shipments skipped.

repeated .google.cloud.optimization.v1.SkippedShipment skipped_shipments = 4;

Parameter
Name Description
index int
Returns
Type Description
SkippedShipmentOrBuilder

getSkippedShipmentsOrBuilderList()

publicList<?extendsSkippedShipmentOrBuilder>getSkippedShipmentsOrBuilderList()

The list of all shipments skipped.

repeated .google.cloud.optimization.v1.SkippedShipment skipped_shipments = 4;

Returns
Type Description
List<? extends com.google.cloud.optimization.v1.SkippedShipmentOrBuilder>

getTotalCost() (deprecated)

publicdoublegetTotalCost()

Deprecated. google.cloud.optimization.v1.OptimizeToursResponse.total_cost is deprecated. See google/cloud/optimization/v1/fleet_routing.proto;l=425

Deprecated: Use Metrics.total_cost instead. Total cost of the solution. This takes into account all costs: costs per per hour and travel hour, fixed vehicle costs, unperformed shipment penalty costs, global duration cost, etc.

double total_cost = 2 [deprecated = true];

Returns
Type Description
double

The totalCost.

getValidationErrors(int index)

publicOptimizeToursValidationErrorgetValidationErrors(intindex)

List of all the validation errors that we were able to detect independently. See the "MULTIPLE ERRORS" explanation for the OptimizeToursValidationError message.

repeated .google.cloud.optimization.v1.OptimizeToursValidationError validation_errors = 5;

Parameter
Name Description
index int
Returns
Type Description
OptimizeToursValidationError

getValidationErrorsCount()

publicintgetValidationErrorsCount()

List of all the validation errors that we were able to detect independently. See the "MULTIPLE ERRORS" explanation for the OptimizeToursValidationError message.

repeated .google.cloud.optimization.v1.OptimizeToursValidationError validation_errors = 5;

Returns
Type Description
int

getValidationErrorsList()

publicList<OptimizeToursValidationError>getValidationErrorsList()

List of all the validation errors that we were able to detect independently. See the "MULTIPLE ERRORS" explanation for the OptimizeToursValidationError message.

repeated .google.cloud.optimization.v1.OptimizeToursValidationError validation_errors = 5;

Returns
Type Description
List<OptimizeToursValidationError>

getValidationErrorsOrBuilder(int index)

publicOptimizeToursValidationErrorOrBuildergetValidationErrorsOrBuilder(intindex)

List of all the validation errors that we were able to detect independently. See the "MULTIPLE ERRORS" explanation for the OptimizeToursValidationError message.

repeated .google.cloud.optimization.v1.OptimizeToursValidationError validation_errors = 5;

Parameter
Name Description
index int
Returns
Type Description
OptimizeToursValidationErrorOrBuilder

getValidationErrorsOrBuilderList()

publicList<?extendsOptimizeToursValidationErrorOrBuilder>getValidationErrorsOrBuilderList()

List of all the validation errors that we were able to detect independently. See the "MULTIPLE ERRORS" explanation for the OptimizeToursValidationError message.

repeated .google.cloud.optimization.v1.OptimizeToursValidationError validation_errors = 5;

Returns
Type Description
List<? extends com.google.cloud.optimization.v1.OptimizeToursValidationErrorOrBuilder>

hasMetrics()

publicbooleanhasMetrics()

Duration, distance and usage metrics for this solution.

.google.cloud.optimization.v1.OptimizeToursResponse.Metrics metrics = 6;

Returns
Type Description
boolean

Whether the metrics field is set.

hashCode()

publicinthashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protectedGeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

publicfinalbooleanisInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

publicOptimizeToursResponse.BuildernewBuilderForType()
Returns
Type Description
OptimizeToursResponse.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

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

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

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

toBuilder()

publicOptimizeToursResponse.BuildertoBuilder()
Returns
Type Description
OptimizeToursResponse.Builder

writeTo(CodedOutputStream output)

publicvoidwriteTo(CodedOutputStreamoutput)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException

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.