Class InjectedSolutionConstraint.ConstraintRelaxation (1.39.0)

public static final class InjectedSolutionConstraint.ConstraintRelaxation extends GeneratedMessageV3 implements InjectedSolutionConstraint.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

Static Fields

RELAXATIONS_FIELD_NUMBER

public static final int RELAXATIONS_FIELD_NUMBER
Field Value
TypeDescription
int

VEHICLE_INDICES_FIELD_NUMBER

public static final int VEHICLE_INDICES_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static InjectedSolutionConstraint.ConstraintRelaxation getDefaultInstance()
Returns
TypeDescription
InjectedSolutionConstraint.ConstraintRelaxation

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static InjectedSolutionConstraint.ConstraintRelaxation.Builder newBuilder()
Returns
TypeDescription
InjectedSolutionConstraint.ConstraintRelaxation.Builder

newBuilder(InjectedSolutionConstraint.ConstraintRelaxation prototype)

public static InjectedSolutionConstraint.ConstraintRelaxation.Builder newBuilder(InjectedSolutionConstraint.ConstraintRelaxation prototype)
Parameter
NameDescription
prototypeInjectedSolutionConstraint.ConstraintRelaxation
Returns
TypeDescription
InjectedSolutionConstraint.ConstraintRelaxation.Builder

parseDelimitedFrom(InputStream input)

public static InjectedSolutionConstraint.ConstraintRelaxation parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
InjectedSolutionConstraint.ConstraintRelaxation
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static InjectedSolutionConstraint.ConstraintRelaxation parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
InjectedSolutionConstraint.ConstraintRelaxation
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static InjectedSolutionConstraint.ConstraintRelaxation parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
InjectedSolutionConstraint.ConstraintRelaxation
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static InjectedSolutionConstraint.ConstraintRelaxation parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
InjectedSolutionConstraint.ConstraintRelaxation
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static InjectedSolutionConstraint.ConstraintRelaxation parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
InjectedSolutionConstraint.ConstraintRelaxation
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static InjectedSolutionConstraint.ConstraintRelaxation parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
InjectedSolutionConstraint.ConstraintRelaxation
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static InjectedSolutionConstraint.ConstraintRelaxation parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
InjectedSolutionConstraint.ConstraintRelaxation
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static InjectedSolutionConstraint.ConstraintRelaxation parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
InjectedSolutionConstraint.ConstraintRelaxation
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static InjectedSolutionConstraint.ConstraintRelaxation parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
InjectedSolutionConstraint.ConstraintRelaxation
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static InjectedSolutionConstraint.ConstraintRelaxation parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
InjectedSolutionConstraint.ConstraintRelaxation
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static InjectedSolutionConstraint.ConstraintRelaxation parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
InjectedSolutionConstraint.ConstraintRelaxation
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static InjectedSolutionConstraint.ConstraintRelaxation parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
InjectedSolutionConstraint.ConstraintRelaxation
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<InjectedSolutionConstraint.ConstraintRelaxation> parser()
Returns
TypeDescription
Parser<ConstraintRelaxation>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getDefaultInstanceForType()

public InjectedSolutionConstraint.ConstraintRelaxation getDefaultInstanceForType()
Returns
TypeDescription
InjectedSolutionConstraint.ConstraintRelaxation

getParserForType()

public Parser<InjectedSolutionConstraint.ConstraintRelaxation> getParserForType()
Returns
TypeDescription
Parser<ConstraintRelaxation>
Overrides

getRelaxations(int index)

public InjectedSolutionConstraint.ConstraintRelaxation.Relaxation getRelaxations(int index)

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
NameDescription
indexint
Returns
TypeDescription
InjectedSolutionConstraint.ConstraintRelaxation.Relaxation

getRelaxationsCount()

public int getRelaxationsCount()

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
TypeDescription
int

getRelaxationsList()

public List<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
TypeDescription
List<Relaxation>

getRelaxationsOrBuilder(int index)

public InjectedSolutionConstraint.ConstraintRelaxation.RelaxationOrBuilder getRelaxationsOrBuilder(int index)

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
NameDescription
indexint
Returns
TypeDescription
InjectedSolutionConstraint.ConstraintRelaxation.RelaxationOrBuilder

getRelaxationsOrBuilderList()

public List<? extends InjectedSolutionConstraint.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
TypeDescription
List<? extends com.google.cloud.optimization.v1.InjectedSolutionConstraint.ConstraintRelaxation.RelaxationOrBuilder>

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

getVehicleIndices(int index)

public int getVehicleIndices(int index)

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
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
int

The vehicleIndices at the given index.

getVehicleIndicesCount()

public int getVehicleIndicesCount()

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
TypeDescription
int

The count of vehicleIndices.

getVehicleIndicesList()

public List<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
TypeDescription
List<Integer>

A list containing the vehicleIndices.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public InjectedSolutionConstraint.ConstraintRelaxation.Builder newBuilderForType()
Returns
TypeDescription
InjectedSolutionConstraint.ConstraintRelaxation.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected InjectedSolutionConstraint.ConstraintRelaxation.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
InjectedSolutionConstraint.ConstraintRelaxation.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public InjectedSolutionConstraint.ConstraintRelaxation.Builder toBuilder()
Returns
TypeDescription
InjectedSolutionConstraint.ConstraintRelaxation.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides
Exceptions
TypeDescription
IOException