Class InjectedSolutionConstraint.ConstraintRelaxation (1.41.0)

publicstaticfinalclass InjectedSolutionConstraint.ConstraintRelaxationextendsGeneratedMessageV3implementsInjectedSolutionConstraint.ConstraintRelaxationOrBuilder

For a group of vehicles, specifies at what threshold(s) constraints on visits will be relaxed and to which level. Shipments listed in the skipped_shipment field are constrained to be skipped; i.e., they cannot be performed.

Protobuf type google.cloud.optimization.v1.InjectedSolutionConstraint.ConstraintRelaxation

Inheritance

Object > AbstractMessageLite<MessageType,BuilderType> > AbstractMessage > GeneratedMessageV3 > InjectedSolutionConstraint.ConstraintRelaxation

Inherited Members

com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT)
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT,int)
com.google.protobuf.GeneratedMessageV3.<T>emptyList(java.lang.Class<T>)
com.google.protobuf.GeneratedMessageV3.internalGetMapFieldReflection(int)

Static Fields

RELAXATIONS_FIELD_NUMBER

publicstaticfinalintRELAXATIONS_FIELD_NUMBER
Field Value
Type Description
int

VEHICLE_INDICES_FIELD_NUMBER

publicstaticfinalintVEHICLE_INDICES_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

publicstaticInjectedSolutionConstraint.ConstraintRelaxationgetDefaultInstance()
Returns
Type Description
InjectedSolutionConstraint.ConstraintRelaxation

getDescriptor()

publicstaticfinalDescriptors.DescriptorgetDescriptor()
Returns
Type Description
Descriptor

newBuilder()

publicstaticInjectedSolutionConstraint.ConstraintRelaxation.BuildernewBuilder()
Returns
Type Description
InjectedSolutionConstraint.ConstraintRelaxation.Builder

newBuilder(InjectedSolutionConstraint.ConstraintRelaxation prototype)

publicstaticInjectedSolutionConstraint.ConstraintRelaxation.BuildernewBuilder(InjectedSolutionConstraint.ConstraintRelaxationprototype)
Parameter
Name Description
prototype InjectedSolutionConstraint.ConstraintRelaxation
Returns
Type Description
InjectedSolutionConstraint.ConstraintRelaxation.Builder

parseDelimitedFrom(InputStream input)

publicstaticInjectedSolutionConstraint.ConstraintRelaxationparseDelimitedFrom(InputStreaminput)
Parameter
Name Description
input InputStream
Returns
Type Description
InjectedSolutionConstraint.ConstraintRelaxation
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

