Class LinearObjective
java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessage
com.google.ortools.sat.LinearObjective
- All Implemented Interfaces:
- LinearObjectiveOrBuilder,- com.google.protobuf.Message,- com.google.protobuf.MessageLite,- com.google.protobuf.MessageLiteOrBuilder,- com.google.protobuf.MessageOrBuilder,- Serializable
@Generated
public final class LinearObjective
extends com.google.protobuf.GeneratedMessage
implements LinearObjectiveOrBuilder
The objective of an optimization problem.Protobuf type
operations_research.sat.LinearObjective- See Also:
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic final classThe objective of an optimization problem.Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessagecom.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 Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessagecom.google.protobuf.AbstractMessage.BuilderParentNested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLitecom.google.protobuf.AbstractMessageLite.InternalOneOfEnum
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intFields inherited from class com.google.protobuf.GeneratedMessagealwaysUseFieldBuilders, unknownFieldsFields inherited from class com.google.protobuf.AbstractMessagememoizedSizeFields inherited from class com.google.protobuf.AbstractMessageLitememoizedHashCode
- 
Method SummaryModifier and TypeMethodDescriptionbooleanlonggetCoefficients(int index) repeated int64 coefficients = 2;intrepeated int64 coefficients = 2;repeated int64 coefficients = 2;static LinearObjectivestatic final com.google.protobuf.Descriptors.DescriptorintgetLiterals(int index) The goal is always to minimize the linear Boolean formula defined by these two fields: sum_i literal_i * coefficient_i where literal_i is 1 iff literal_i is true in a given assignment.intThe goal is always to minimize the linear Boolean formula defined by these two fields: sum_i literal_i * coefficient_i where literal_i is 1 iff literal_i is true in a given assignment.The goal is always to minimize the linear Boolean formula defined by these two fields: sum_i literal_i * coefficient_i where literal_i is 1 iff literal_i is true in a given assignment.doubleFor a given variable assignment, the "real" problem objective value is 'scaling_factor * (minimization_objective + offset)' where 'minimization_objective is the one defined just above.com.google.protobuf.Parser<LinearObjective> doubleoptional double scaling_factor = 4 [default = 1];intinthashCode()booleanFor a given variable assignment, the "real" problem objective value is 'scaling_factor * (minimization_objective + offset)' where 'minimization_objective is the one defined just above.booleanoptional double scaling_factor = 4 [default = 1];protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanstatic LinearObjective.Builderstatic LinearObjective.BuildernewBuilder(LinearObjective prototype) protected LinearObjective.BuildernewBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent) static LinearObjectiveparseDelimitedFrom(InputStream input) static LinearObjectiveparseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static LinearObjectiveparseFrom(byte[] data) static LinearObjectiveparseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static LinearObjectiveparseFrom(com.google.protobuf.ByteString data) static LinearObjectiveparseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static LinearObjectiveparseFrom(com.google.protobuf.CodedInputStream input) static LinearObjectiveparseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static LinearObjectiveparseFrom(InputStream input) static LinearObjectiveparseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static LinearObjectiveparseFrom(ByteBuffer data) static LinearObjectiveparseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static com.google.protobuf.Parser<LinearObjective> parser()voidwriteTo(com.google.protobuf.CodedOutputStream output) Methods inherited from class com.google.protobuf.GeneratedMessagecanUseUnsafe, 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, writeStringNoTagMethods inherited from class com.google.protobuf.AbstractMessagefindInitializationErrors, getInitializationErrorString, hashFields, toStringMethods inherited from class com.google.protobuf.AbstractMessageLiteaddAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.MessageLitetoByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from interface com.google.protobuf.MessageOrBuilderfindInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
- 
Field Details- 
LITERALS_FIELD_NUMBERpublic static final int LITERALS_FIELD_NUMBER- See Also:
 
- 
COEFFICIENTS_FIELD_NUMBERpublic static final int COEFFICIENTS_FIELD_NUMBER- See Also:
 
- 
OFFSET_FIELD_NUMBERpublic static final int OFFSET_FIELD_NUMBER- See Also:
 
- 
SCALING_FACTOR_FIELD_NUMBERpublic static final int SCALING_FACTOR_FIELD_NUMBER- See Also:
 
 
- 
- 
Method Details- 
getDescriptorpublic static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
- 
internalGetFieldAccessorTableprotected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
- internalGetFieldAccessorTablein class- com.google.protobuf.GeneratedMessage
 
- 
getLiteralsListThe goal is always to minimize the linear Boolean formula defined by these two fields: sum_i literal_i * coefficient_i where literal_i is 1 iff literal_i is true in a given assignment. Note that the same variable shouldn't appear twice and that zero coefficients are not allowed. repeated int32 literals = 1;- Specified by:
- getLiteralsListin interface- LinearObjectiveOrBuilder
- Returns:
- A list containing the literals.
 
- 
getLiteralsCountpublic int getLiteralsCount()The goal is always to minimize the linear Boolean formula defined by these two fields: sum_i literal_i * coefficient_i where literal_i is 1 iff literal_i is true in a given assignment. Note that the same variable shouldn't appear twice and that zero coefficients are not allowed. repeated int32 literals = 1;- Specified by:
- getLiteralsCountin interface- LinearObjectiveOrBuilder
- Returns:
- The count of literals.
 
- 
getLiteralspublic int getLiterals(int index) The goal is always to minimize the linear Boolean formula defined by these two fields: sum_i literal_i * coefficient_i where literal_i is 1 iff literal_i is true in a given assignment. Note that the same variable shouldn't appear twice and that zero coefficients are not allowed. repeated int32 literals = 1;- Specified by:
- getLiteralsin interface- LinearObjectiveOrBuilder
- Parameters:
- index- The index of the element to return.
- Returns:
- The literals at the given index.
 
