Class LinearBooleanProblem
java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessage
com.google.ortools.sat.LinearBooleanProblem
- All Implemented Interfaces:
LinearBooleanProblemOrBuilder,com.google.protobuf.Message,com.google.protobuf.MessageLite,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Serializable
@Generated
public final class LinearBooleanProblem
extends com.google.protobuf.GeneratedMessage
implements LinearBooleanProblemOrBuilder
A linear Boolean problem.Protobuf type
operations_research.sat.LinearBooleanProblem- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classA linear Boolean problem.Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessage
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 Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessage
com.google.protobuf.AbstractMessage.BuilderParentNested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessageLite.InternalOneOfEnum -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intFields inherited from class com.google.protobuf.GeneratedMessage
alwaysUseFieldBuilders, unknownFieldsFields inherited from class com.google.protobuf.AbstractMessage
memoizedSizeFields inherited from class com.google.protobuf.AbstractMessageLite
memoizedHashCode -
Method Summary
Modifier and TypeMethodDescriptionbooleanStores an assignment of the problem variables.Stores an assignment of the problem variables.getConstraints(int index) The constraints of the problem.intThe constraints of the problem.The constraints of the problem.getConstraintsOrBuilder(int index) The constraints of the problem.List<? extends LinearBooleanConstraintOrBuilder> The constraints of the problem.static LinearBooleanProblemstatic final com.google.protobuf.Descriptors.DescriptorgetName()The name of the problem.com.google.protobuf.ByteStringThe name of the problem.intThe number of variables in the problem.The objective of the problem.The objective of the problem.intHack: When converting a wcnf formulat to a LinearBooleanProblem, extra variables need to be created.com.google.protobuf.Parser<LinearBooleanProblem> intgetVarNames(int index) The names of the problem variables.com.google.protobuf.ByteStringgetVarNamesBytes(int index) The names of the problem variables.intThe names of the problem variables.com.google.protobuf.ProtocolStringListThe names of the problem variables.booleanStores an assignment of the problem variables.inthashCode()booleanhasName()The name of the problem.booleanThe number of variables in the problem.booleanThe objective of the problem.booleanHack: When converting a wcnf formulat to a LinearBooleanProblem, extra variables need to be created.protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanstatic LinearBooleanProblem.Builderstatic LinearBooleanProblem.BuildernewBuilder(LinearBooleanProblem prototype) protected LinearBooleanProblem.BuildernewBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent) static LinearBooleanProblemparseDelimitedFrom(InputStream input) static LinearBooleanProblemparseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static LinearBooleanProblemparseFrom(byte[] data) static LinearBooleanProblemparseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static LinearBooleanProblemparseFrom(com.google.protobuf.ByteString data) static LinearBooleanProblemparseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static LinearBooleanProblemparseFrom(com.google.protobuf.CodedInputStream input) static LinearBooleanProblemparseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static LinearBooleanProblemparseFrom(InputStream input) static LinearBooleanProblemparseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static LinearBooleanProblemparseFrom(ByteBuffer data) static LinearBooleanProblemparseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static com.google.protobuf.Parser<LinearBooleanProblem> parser()voidwriteTo(com.google.protobuf.CodedOutputStream output) Methods inherited from class com.google.protobuf.GeneratedMessage
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, writeStringNoTagMethods inherited from class com.google.protobuf.AbstractMessage
findInitializationErrors, getInitializationErrorString, hashFields, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite
addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.MessageLite
toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Field Details
-
NAME_FIELD_NUMBER
public static final int NAME_FIELD_NUMBER- See Also:
-
NUM_VARIABLES_FIELD_NUMBER
public static final int NUM_VARIABLES_FIELD_NUMBER- See Also:
-
CONSTRAINTS_FIELD_NUMBER
public static final int CONSTRAINTS_FIELD_NUMBER- See Also:
-
OBJECTIVE_FIELD_NUMBER
public static final int OBJECTIVE_FIELD_NUMBER- See Also:
-
VAR_NAMES_FIELD_NUMBER
public static final int VAR_NAMES_FIELD_NUMBER- See Also:
-
ASSIGNMENT_FIELD_NUMBER
public static final int ASSIGNMENT_FIELD_NUMBER- See Also:
-
ORIGINAL_NUM_VARIABLES_FIELD_NUMBER
public static final int ORIGINAL_NUM_VARIABLES_FIELD_NUMBER- See Also:
-
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage
-
hasName
public boolean hasName()The name of the problem.
optional string name = 1 [default = ""];- Specified by:
hasNamein interfaceLinearBooleanProblemOrBuilder- Returns:
- Whether the name field is set.
-
getName
The name of the problem.
optional string name = 1 [default = ""];- Specified by:
getNamein interfaceLinearBooleanProblemOrBuilder- Returns:
- The name.
-
getNameBytes
public com.google.protobuf.ByteString getNameBytes()The name of the problem.
optional string name = 1 [default = ""];- Specified by:
getNameBytesin interfaceLinearBooleanProblemOrBuilder- Returns:
- The bytes for name.
-
hasNumVariables
public boolean hasNumVariables()The number of variables in the problem. All the signed representation of the problem literals must be in [-num_variables, num_variables], excluding 0.
optional int32 num_variables = 3;- Specified by:
hasNumVariablesin interfaceLinearBooleanProblemOrBuilder- Returns:
- Whether the numVariables field is set.
-
getNumVariables
public int getNumVariables()The number of variables in the problem. All the signed representation of the problem literals must be in [-num_variables, num_variables], excluding 0.
optional int32 num_variables = 3;- Specified by:
getNumVariablesin interfaceLinearBooleanProblemOrBuilder- Returns:
- The numVariables.
-
getConstraintsList
The constraints of the problem.
repeated .operations_research.sat.LinearBooleanConstraint constraints = 4;- Specified by:
getConstraintsListin interfaceLinearBooleanProblemOrBuilder
-
getConstraintsOrBuilderList
The constraints of the problem.
repeated .operations_research.sat.LinearBooleanConstraint constraints = 4;- Specified by:
getConstraintsOrBuilderListin interfaceLinearBooleanProblemOrBuilder
-
getConstraintsCount
public int getConstraintsCount()The constraints of the problem.
repeated .operations_research.sat.LinearBooleanConstraint constraints = 4;- Specified by:
getConstraintsCountin interfaceLinearBooleanProblemOrBuilder
-
getConstraints
The constraints of the problem.
repeated .operations_research.sat.LinearBooleanConstraint constraints = 4;- Specified by:
getConstraintsin interfaceLinearBooleanProblemOrBuilder
-
getConstraintsOrBuilder
The constraints of the problem.
repeated .operations_research.sat.LinearBooleanConstraint constraints = 4;- Specified by:
getConstraintsOrBuilderin interfaceLinearBooleanProblemOrBuilder
-
hasObjective
public boolean hasObjective()The objective of the problem. If left empty, we just have a satisfiability problem.
optional .operations_research.sat.LinearObjective objective = 5;- Specified by:
hasObjectivein interfaceLinearBooleanProblemOrBuilder- Returns:
- Whether the objective field is set.
-
getObjective
The objective of the problem. If left empty, we just have a satisfiability problem.
optional .operations_research.sat.LinearObjective objective = 5;- Specified by:
getObjectivein interfaceLinearBooleanProblemOrBuilder- Returns:
- The objective.
-
getObjectiveOrBuilder
The objective of the problem. If left empty, we just have a satisfiability problem.
optional .operations_research.sat.LinearObjective objective = 5;- Specified by:
getObjectiveOrBuilderin interfaceLinearBooleanProblemOrBuilder
-
getVarNamesList
public com.google.protobuf.ProtocolStringList getVarNamesList()The names of the problem variables. The variables index are 0-based and var_names[i] will be the name of the i-th variable which correspond to literals +(i + 1) or -(i + 1). This is optional and can be left empty.
repeated string var_names = 6;- Specified by:
getVarNamesListin interfaceLinearBooleanProblemOrBuilder- Returns:
- A list containing the varNames.
-
getVarNamesCount
public int getVarNamesCount()The names of the problem variables. The variables index are 0-based and var_names[i] will be the name of the i-th variable which correspond to literals +(i + 1) or -(i + 1). This is optional and can be left empty.
repeated string var_names = 6;- Specified by:
getVarNamesCountin interfaceLinearBooleanProblemOrBuilder- Returns:
- The count of varNames.
-
getVarNames
The names of the problem variables. The variables index are 0-based and var_names[i] will be the name of the i-th variable which correspond to literals +(i + 1) or -(i + 1). This is optional and can be left empty.
repeated string var_names = 6;- Specified by:
getVarNamesin interfaceLinearBooleanProblemOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The varNames at the given index.
-
getVarNamesBytes
public com.google.protobuf.ByteString getVarNamesBytes(int index) The names of the problem variables. The variables index are 0-based and var_names[i] will be the name of the i-th variable which correspond to literals +(i + 1) or -(i + 1). This is optional and can be left empty.
repeated string var_names = 6;- Specified by:
getVarNamesBytesin interfaceLinearBooleanProblemOrBuilder- Parameters:
index- The index of the value to return.- Returns:
- The bytes of the varNames at the given index.
-
hasAssignment
public boolean hasAssignment()Stores an assignment of the problem variables. That may be an initial feasible solution, just a partial assignment or the optimal solution.
optional .operations_research.sat.BooleanAssignment assignment = 7;- Specified by:
hasAssignmentin interfaceLinearBooleanProblemOrBuilder- Returns:
- Whether the assignment field is set.
-
getAssignment
Stores an assignment of the problem variables. That may be an initial feasible solution, just a partial assignment or the optimal solution.
optional .operations_research.sat.BooleanAssignment assignment = 7;- Specified by:
getAssignmentin interfaceLinearBooleanProblemOrBuilder- Returns:
- The assignment.
-
getAssignmentOrBuilder
Stores an assignment of the problem variables. That may be an initial feasible solution, just a partial assignment or the optimal solution.
optional .operations_research.sat.BooleanAssignment assignment = 7;- Specified by:
getAssignmentOrBuilderin interfaceLinearBooleanProblemOrBuilder
-
hasOriginalNumVariables
public boolean hasOriginalNumVariables()Hack: When converting a wcnf formulat to a LinearBooleanProblem, extra variables need to be created. This stores the number of variables in the original problem (which are in one to one correspondence with the first variables of this problem).
optional int32 original_num_variables = 8;- Specified by:
hasOriginalNumVariablesin interfaceLinearBooleanProblemOrBuilder- Returns:
- Whether the originalNumVariables field is set.
-
getOriginalNumVariables
public int getOriginalNumVariables()Hack: When converting a wcnf formulat to a LinearBooleanProblem, extra variables need to be created. This stores the number of variables in the original problem (which are in one to one correspondence with the first variables of this problem).
optional int32 original_num_variables = 8;- Specified by:
getOriginalNumVariablesin interfaceLinearBooleanProblemOrBuilder- Returns:
- The originalNumVariables.
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage
-
writeTo
- Specified by:
writeToin interfacecom.google.protobuf.MessageLite- Overrides:
writeToin classcom.google.protobuf.GeneratedMessage- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()- Specified by:
getSerializedSizein interfacecom.google.protobuf.MessageLite- Overrides:
getSerializedSizein classcom.google.protobuf.GeneratedMessage
-
equals
- Specified by:
equalsin interfacecom.google.protobuf.Message- Overrides:
equalsin classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()- Specified by:
hashCodein interfacecom.google.protobuf.Message- Overrides:
hashCodein classcom.google.protobuf.AbstractMessage
-
parseFrom
public static LinearBooleanProblem parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static LinearBooleanProblem parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static LinearBooleanProblem parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static LinearBooleanProblem parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static LinearBooleanProblem parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static LinearBooleanProblem parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
- Throws:
IOException
-
parseFrom
public static LinearBooleanProblem parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseDelimitedFrom
- Throws:
IOException
-
parseDelimitedFrom
public static LinearBooleanProblem parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseFrom
public static LinearBooleanProblem parseFrom(com.google.protobuf.CodedInputStream input) throws IOException - Throws:
IOException
-
parseFrom
public static LinearBooleanProblem parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
newBuilderForType
- Specified by:
newBuilderForTypein interfacecom.google.protobuf.Message- Specified by:
newBuilderForTypein interfacecom.google.protobuf.MessageLite
-
newBuilder
-
newBuilder
-
toBuilder
- Specified by:
toBuilderin interfacecom.google.protobuf.Message- Specified by:
toBuilderin interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected LinearBooleanProblem.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent) - Overrides:
newBuilderForTypein classcom.google.protobuf.AbstractMessage
-
getDefaultInstance
-
parser
-
getParserForType
- Specified by:
getParserForTypein interfacecom.google.protobuf.Message- Specified by:
getParserForTypein interfacecom.google.protobuf.MessageLite- Overrides:
getParserForTypein classcom.google.protobuf.GeneratedMessage
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-