publicstaticInjectedSolutionConstraint.ConstraintRelaxationparseDelimitedFrom(InputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
InjectedSolutionConstraint.ConstraintRelaxation
Exceptions
Type Description
IOException

parseFrom(byte[] data)

publicstaticInjectedSolutionConstraint.ConstraintRelaxationparseFrom(byte[]data)
Parameter
Name Description
data byte[]
Returns
Type Description
InjectedSolutionConstraint.ConstraintRelaxation
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

publicstaticInjectedSolutionConstraint.ConstraintRelaxationparseFrom(byte[]data,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
InjectedSolutionConstraint.ConstraintRelaxation
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

publicstaticInjectedSolutionConstraint.ConstraintRelaxationparseFrom(ByteStringdata)
Parameter
Name Description
data ByteString
Returns
Type Description
InjectedSolutionConstraint.ConstraintRelaxation
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

publicstaticInjectedSolutionConstraint.ConstraintRelaxationparseFrom(ByteStringdata,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
InjectedSolutionConstraint.ConstraintRelaxation
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

publicstaticInjectedSolutionConstraint.ConstraintRelaxationparseFrom(CodedInputStreaminput)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
InjectedSolutionConstraint.ConstraintRelaxation
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

publicstaticInjectedSolutionConstraint.ConstraintRelaxationparseFrom(CodedInputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
InjectedSolutionConstraint.ConstraintRelaxation
Exceptions
Type Description
IOException

parseFrom(InputStream input)

publicstaticInjectedSolutionConstraint.ConstraintRelaxationparseFrom(InputStreaminput)
Parameter
Name Description
input InputStream
Returns
Type Description
InjectedSolutionConstraint.ConstraintRelaxation
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

publicstaticInjectedSolutionConstraint.ConstraintRelaxationparseFrom(InputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
InjectedSolutionConstraint.ConstraintRelaxation
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

publicstaticInjectedSolutionConstraint.ConstraintRelaxationparseFrom(ByteBufferdata)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
InjectedSolutionConstraint.ConstraintRelaxation
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

publicstaticInjectedSolutionConstraint.ConstraintRelaxationparseFrom(ByteBufferdata,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
InjectedSolutionConstraint.ConstraintRelaxation
Exceptions
Type Description
InvalidProtocolBufferException

parser()

publicstaticParser<InjectedSolutionConstraint.ConstraintRelaxation>parser()
Returns
Type Description
Parser<ConstraintRelaxation>

Methods

equals(Object obj)

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

getDefaultInstanceForType()

publicInjectedSolutionConstraint.ConstraintRelaxationgetDefaultInstanceForType()
Returns
Type Description
InjectedSolutionConstraint.ConstraintRelaxation

getParserForType()

publicParser<InjectedSolutionConstraint.ConstraintRelaxation>getParserForType()
Returns
Type Description
Parser<ConstraintRelaxation>
Overrides

getRelaxations(int index)

publicInjectedSolutionConstraint.ConstraintRelaxation.RelaxationgetRelaxations(intindex)

All the visit constraint relaxations that will apply to visits on routes with vehicles in vehicle_indices.

repeated .google.cloud.optimization.v1.InjectedSolutionConstraint.ConstraintRelaxation.Relaxation relaxations = 1;

Parameter
Name Description
index int
Returns
Type Description
InjectedSolutionConstraint.ConstraintRelaxation.Relaxation

getRelaxationsCount()

publicintgetRelaxationsCount()

All the visit constraint relaxations that will apply to visits on routes with vehicles in vehicle_indices.

repeated .google.cloud.optimization.v1.InjectedSolutionConstraint.ConstraintRelaxation.Relaxation relaxations = 1;

Returns
Type Description
int

getRelaxationsList()

publicList<InjectedSolutionConstraint.ConstraintRelaxation.Relaxation>getRelaxationsList()

All the visit constraint relaxations that will apply to visits on routes with vehicles in vehicle_indices.

repeated .google.cloud.optimization.v1.InjectedSolutionConstraint.ConstraintRelaxation.Relaxation relaxations = 1;

Returns
Type Description
List<Relaxation>

getRelaxationsOrBuilder(int index)

publicInjectedSolutionConstraint.ConstraintRelaxation.RelaxationOrBuildergetRelaxationsOrBuilder(intindex)

All the visit constraint relaxations that will apply to visits on routes with vehicles in vehicle_indices.

repeated .google.cloud.optimization.v1.InjectedSolutionConstraint.ConstraintRelaxation.Relaxation relaxations = 1;

Parameter
Name Description
index int
Returns
Type Description
InjectedSolutionConstraint.ConstraintRelaxation.RelaxationOrBuilder

getRelaxationsOrBuilderList()

publicList<?extendsInjectedSolutionConstraint.ConstraintRelaxation.RelaxationOrBuilder>getRelaxationsOrBuilderList()

All the visit constraint relaxations that will apply to visits on routes with vehicles in vehicle_indices.

repeated .google.cloud.optimization.v1.InjectedSolutionConstraint.ConstraintRelaxation.Relaxation relaxations = 1;

Returns
Type Description
List<? extends com.google.cloud.optimization.v1.InjectedSolutionConstraint.ConstraintRelaxation.RelaxationOrBuilder>

getSerializedSize()

publicintgetSerializedSize()
Returns
Type Description
int
Overrides

getVehicleIndices(int index)

publicintgetVehicleIndices(intindex)

Specifies the vehicle indices to which the visit constraint relaxations apply. If empty, this is considered the default and the relaxations apply to all vehicles that are not specified in other constraint_relaxations. There can be at most one default, i.e., at most one constraint relaxation field is allowed empty vehicle_indices. A vehicle index can only be listed once, even within several constraint_relaxations.

A vehicle index is mapped the same as ShipmentRoute.vehicle_index, if interpret_injected_solutions_using_labels is true (see fields comment).

repeated int32 vehicle_indices = 2;

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
int

The vehicleIndices at the given index.

getVehicleIndicesCount()

publicintgetVehicleIndicesCount()

Specifies the vehicle indices to which the visit constraint relaxations apply. If empty, this is considered the default and the relaxations apply to all vehicles that are not specified in other constraint_relaxations. There can be at most one default, i.e., at most one constraint relaxation field is allowed empty vehicle_indices. A vehicle index can only be listed once, even within several constraint_relaxations.

A vehicle index is mapped the same as ShipmentRoute.vehicle_index, if interpret_injected_solutions_using_labels is true (see fields comment).

repeated int32 vehicle_indices = 2;

Returns
Type Description
int

The count of vehicleIndices.

getVehicleIndicesList()

publicList<Integer>getVehicleIndicesList()

Specifies the vehicle indices to which the visit constraint relaxations apply. If empty, this is considered the default and the relaxations apply to all vehicles that are not specified in other constraint_relaxations. There can be at most one default, i.e., at most one constraint relaxation field is allowed empty vehicle_indices. A vehicle index can only be listed once, even within several constraint_relaxations.

A vehicle index is mapped the same as ShipmentRoute.vehicle_index, if interpret_injected_solutions_using_labels is true (see fields comment).

repeated int32 vehicle_indices = 2;

Returns
Type Description
List<Integer>

A list containing the vehicleIndices.

hashCode()

publicinthashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protectedGeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

publicfinalbooleanisInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

publicInjectedSolutionConstraint.ConstraintRelaxation.BuildernewBuilderForType()
Returns
Type Description
InjectedSolutionConstraint.ConstraintRelaxation.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protectedInjectedSolutionConstraint.ConstraintRelaxation.BuildernewBuilderForType(GeneratedMessageV3.BuilderParentparent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
InjectedSolutionConstraint.ConstraintRelaxation.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

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

toBuilder()

publicInjectedSolutionConstraint.ConstraintRelaxation.BuildertoBuilder()
Returns
Type Description
InjectedSolutionConstraint.ConstraintRelaxation.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.