- 
getCoefficientsListrepeated int64 coefficients = 2;- Specified by:
- getCoefficientsListin interface- LinearObjectiveOrBuilder
- Returns:
- A list containing the coefficients.
 
- 
getCoefficientsCountpublic int getCoefficientsCount()repeated int64 coefficients = 2;- Specified by:
- getCoefficientsCountin interface- LinearObjectiveOrBuilder
- Returns:
- The count of coefficients.
 
- 
getCoefficientspublic long getCoefficients(int index) repeated int64 coefficients = 2;- Specified by:
- getCoefficientsin interface- LinearObjectiveOrBuilder
- Parameters:
- index- The index of the element to return.
- Returns:
- The coefficients at the given index.
 
- 
hasOffsetpublic boolean hasOffset()For a given variable assignment, the "real" problem objective value is 'scaling_factor * (minimization_objective + offset)' where 'minimization_objective is the one defined just above. Note that this is not what we minimize, but it is what we display. In particular if scaling_factor is negative, then the "real" problem is a maximization problem, even if the "internal" objective is minimized. optional double offset = 3 [default = 0];- Specified by:
- hasOffsetin interface- LinearObjectiveOrBuilder
- Returns:
- Whether the offset field is set.
 
- 
getOffsetpublic double getOffset()For a given variable assignment, the "real" problem objective value is 'scaling_factor * (minimization_objective + offset)' where 'minimization_objective is the one defined just above. Note that this is not what we minimize, but it is what we display. In particular if scaling_factor is negative, then the "real" problem is a maximization problem, even if the "internal" objective is minimized. optional double offset = 3 [default = 0];- Specified by:
- getOffsetin interface- LinearObjectiveOrBuilder
- Returns:
- The offset.
 
- 
hasScalingFactorpublic boolean hasScalingFactor()optional double scaling_factor = 4 [default = 1];- Specified by:
- hasScalingFactorin interface- LinearObjectiveOrBuilder
- Returns:
- Whether the scalingFactor field is set.
 
- 
getScalingFactorpublic double getScalingFactor()optional double scaling_factor = 4 [default = 1];- Specified by:
- getScalingFactorin interface- LinearObjectiveOrBuilder
- Returns:
- The scalingFactor.
 
- 
isInitializedpublic final boolean isInitialized()- Specified by:
- isInitializedin interface- com.google.protobuf.MessageLiteOrBuilder
- Overrides:
- isInitializedin class- com.google.protobuf.GeneratedMessage
 
- 
writeTo- Specified by:
- writeToin interface- com.google.protobuf.MessageLite
- Overrides:
- writeToin class- com.google.protobuf.GeneratedMessage
- Throws:
- IOException
 
- 
getSerializedSizepublic int getSerializedSize()- Specified by:
- getSerializedSizein interface- com.google.protobuf.MessageLite
- Overrides:
- getSerializedSizein class- com.google.protobuf.GeneratedMessage
 
- 
equals- Specified by:
- equalsin interface- com.google.protobuf.Message
- Overrides:
- equalsin class- com.google.protobuf.AbstractMessage
 
- 
hashCodepublic int hashCode()- Specified by:
- hashCodein interface- com.google.protobuf.Message
- Overrides:
- hashCodein class- com.google.protobuf.AbstractMessage
 
- 
parseFrompublic static LinearObjective parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
- com.google.protobuf.InvalidProtocolBufferException
 
- 
parseFrompublic static LinearObjective parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
- com.google.protobuf.InvalidProtocolBufferException
 
- 
parseFrompublic static LinearObjective parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
- com.google.protobuf.InvalidProtocolBufferException
 
- 
parseFrompublic static LinearObjective parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
- com.google.protobuf.InvalidProtocolBufferException
 
- 
parseFrompublic static LinearObjective parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
- com.google.protobuf.InvalidProtocolBufferException
 
- 
parseFrompublic static LinearObjective parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
- com.google.protobuf.InvalidProtocolBufferException
 
- 
parseFrom- Throws:
- IOException
 
- 
parseFrompublic static LinearObjective parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
- IOException
 
- 
parseDelimitedFrom- Throws:
- IOException
 
- 
parseDelimitedFrompublic static LinearObjective parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
- IOException
 
- 
parseFrompublic static LinearObjective parseFrom(com.google.protobuf.CodedInputStream input) throws IOException - Throws:
- IOException
 
- 
parseFrompublic static LinearObjective parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
- IOException
 
- 
newBuilderForType- Specified by:
- newBuilderForTypein interface- com.google.protobuf.Message
- Specified by:
- newBuilderForTypein interface- com.google.protobuf.MessageLite
 
- 
newBuilder
- 
newBuilder
- 
toBuilder- Specified by:
- toBuilderin interface- com.google.protobuf.Message
- Specified by:
- toBuilderin interface- com.google.protobuf.MessageLite
 
- 
newBuilderForTypeprotected LinearObjective.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent) - Overrides:
- newBuilderForTypein class- com.google.protobuf.AbstractMessage
 
- 
getDefaultInstance
- 
parser
- 
getParserForType- Specified by:
- getParserForTypein interface- com.google.protobuf.Message
- Specified by:
- getParserForTypein interface- com.google.protobuf.MessageLite
- Overrides:
- getParserForTypein class- com.google.protobuf.GeneratedMessage
 
- 
getDefaultInstanceForType- Specified by:
- getDefaultInstanceForTypein interface- com.google.protobuf.MessageLiteOrBuilder
- Specified by:
- getDefaultInstanceForTypein interface- com.google.protobuf.MessageOrBuilder
 
 
-