Google OR-Tools v9.9
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
com.google.ortools.sat.LinearBooleanProblem.Builder Class Reference
Inheritance diagram for com.google.ortools.sat.LinearBooleanProblem.Builder:
com.google.ortools.sat.LinearBooleanProblemOrBuilder

Public Member Functions

Builder clear ()
 
com.google.protobuf.Descriptors.Descriptor getDescriptorForType ()
 
com.google.ortools.sat.LinearBooleanProblem getDefaultInstanceForType ()
 
com.google.ortools.sat.LinearBooleanProblem build ()
 
com.google.ortools.sat.LinearBooleanProblem buildPartial ()
 
Builder clone ()
 
Builder setField (com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)
 
Builder clearField (com.google.protobuf.Descriptors.FieldDescriptor field)
 
Builder clearOneof (com.google.protobuf.Descriptors.OneofDescriptor oneof)
 
Builder setRepeatedField (com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)
 
Builder addRepeatedField (com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)
 
Builder mergeFrom (com.google.protobuf.Message other)
 
Builder mergeFrom (com.google.ortools.sat.LinearBooleanProblem other)
 
final boolean isInitialized ()
 
Builder mergeFrom (com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
 
boolean hasName ()
 
java.lang.String getName ()
 
com.google.protobuf.ByteString getNameBytes ()
 
Builder setName (java.lang.String value)
 
Builder clearName ()
 
Builder setNameBytes (com.google.protobuf.ByteString value)
 
boolean hasNumVariables ()
 
int getNumVariables ()
 
Builder setNumVariables (int value)
 
Builder clearNumVariables ()
 
java.util.List< com.google.ortools.sat.LinearBooleanConstraintgetConstraintsList ()
 
int getConstraintsCount ()
 
com.google.ortools.sat.LinearBooleanConstraint getConstraints (int index)
 
Builder setConstraints (int index, com.google.ortools.sat.LinearBooleanConstraint value)
 
Builder setConstraints (int index, com.google.ortools.sat.LinearBooleanConstraint.Builder builderForValue)
 
Builder addConstraints (com.google.ortools.sat.LinearBooleanConstraint value)
 
Builder addConstraints (int index, com.google.ortools.sat.LinearBooleanConstraint value)
 
Builder addConstraints (com.google.ortools.sat.LinearBooleanConstraint.Builder builderForValue)
 
Builder addConstraints (int index, com.google.ortools.sat.LinearBooleanConstraint.Builder builderForValue)
 
Builder addAllConstraints (java.lang.Iterable<? extends com.google.ortools.sat.LinearBooleanConstraint > values)
 
Builder clearConstraints ()
 
Builder removeConstraints (int index)
 
com.google.ortools.sat.LinearBooleanConstraint.Builder getConstraintsBuilder (int index)
 
com.google.ortools.sat.LinearBooleanConstraintOrBuilder getConstraintsOrBuilder (int index)
 
java.util.List<? extends com.google.ortools.sat.LinearBooleanConstraintOrBuildergetConstraintsOrBuilderList ()
 
com.google.ortools.sat.LinearBooleanConstraint.Builder addConstraintsBuilder ()
 
com.google.ortools.sat.LinearBooleanConstraint.Builder addConstraintsBuilder (int index)
 
java.util.List< com.google.ortools.sat.LinearBooleanConstraint.BuildergetConstraintsBuilderList ()
 
boolean hasObjective ()
 
com.google.ortools.sat.LinearObjective getObjective ()
 
Builder setObjective (com.google.ortools.sat.LinearObjective value)
 
Builder setObjective (com.google.ortools.sat.LinearObjective.Builder builderForValue)
 
Builder mergeObjective (com.google.ortools.sat.LinearObjective value)
 
Builder clearObjective ()
 
com.google.ortools.sat.LinearObjective.Builder getObjectiveBuilder ()
 
com.google.ortools.sat.LinearObjectiveOrBuilder getObjectiveOrBuilder ()
 
com.google.protobuf.ProtocolStringList getVarNamesList ()
 
int getVarNamesCount ()
 
java.lang.String getVarNames (int index)
 
com.google.protobuf.ByteString getVarNamesBytes (int index)
 
Builder setVarNames (int index, java.lang.String value)
 
Builder addVarNames (java.lang.String value)
 
Builder addAllVarNames (java.lang.Iterable< java.lang.String > values)
 
Builder clearVarNames ()
 
Builder addVarNamesBytes (com.google.protobuf.ByteString value)
 
boolean hasAssignment ()
 
com.google.ortools.sat.BooleanAssignment getAssignment ()
 
Builder setAssignment (com.google.ortools.sat.BooleanAssignment value)
 
Builder setAssignment (com.google.ortools.sat.BooleanAssignment.Builder builderForValue)
 
Builder mergeAssignment (com.google.ortools.sat.BooleanAssignment value)
 
Builder clearAssignment ()
 
com.google.ortools.sat.BooleanAssignment.Builder getAssignmentBuilder ()
 
com.google.ortools.sat.BooleanAssignmentOrBuilder getAssignmentOrBuilder ()
 
boolean hasOriginalNumVariables ()
 
int getOriginalNumVariables ()
 
Builder setOriginalNumVariables (int value)
 
Builder clearOriginalNumVariables ()
 
final Builder setUnknownFields (final com.google.protobuf.UnknownFieldSet unknownFields)
 
final Builder mergeUnknownFields (final com.google.protobuf.UnknownFieldSet unknownFields)
 

Static Public Member Functions

static final com.google.protobuf.Descriptors.Descriptor getDescriptor ()
 

Protected Member Functions

com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable ()
 

Detailed Description

A linear Boolean problem.

Protobuf type operations_research.sat.LinearBooleanProblem

Definition at line 642 of file LinearBooleanProblem.java.

Member Function Documentation

◆ addAllConstraints()

Builder com.google.ortools.sat.LinearBooleanProblem.Builder.addAllConstraints ( java.lang.Iterable<? extends com.google.ortools.sat.LinearBooleanConstraint > values)
The constraints of the problem.

repeated .operations_research.sat.LinearBooleanConstraint constraints = 4;

Definition at line 1314 of file LinearBooleanProblem.java.

◆ addAllVarNames()

Builder com.google.ortools.sat.LinearBooleanProblem.Builder.addAllVarNames ( java.lang.Iterable< java.lang.String > values)
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;

Parameters
valuesThe varNames to add.
Returns
This builder for chaining.

Definition at line 1732 of file LinearBooleanProblem.java.

◆ addConstraints() [1/4]

Builder com.google.ortools.sat.LinearBooleanProblem.Builder.addConstraints ( com.google.ortools.sat.LinearBooleanConstraint value)
The constraints of the problem.

repeated .operations_research.sat.LinearBooleanConstraint constraints = 4;

Definition at line 1237 of file LinearBooleanProblem.java.

◆ addConstraints() [2/4]

Builder com.google.ortools.sat.LinearBooleanProblem.Builder.addConstraints ( com.google.ortools.sat.LinearBooleanConstraint.Builder builderForValue)
The constraints of the problem.

repeated .operations_research.sat.LinearBooleanConstraint constraints = 4;

Definition at line 1278 of file LinearBooleanProblem.java.

◆ addConstraints() [3/4]

Builder com.google.ortools.sat.LinearBooleanProblem.Builder.addConstraints ( int index,
com.google.ortools.sat.LinearBooleanConstraint value )
The constraints of the problem.

repeated .operations_research.sat.LinearBooleanConstraint constraints = 4;

Definition at line 1257 of file LinearBooleanProblem.java.

◆ addConstraints() [4/4]

Builder com.google.ortools.sat.LinearBooleanProblem.Builder.addConstraints ( int index,
com.google.ortools.sat.LinearBooleanConstraint.Builder builderForValue )
The constraints of the problem.

repeated .operations_research.sat.LinearBooleanConstraint constraints = 4;

Definition at line 1296 of file LinearBooleanProblem.java.

◆ addConstraintsBuilder() [1/2]

com.google.ortools.sat.LinearBooleanConstraint.Builder com.google.ortools.sat.LinearBooleanProblem.Builder.addConstraintsBuilder ( )
The constraints of the problem.

repeated .operations_research.sat.LinearBooleanConstraint constraints = 4;

Definition at line 1407 of file LinearBooleanProblem.java.

◆ addConstraintsBuilder() [2/2]

com.google.ortools.sat.LinearBooleanConstraint.Builder com.google.ortools.sat.LinearBooleanProblem.Builder.addConstraintsBuilder ( int index)
The constraints of the problem.

repeated .operations_research.sat.LinearBooleanConstraint constraints = 4;

Definition at line 1418 of file LinearBooleanProblem.java.

◆ addRepeatedField()

Builder com.google.ortools.sat.LinearBooleanProblem.Builder.addRepeatedField ( com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value )

Definition at line 808 of file LinearBooleanProblem.java.

◆ addVarNames()

Builder com.google.ortools.sat.LinearBooleanProblem.Builder.addVarNames ( java.lang.String value)
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;

Parameters
valueThe varNames to add.
Returns
This builder for chaining.

Definition at line 1712 of file LinearBooleanProblem.java.

◆ addVarNamesBytes()

Builder com.google.ortools.sat.LinearBooleanProblem.Builder.addVarNamesBytes ( com.google.protobuf.ByteString value)
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;

Parameters
valueThe bytes of the varNames to add.
Returns
This builder for chaining.

Definition at line 1769 of file LinearBooleanProblem.java.

◆ build()

com.google.ortools.sat.LinearBooleanProblem com.google.ortools.sat.LinearBooleanProblem.Builder.build ( )

Definition at line 718 of file LinearBooleanProblem.java.

◆ buildPartial()

com.google.ortools.sat.LinearBooleanProblem com.google.ortools.sat.LinearBooleanProblem.Builder.buildPartial ( )

Definition at line 727 of file LinearBooleanProblem.java.

◆ clear()

Builder com.google.ortools.sat.LinearBooleanProblem.Builder.clear ( )

Definition at line 678 of file LinearBooleanProblem.java.

◆ clearAssignment()

Builder com.google.ortools.sat.LinearBooleanProblem.Builder.clearAssignment ( )
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;

Definition at line 1884 of file LinearBooleanProblem.java.

◆ clearConstraints()

Builder com.google.ortools.sat.LinearBooleanProblem.Builder.clearConstraints ( )
The constraints of the problem.

repeated .operations_research.sat.LinearBooleanConstraint constraints = 4;

Definition at line 1333 of file LinearBooleanProblem.java.

◆ clearField()

Builder com.google.ortools.sat.LinearBooleanProblem.Builder.clearField ( com.google.protobuf.Descriptors.FieldDescriptor field)

Definition at line 792 of file LinearBooleanProblem.java.

◆ clearName()

Builder com.google.ortools.sat.LinearBooleanProblem.Builder.clearName ( )
The name of the problem.

optional string name = 1 [default = ""];

Returns
This builder for chaining.

Definition at line 1049 of file LinearBooleanProblem.java.

◆ clearNumVariables()

Builder com.google.ortools.sat.LinearBooleanProblem.Builder.clearNumVariables ( )
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;

Returns
This builder for chaining.

Definition at line 1130 of file LinearBooleanProblem.java.

◆ clearObjective()

Builder com.google.ortools.sat.LinearBooleanProblem.Builder.clearObjective ( )
The objective of the problem.
If left empty, we just have a satisfiability problem.

optional .operations_research.sat.LinearObjective objective = 5;

Definition at line 1554 of file LinearBooleanProblem.java.

◆ clearOneof()

Builder com.google.ortools.sat.LinearBooleanProblem.Builder.clearOneof ( com.google.protobuf.Descriptors.OneofDescriptor oneof)

Definition at line 797 of file LinearBooleanProblem.java.

◆ clearOriginalNumVariables()

Builder com.google.ortools.sat.LinearBooleanProblem.Builder.clearOriginalNumVariables ( )
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;

Returns
This builder for chaining.

Definition at line 2006 of file LinearBooleanProblem.java.

◆ clearVarNames()

Builder com.google.ortools.sat.LinearBooleanProblem.Builder.clearVarNames ( )
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;

Returns
This builder for chaining.

Definition at line 1751 of file LinearBooleanProblem.java.

◆ clone()

Builder com.google.ortools.sat.LinearBooleanProblem.Builder.clone ( )

Definition at line 782 of file LinearBooleanProblem.java.

◆ getAssignment()

com.google.ortools.sat.BooleanAssignment com.google.ortools.sat.LinearBooleanProblem.Builder.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;

Returns
The assignment.

Implements com.google.ortools.sat.LinearBooleanProblemOrBuilder.

Definition at line 1803 of file LinearBooleanProblem.java.

◆ getAssignmentBuilder()

com.google.ortools.sat.BooleanAssignment.Builder com.google.ortools.sat.LinearBooleanProblem.Builder.getAssignmentBuilder ( )
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;

Definition at line 1902 of file LinearBooleanProblem.java.

◆ getAssignmentOrBuilder()

com.google.ortools.sat.BooleanAssignmentOrBuilder com.google.ortools.sat.LinearBooleanProblem.Builder.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;

Implements com.google.ortools.sat.LinearBooleanProblemOrBuilder.

Definition at line 1915 of file LinearBooleanProblem.java.

◆ getConstraints()

com.google.ortools.sat.LinearBooleanConstraint com.google.ortools.sat.LinearBooleanProblem.Builder.getConstraints ( int index)
The constraints of the problem.

repeated .operations_research.sat.LinearBooleanConstraint constraints = 4;

Implements com.google.ortools.sat.LinearBooleanProblemOrBuilder.

Definition at line 1184 of file LinearBooleanProblem.java.

◆ getConstraintsBuilder()

com.google.ortools.sat.LinearBooleanConstraint.Builder com.google.ortools.sat.LinearBooleanProblem.Builder.getConstraintsBuilder ( int index)
The constraints of the problem.

repeated .operations_research.sat.LinearBooleanConstraint constraints = 4;

Definition at line 1367 of file LinearBooleanProblem.java.

◆ getConstraintsBuilderList()

java.util.List< com.google.ortools.sat.LinearBooleanConstraint.Builder > com.google.ortools.sat.LinearBooleanProblem.Builder.getConstraintsBuilderList ( )
The constraints of the problem.

repeated .operations_research.sat.LinearBooleanConstraint constraints = 4;

Definition at line 1431 of file LinearBooleanProblem.java.

◆ getConstraintsCount()

int com.google.ortools.sat.LinearBooleanProblem.Builder.getConstraintsCount ( )
The constraints of the problem.

repeated .operations_research.sat.LinearBooleanConstraint constraints = 4;

Implements com.google.ortools.sat.LinearBooleanProblemOrBuilder.

Definition at line 1170 of file LinearBooleanProblem.java.

◆ getConstraintsList()

java.util.List< com.google.ortools.sat.LinearBooleanConstraint > com.google.ortools.sat.LinearBooleanProblem.Builder.getConstraintsList ( )
The constraints of the problem.

repeated .operations_research.sat.LinearBooleanConstraint constraints = 4;

Implements com.google.ortools.sat.LinearBooleanProblemOrBuilder.

Definition at line 1156 of file LinearBooleanProblem.java.

◆ getConstraintsOrBuilder()

com.google.ortools.sat.LinearBooleanConstraintOrBuilder com.google.ortools.sat.LinearBooleanProblem.Builder.getConstraintsOrBuilder ( int index)
The constraints of the problem.

repeated .operations_research.sat.LinearBooleanConstraint constraints = 4;

Implements com.google.ortools.sat.LinearBooleanProblemOrBuilder.

Definition at line 1378 of file LinearBooleanProblem.java.

◆ getConstraintsOrBuilderList()

java.util.List<? extends com.google.ortools.sat.LinearBooleanConstraintOrBuilder > com.google.ortools.sat.LinearBooleanProblem.Builder.getConstraintsOrBuilderList ( )
The constraints of the problem.

repeated .operations_research.sat.LinearBooleanConstraint constraints = 4;

Implements com.google.ortools.sat.LinearBooleanProblemOrBuilder.

Definition at line 1393 of file LinearBooleanProblem.java.

◆ getDefaultInstanceForType()

com.google.ortools.sat.LinearBooleanProblem com.google.ortools.sat.LinearBooleanProblem.Builder.getDefaultInstanceForType ( )

Definition at line 713 of file LinearBooleanProblem.java.

◆ getDescriptor()

static final com.google.protobuf.Descriptors.Descriptor com.google.ortools.sat.LinearBooleanProblem.Builder.getDescriptor ( )
static

Definition at line 647 of file LinearBooleanProblem.java.

◆ getDescriptorForType()

com.google.protobuf.Descriptors.Descriptor com.google.ortools.sat.LinearBooleanProblem.Builder.getDescriptorForType ( )

Definition at line 708 of file LinearBooleanProblem.java.

◆ getName()

java.lang.String com.google.ortools.sat.LinearBooleanProblem.Builder.getName ( )
The name of the problem.

optional string name = 1 [default = ""];

Returns
The name.

Implements com.google.ortools.sat.LinearBooleanProblemOrBuilder.

Definition at line 989 of file LinearBooleanProblem.java.

◆ getNameBytes()

com.google.protobuf.ByteString com.google.ortools.sat.LinearBooleanProblem.Builder.getNameBytes ( )
The name of the problem.

optional string name = 1 [default = ""];

Returns
The bytes for name.

Implements com.google.ortools.sat.LinearBooleanProblemOrBuilder.

Definition at line 1012 of file LinearBooleanProblem.java.

◆ getNumVariables()

int com.google.ortools.sat.LinearBooleanProblem.Builder.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;

Returns
The numVariables.

Implements com.google.ortools.sat.LinearBooleanProblemOrBuilder.

Definition at line 1099 of file LinearBooleanProblem.java.

◆ getObjective()

com.google.ortools.sat.LinearObjective com.google.ortools.sat.LinearBooleanProblem.Builder.getObjective ( )
The objective of the problem.
If left empty, we just have a satisfiability problem.

optional .operations_research.sat.LinearObjective objective = 5;

Returns
The objective.

Implements com.google.ortools.sat.LinearBooleanProblemOrBuilder.

Definition at line 1473 of file LinearBooleanProblem.java.

◆ getObjectiveBuilder()

com.google.ortools.sat.LinearObjective.Builder com.google.ortools.sat.LinearBooleanProblem.Builder.getObjectiveBuilder ( )
The objective of the problem.
If left empty, we just have a satisfiability problem.

optional .operations_research.sat.LinearObjective objective = 5;

Definition at line 1572 of file LinearBooleanProblem.java.

◆ getObjectiveOrBuilder()

com.google.ortools.sat.LinearObjectiveOrBuilder com.google.ortools.sat.LinearBooleanProblem.Builder.getObjectiveOrBuilder ( )
The objective of the problem.
If left empty, we just have a satisfiability problem.

optional .operations_research.sat.LinearObjective objective = 5;

Implements com.google.ortools.sat.LinearBooleanProblemOrBuilder.

Definition at line 1585 of file LinearBooleanProblem.java.

◆ getOriginalNumVariables()

int com.google.ortools.sat.LinearBooleanProblem.Builder.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;

Returns
The originalNumVariables.

Implements com.google.ortools.sat.LinearBooleanProblemOrBuilder.

Definition at line 1973 of file LinearBooleanProblem.java.

◆ getVarNames()

java.lang.String com.google.ortools.sat.LinearBooleanProblem.Builder.getVarNames ( 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;

Parameters
indexThe index of the element to return.
Returns
The varNames at the given index.

Implements com.google.ortools.sat.LinearBooleanProblemOrBuilder.

Definition at line 1662 of file LinearBooleanProblem.java.

◆ getVarNamesBytes()

com.google.protobuf.ByteString com.google.ortools.sat.LinearBooleanProblem.Builder.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;

Parameters
indexThe index of the value to return.
Returns
The bytes of the varNames at the given index.

Implements com.google.ortools.sat.LinearBooleanProblemOrBuilder.

Definition at line 1677 of file LinearBooleanProblem.java.

◆ getVarNamesCount()

int com.google.ortools.sat.LinearBooleanProblem.Builder.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;

Returns
The count of varNames.

Implements com.google.ortools.sat.LinearBooleanProblemOrBuilder.

Definition at line 1648 of file LinearBooleanProblem.java.

◆ getVarNamesList()

com.google.protobuf.ProtocolStringList com.google.ortools.sat.LinearBooleanProblem.Builder.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;

Returns
A list containing the varNames.

Implements com.google.ortools.sat.LinearBooleanProblemOrBuilder.

Definition at line 1634 of file LinearBooleanProblem.java.

◆ hasAssignment()

boolean com.google.ortools.sat.LinearBooleanProblem.Builder.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;

Returns
Whether the assignment field is set.

Implements com.google.ortools.sat.LinearBooleanProblemOrBuilder.

Definition at line 1791 of file LinearBooleanProblem.java.

◆ hasName()

boolean com.google.ortools.sat.LinearBooleanProblem.Builder.hasName ( )
The name of the problem.

optional string name = 1 [default = ""];

Returns
Whether the name field is set.

Implements com.google.ortools.sat.LinearBooleanProblemOrBuilder.

Definition at line 978 of file LinearBooleanProblem.java.

◆ hasNumVariables()

boolean com.google.ortools.sat.LinearBooleanProblem.Builder.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;

Returns
Whether the numVariables field is set.

Implements com.google.ortools.sat.LinearBooleanProblemOrBuilder.

Definition at line 1085 of file LinearBooleanProblem.java.

◆ hasObjective()

boolean com.google.ortools.sat.LinearBooleanProblem.Builder.hasObjective ( )
The objective of the problem.
If left empty, we just have a satisfiability problem.

optional .operations_research.sat.LinearObjective objective = 5;

Returns
Whether the objective field is set.

Implements com.google.ortools.sat.LinearBooleanProblemOrBuilder.

Definition at line 1461 of file LinearBooleanProblem.java.

◆ hasOriginalNumVariables()

boolean com.google.ortools.sat.LinearBooleanProblem.Builder.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;

Returns
Whether the originalNumVariables field is set.

Implements com.google.ortools.sat.LinearBooleanProblemOrBuilder.

Definition at line 1958 of file LinearBooleanProblem.java.

◆ internalGetFieldAccessorTable()

com.google.protobuf.GeneratedMessageV3.FieldAccessorTable com.google.ortools.sat.LinearBooleanProblem.Builder.internalGetFieldAccessorTable ( )
protected

Definition at line 653 of file LinearBooleanProblem.java.

◆ isInitialized()

final boolean com.google.ortools.sat.LinearBooleanProblem.Builder.isInitialized ( )

Definition at line 884 of file LinearBooleanProblem.java.

◆ mergeAssignment()

Builder com.google.ortools.sat.LinearBooleanProblem.Builder.mergeAssignment ( com.google.ortools.sat.BooleanAssignment value)
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;

Definition at line 1858 of file LinearBooleanProblem.java.

◆ mergeFrom() [1/3]

Builder com.google.ortools.sat.LinearBooleanProblem.Builder.mergeFrom ( com.google.ortools.sat.LinearBooleanProblem other)

Definition at line 823 of file LinearBooleanProblem.java.

◆ mergeFrom() [2/3]

Builder com.google.ortools.sat.LinearBooleanProblem.Builder.mergeFrom ( com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry ) throws java.io.IOException

Definition at line 889 of file LinearBooleanProblem.java.

◆ mergeFrom() [3/3]

Builder com.google.ortools.sat.LinearBooleanProblem.Builder.mergeFrom ( com.google.protobuf.Message other)

Definition at line 814 of file LinearBooleanProblem.java.

◆ mergeObjective()

Builder com.google.ortools.sat.LinearBooleanProblem.Builder.mergeObjective ( com.google.ortools.sat.LinearObjective value)
The objective of the problem.
If left empty, we just have a satisfiability problem.

optional .operations_research.sat.LinearObjective objective = 5;

Definition at line 1528 of file LinearBooleanProblem.java.

◆ mergeUnknownFields()

final Builder com.google.ortools.sat.LinearBooleanProblem.Builder.mergeUnknownFields ( final com.google.protobuf.UnknownFieldSet unknownFields)

Definition at line 2019 of file LinearBooleanProblem.java.

◆ removeConstraints()

Builder com.google.ortools.sat.LinearBooleanProblem.Builder.removeConstraints ( int index)
The constraints of the problem.

repeated .operations_research.sat.LinearBooleanConstraint constraints = 4;

Definition at line 1350 of file LinearBooleanProblem.java.

◆ setAssignment() [1/2]

Builder com.google.ortools.sat.LinearBooleanProblem.Builder.setAssignment ( com.google.ortools.sat.BooleanAssignment value)
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;

Definition at line 1818 of file LinearBooleanProblem.java.

◆ setAssignment() [2/2]

Builder com.google.ortools.sat.LinearBooleanProblem.Builder.setAssignment ( com.google.ortools.sat.BooleanAssignment.Builder builderForValue)
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;

Definition at line 1839 of file LinearBooleanProblem.java.

◆ setConstraints() [1/2]

Builder com.google.ortools.sat.LinearBooleanProblem.Builder.setConstraints ( int index,
com.google.ortools.sat.LinearBooleanConstraint value )
The constraints of the problem.

repeated .operations_research.sat.LinearBooleanConstraint constraints = 4;

Definition at line 1198 of file LinearBooleanProblem.java.

◆ setConstraints() [2/2]

Builder com.google.ortools.sat.LinearBooleanProblem.Builder.setConstraints ( int index,
com.google.ortools.sat.LinearBooleanConstraint.Builder builderForValue )
The constraints of the problem.

repeated .operations_research.sat.LinearBooleanConstraint constraints = 4;

Definition at line 1219 of file LinearBooleanProblem.java.

◆ setField()

Builder com.google.ortools.sat.LinearBooleanProblem.Builder.setField ( com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value )

Definition at line 786 of file LinearBooleanProblem.java.

◆ setName()

Builder com.google.ortools.sat.LinearBooleanProblem.Builder.setName ( java.lang.String value)
The name of the problem.

optional string name = 1 [default = ""];

Parameters
valueThe name to set.
Returns
This builder for chaining.

Definition at line 1033 of file LinearBooleanProblem.java.

◆ setNameBytes()

Builder com.google.ortools.sat.LinearBooleanProblem.Builder.setNameBytes ( com.google.protobuf.ByteString value)
The name of the problem.

optional string name = 1 [default = ""];

Parameters
valueThe bytes for name to set.
Returns
This builder for chaining.

Definition at line 1064 of file LinearBooleanProblem.java.

◆ setNumVariables()

Builder com.google.ortools.sat.LinearBooleanProblem.Builder.setNumVariables ( int value)
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;

Parameters
valueThe numVariables to set.
Returns
This builder for chaining.

Definition at line 1113 of file LinearBooleanProblem.java.

◆ setObjective() [1/2]

Builder com.google.ortools.sat.LinearBooleanProblem.Builder.setObjective ( com.google.ortools.sat.LinearObjective value)
The objective of the problem.
If left empty, we just have a satisfiability problem.

optional .operations_research.sat.LinearObjective objective = 5;

Definition at line 1488 of file LinearBooleanProblem.java.

◆ setObjective() [2/2]

Builder com.google.ortools.sat.LinearBooleanProblem.Builder.setObjective ( com.google.ortools.sat.LinearObjective.Builder builderForValue)
The objective of the problem.
If left empty, we just have a satisfiability problem.

optional .operations_research.sat.LinearObjective objective = 5;

Definition at line 1509 of file LinearBooleanProblem.java.

◆ setOriginalNumVariables()

Builder com.google.ortools.sat.LinearBooleanProblem.Builder.setOriginalNumVariables ( int value)
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;

Parameters
valueThe originalNumVariables to set.
Returns
This builder for chaining.

Definition at line 1988 of file LinearBooleanProblem.java.

◆ setRepeatedField()

Builder com.google.ortools.sat.LinearBooleanProblem.Builder.setRepeatedField ( com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
java.lang.Object value )

Definition at line 802 of file LinearBooleanProblem.java.

◆ setUnknownFields()

final Builder com.google.ortools.sat.LinearBooleanProblem.Builder.setUnknownFields ( final com.google.protobuf.UnknownFieldSet unknownFields)

Definition at line 2013 of file LinearBooleanProblem.java.

◆ setVarNames()

Builder com.google.ortools.sat.LinearBooleanProblem.Builder.setVarNames ( int index,
java.lang.String value )
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;

Parameters
indexThe index to set the value at.
valueThe varNames to set.
Returns
This builder for chaining.

Definition at line 1692 of file LinearBooleanProblem.java.


The documentation for this class was generated from the following file: