public final class MPQuadraticObjective extends com.google.protobuf.GeneratedMessage implements MPQuadraticObjectiveOrBuilder
Quadratic part of a model's objective. Added with other objectives (such as linear), this creates the model's objective function to be optimized. Note: the linear part of the objective currently needs to be specified in the MPVariableProto.objective_coefficient fields. If you'd rather have a dedicated linear array here, talk to or-core-team@Protobuf type
operations_research.MPQuadraticObjective
Modifier and Type | Class and Description |
---|---|
static class |
MPQuadraticObjective.Builder
Quadratic part of a model's objective.
|
com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageT,BuilderT>>, com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessage.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessage.FieldAccessorTable, com.google.protobuf.GeneratedMessage.GeneratedExtension<ContainingT extends com.google.protobuf.Message,T>, com.google.protobuf.GeneratedMessage.UnusedPrivateParameter
Modifier and Type | Field and Description |
---|---|
static int |
COEFFICIENT_FIELD_NUMBER |
static int |
QVAR1_INDEX_FIELD_NUMBER |
static int |
QVAR2_INDEX_FIELD_NUMBER |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
double |
getCoefficient(int index)
Must be finite.
|
int |
getCoefficientCount()
Must be finite.
|
java.util.List<java.lang.Double> |
getCoefficientList()
Must be finite.
|
static MPQuadraticObjective |
getDefaultInstance() |
MPQuadraticObjective |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
com.google.protobuf.Parser<MPQuadraticObjective> |
getParserForType() |
int |
getQvar1Index(int index)
Sparse representation of quadratic terms in the objective function, where
term i is qvar1_index[i] * qvar2_index[i] * coefficient[i].
|
int |
getQvar1IndexCount()
Sparse representation of quadratic terms in the objective function, where
term i is qvar1_index[i] * qvar2_index[i] * coefficient[i].
|
java.util.List<java.lang.Integer> |
getQvar1IndexList()
Sparse representation of quadratic terms in the objective function, where
term i is qvar1_index[i] * qvar2_index[i] * coefficient[i].
|
int |
getQvar2Index(int index)
repeated int32 qvar2_index = 2; |
int |
getQvar2IndexCount()
repeated int32 qvar2_index = 2; |
java.util.List<java.lang.Integer> |
getQvar2IndexList()
repeated int32 qvar2_index = 2; |
int |
getSerializedSize() |
int |
hashCode() |
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
static MPQuadraticObjective.Builder |
newBuilder() |
static MPQuadraticObjective.Builder |
newBuilder(MPQuadraticObjective prototype) |
MPQuadraticObjective.Builder |
newBuilderForType() |
protected MPQuadraticObjective.Builder |
newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent) |
static MPQuadraticObjective |
parseDelimitedFrom(java.io.InputStream input) |
static MPQuadraticObjective |
parseDelimitedFrom(java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static MPQuadraticObjective |
parseFrom(byte[] data) |
static MPQuadraticObjective |
parseFrom(byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static MPQuadraticObjective |
parseFrom(java.nio.ByteBuffer data) |
static MPQuadraticObjective |
parseFrom(java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static MPQuadraticObjective |
parseFrom(com.google.protobuf.ByteString data) |
static MPQuadraticObjective |
parseFrom(com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static MPQuadraticObjective |
parseFrom(com.google.protobuf.CodedInputStream input) |
static MPQuadraticObjective |
parseFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static MPQuadraticObjective |
parseFrom(java.io.InputStream input) |
static MPQuadraticObjective |
parseFrom(java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static com.google.protobuf.Parser<MPQuadraticObjective> |
parser() |
MPQuadraticObjective.Builder |
toBuilder() |
void |
writeTo(com.google.protobuf.CodedOutputStream output) |
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, isStringEmpty, makeMutableCopy, makeMutableCopy, mergeFromAndMakeImmutableInternal, newFileScopedGeneratedExtension, newInstance, newMessageScopedGeneratedExtension, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTag
findInitializationErrors, getInitializationErrorString, hashFields, toString
addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
public static final int QVAR1_INDEX_FIELD_NUMBER
public static final int QVAR2_INDEX_FIELD_NUMBER
public static final int COEFFICIENT_FIELD_NUMBER
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable
in class com.google.protobuf.GeneratedMessage
public java.util.List<java.lang.Integer> getQvar1IndexList()
Sparse representation of quadratic terms in the objective function, where term i is qvar1_index[i] * qvar2_index[i] * coefficient[i]. `qvar1_index` and `qvar2_index` are variable indices w.r.t the "variable" field in MPModelProto. `qvar1_index`, `qvar2_index` and `coefficients` must have the same size. If the same unordered pair (qvar1_index, qvar2_index) appears several times, the sum of all of the associated coefficients will be applied.
repeated int32 qvar1_index = 1;
getQvar1IndexList
in interface MPQuadraticObjectiveOrBuilder
public int getQvar1IndexCount()
Sparse representation of quadratic terms in the objective function, where term i is qvar1_index[i] * qvar2_index[i] * coefficient[i]. `qvar1_index` and `qvar2_index` are variable indices w.r.t the "variable" field in MPModelProto. `qvar1_index`, `qvar2_index` and `coefficients` must have the same size. If the same unordered pair (qvar1_index, qvar2_index) appears several times, the sum of all of the associated coefficients will be applied.
repeated int32 qvar1_index = 1;
getQvar1IndexCount
in interface MPQuadraticObjectiveOrBuilder
public int getQvar1Index(int index)
Sparse representation of quadratic terms in the objective function, where term i is qvar1_index[i] * qvar2_index[i] * coefficient[i]. `qvar1_index` and `qvar2_index` are variable indices w.r.t the "variable" field in MPModelProto. `qvar1_index`, `qvar2_index` and `coefficients` must have the same size. If the same unordered pair (qvar1_index, qvar2_index) appears several times, the sum of all of the associated coefficients will be applied.
repeated int32 qvar1_index = 1;
getQvar1Index
in interface MPQuadraticObjectiveOrBuilder
index
- The index of the element to return.public java.util.List<java.lang.Integer> getQvar2IndexList()
repeated int32 qvar2_index = 2;
getQvar2IndexList
in interface MPQuadraticObjectiveOrBuilder
public int getQvar2IndexCount()
repeated int32 qvar2_index = 2;
getQvar2IndexCount
in interface MPQuadraticObjectiveOrBuilder
public int getQvar2Index(int index)
repeated int32 qvar2_index = 2;
getQvar2Index
in interface MPQuadraticObjectiveOrBuilder
index
- The index of the element to return.public java.util.List<java.lang.Double> getCoefficientList()
Must be finite.
repeated double coefficient = 3;
getCoefficientList
in interface MPQuadraticObjectiveOrBuilder
public int getCoefficientCount()
Must be finite.
repeated double coefficient = 3;
getCoefficientCount
in interface MPQuadraticObjectiveOrBuilder
public double getCoefficient(int index)
Must be finite.
repeated double coefficient = 3;
getCoefficient
in interface MPQuadraticObjectiveOrBuilder
index
- The index of the element to return.public final boolean isInitialized()
isInitialized
in interface com.google.protobuf.MessageLiteOrBuilder
isInitialized
in class com.google.protobuf.GeneratedMessage
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException
writeTo
in interface com.google.protobuf.MessageLite
writeTo
in class com.google.protobuf.GeneratedMessage
java.io.IOException
public int getSerializedSize()
getSerializedSize
in interface com.google.protobuf.MessageLite
getSerializedSize
in class com.google.protobuf.GeneratedMessage
public boolean equals(java.lang.Object obj)
equals
in interface com.google.protobuf.Message
equals
in class com.google.protobuf.AbstractMessage
public int hashCode()
hashCode
in interface com.google.protobuf.Message
hashCode
in class com.google.protobuf.AbstractMessage
public static MPQuadraticObjective parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferException
public static MPQuadraticObjective parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferException
public static MPQuadraticObjective parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferException
public static MPQuadraticObjective parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferException
public static MPQuadraticObjective parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferException
public static MPQuadraticObjective parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferException
public static MPQuadraticObjective parseFrom(java.io.InputStream input) throws java.io.IOException
java.io.IOException
public static MPQuadraticObjective parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOException
public static MPQuadraticObjective parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException
java.io.IOException
public static MPQuadraticObjective parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOException
public static MPQuadraticObjective parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException
java.io.IOException
public static MPQuadraticObjective parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOException
public MPQuadraticObjective.Builder newBuilderForType()
newBuilderForType
in interface com.google.protobuf.Message
newBuilderForType
in interface com.google.protobuf.MessageLite
public static MPQuadraticObjective.Builder newBuilder()
public static MPQuadraticObjective.Builder newBuilder(MPQuadraticObjective prototype)
public MPQuadraticObjective.Builder toBuilder()
toBuilder
in interface com.google.protobuf.Message
toBuilder
in interface com.google.protobuf.MessageLite
protected MPQuadraticObjective.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent)
newBuilderForType
in class com.google.protobuf.AbstractMessage
public static MPQuadraticObjective getDefaultInstance()
public static com.google.protobuf.Parser<MPQuadraticObjective> parser()
public com.google.protobuf.Parser<MPQuadraticObjective> getParserForType()
getParserForType
in interface com.google.protobuf.Message
getParserForType
in interface com.google.protobuf.MessageLite
getParserForType
in class com.google.protobuf.GeneratedMessage
public MPQuadraticObjective getDefaultInstanceForType()
getDefaultInstanceForType
in interface com.google.protobuf.MessageLiteOrBuilder
getDefaultInstanceForType
in interface com.google.protobuf.MessageOrBuilder
Copyright © 2025. All rights reserved.