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 class
A 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.BuilderParent
Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessageLite.InternalOneOfEnum
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
static final int
static final int
static final int
static final int
static final int
static final int
Fields inherited from class com.google.protobuf.GeneratedMessage
alwaysUseFieldBuilders, unknownFields
Fields inherited from class com.google.protobuf.AbstractMessage
memoizedSize
Fields inherited from class com.google.protobuf.AbstractMessageLite
memoizedHashCode
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Stores an assignment of the problem variables.Stores an assignment of the problem variables.getConstraints
(int index) The constraints of the problem.int
The 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 LinearBooleanProblem
static final com.google.protobuf.Descriptors.Descriptor
getName()
The name of the problem.com.google.protobuf.ByteString
The name of the problem.int
The number of variables in the problem.The objective of the problem.The objective of the problem.int
Hack: When converting a wcnf formulat to a LinearBooleanProblem, extra variables need to be created.com.google.protobuf.Parser
<LinearBooleanProblem> int
getVarNames
(int index) The names of the problem variables.com.google.protobuf.ByteString
getVarNamesBytes
(int index) The names of the problem variables.int
The names of the problem variables.com.google.protobuf.ProtocolStringList
The names of the problem variables.boolean
Stores an assignment of the problem variables.int
hashCode()
boolean
hasName()
The name of the problem.boolean
The number of variables in the problem.boolean
The objective of the problem.boolean
Hack: When converting a wcnf formulat to a LinearBooleanProblem, extra variables need to be created.protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
final boolean
static LinearBooleanProblem.Builder
static LinearBooleanProblem.Builder
newBuilder
(LinearBooleanProblem prototype) protected LinearBooleanProblem.Builder
newBuilderForType
(com.google.protobuf.AbstractMessage.BuilderParent parent) static LinearBooleanProblem
parseDelimitedFrom
(InputStream input) static LinearBooleanProblem
parseDelimitedFrom
(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static LinearBooleanProblem
parseFrom
(byte[] data) static LinearBooleanProblem
parseFrom
(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static LinearBooleanProblem
parseFrom
(com.google.protobuf.ByteString data) static LinearBooleanProblem
parseFrom
(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static LinearBooleanProblem
parseFrom
(com.google.protobuf.CodedInputStream input) static LinearBooleanProblem
parseFrom
(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static LinearBooleanProblem
parseFrom
(InputStream input) static LinearBooleanProblem
parseFrom
(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static LinearBooleanProblem
parseFrom
(ByteBuffer data) static LinearBooleanProblem
parseFrom
(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static com.google.protobuf.Parser
<LinearBooleanProblem> parser()
void
writeTo
(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, writeStringNoTag
Methods inherited from class com.google.protobuf.AbstractMessage
findInitializationErrors, getInitializationErrorString, hashFields, toString
Methods inherited from class com.google.protobuf.AbstractMessageLite
addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.google.protobuf.MessageLite
toByteArray, toByteString, writeDelimitedTo, writeTo
Methods 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:
internalGetFieldAccessorTable
in classcom.google.protobuf.GeneratedMessage
-
hasName
public boolean hasName()The name of the problem.
optional string name = 1 [default = ""];
- Specified by:
hasName
in interfaceLinearBooleanProblemOrBuilder
- Returns:
- Whether the name field is set.
-
getName
The name of the problem.
optional string name = 1 [default = ""];
- Specified by:
getName
in interfaceLinearBooleanProblemOrBuilder
- Returns:
- The name.
-
getNameBytes
public com.google.protobuf.ByteString getNameBytes()The name of the problem.
optional string name = 1 [default = ""];
- Specified by:
getNameBytes
in 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:
hasNumVariables
in 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:
getNumVariables
in interfaceLinearBooleanProblemOrBuilder
- Returns:
- The numVariables.
-
getConstraintsList
The constraints of the problem.
repeated .operations_research.sat.LinearBooleanConstraint constraints = 4;
- Specified by:
getConstraintsList
in interfaceLinearBooleanProblemOrBuilder
-
getConstraintsOrBuilderList
The constraints of the problem.
repeated .operations_research.sat.LinearBooleanConstraint constraints = 4;
- Specified by:
getConstraintsOrBuilderList
in interfaceLinearBooleanProblemOrBuilder
-
getConstraintsCount
public int getConstraintsCount()The constraints of the problem.
repeated .operations_research.sat.LinearBooleanConstraint constraints = 4;
- Specified by:
getConstraintsCount
in interfaceLinearBooleanProblemOrBuilder
-
getConstraints
The constraints of the problem.
repeated .operations_research.sat.LinearBooleanConstraint constraints = 4;
- Specified by:
getConstraints
in interfaceLinearBooleanProblemOrBuilder
-
getConstraintsOrBuilder
The constraints of the problem.
repeated .operations_research.sat.LinearBooleanConstraint constraints = 4;
- Specified by:
getConstraintsOrBuilder
in 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:
hasObjective
in 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:
getObjective
in 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:
getObjectiveOrBuilder
in 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:
getVarNamesList
in 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:
getVarNamesCount
in 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:
getVarNames
in 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:
getVarNamesBytes
in 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:
hasAssignment
in 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:
getAssignment
in 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:
getAssignmentOrBuilder
in 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:
hasOriginalNumVariables
in 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:
getOriginalNumVariables
in interfaceLinearBooleanProblemOrBuilder
- Returns:
- The originalNumVariables.
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitialized
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in classcom.google.protobuf.GeneratedMessage
-
writeTo
- Specified by:
writeTo
in interfacecom.google.protobuf.MessageLite
- Overrides:
writeTo
in classcom.google.protobuf.GeneratedMessage
- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()- Specified by:
getSerializedSize
in interfacecom.google.protobuf.MessageLite
- Overrides:
getSerializedSize
in classcom.google.protobuf.GeneratedMessage
-
equals
- Specified by:
equals
in interfacecom.google.protobuf.Message
- Overrides:
equals
in classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()- Specified by:
hashCode
in interfacecom.google.protobuf.Message
- Overrides:
hashCode
in 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:
newBuilderForType
in interfacecom.google.protobuf.Message
- Specified by:
newBuilderForType
in interfacecom.google.protobuf.MessageLite
-
newBuilder
-
newBuilder
-
toBuilder
- Specified by:
toBuilder
in interfacecom.google.protobuf.Message
- Specified by:
toBuilder
in interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected LinearBooleanProblem.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent) - Overrides:
newBuilderForType
in classcom.google.protobuf.AbstractMessage
-
getDefaultInstance
-
parser
-
getParserForType
- Specified by:
getParserForType
in interfacecom.google.protobuf.Message
- Specified by:
getParserForType
in interfacecom.google.protobuf.MessageLite
- Overrides:
getParserForType
in classcom.google.protobuf.GeneratedMessage
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-