![]() |
Google OR-Tools v9.12
a fast and portable software suite for combinatorial optimization
|
Public Member Functions | |
Builder | clear () |
com.google.protobuf.Descriptors.Descriptor | getDescriptorForType () |
com.google.ortools.sat.LinearBooleanConstraint | getDefaultInstanceForType () |
com.google.ortools.sat.LinearBooleanConstraint | build () |
com.google.ortools.sat.LinearBooleanConstraint | buildPartial () |
Builder | mergeFrom (com.google.protobuf.Message other) |
Builder | mergeFrom (com.google.ortools.sat.LinearBooleanConstraint other) |
final boolean | isInitialized () |
Builder | mergeFrom (com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException |
java.util.List< java.lang.Integer > | getLiteralsList () |
int | getLiteralsCount () |
int | getLiterals (int index) |
Builder | setLiterals (int index, int value) |
Builder | addLiterals (int value) |
Builder | addAllLiterals (java.lang.Iterable<? extends java.lang.Integer > values) |
Builder | clearLiterals () |
java.util.List< java.lang.Long > | getCoefficientsList () |
int | getCoefficientsCount () |
long | getCoefficients (int index) |
Builder | setCoefficients (int index, long value) |
Builder | addCoefficients (long value) |
Builder | addAllCoefficients (java.lang.Iterable<? extends java.lang.Long > values) |
Builder | clearCoefficients () |
boolean | hasLowerBound () |
long | getLowerBound () |
Builder | setLowerBound (long value) |
Builder | clearLowerBound () |
boolean | hasUpperBound () |
long | getUpperBound () |
Builder | setUpperBound (long value) |
Builder | clearUpperBound () |
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) |
Static Public Member Functions | |
static final com.google.protobuf.Descriptors.Descriptor | getDescriptor () |
Protected Member Functions | |
com.google.protobuf.GeneratedMessage.FieldAccessorTable | internalGetFieldAccessorTable () |
A linear Boolean constraint which is a bounded sum of linear terms. Each term beeing a literal times an integer coefficient. If we assume that a literal takes the value 1 if it is true and 0 otherwise, the constraint is: lower_bound <= ... + coefficients[i] * literals[i] + ... <= upper_bound
Protobuf type operations_research.sat.LinearBooleanConstraint
Definition at line 502 of file LinearBooleanConstraint.java.
Builder com.google.ortools.sat.LinearBooleanConstraint.Builder.addAllCoefficients | ( | java.lang.Iterable<? extends java.lang.Long > | values | ) |
repeated int64 coefficients = 2;
values | The coefficients to add. |
Definition at line 962 of file LinearBooleanConstraint.java.
Builder com.google.ortools.sat.LinearBooleanConstraint.Builder.addAllLiterals | ( | java.lang.Iterable<? extends java.lang.Integer > | values | ) |
Linear terms involved in this constraint. literals[i] is the signed representation of the i-th literal of the constraint and coefficients[i] its coefficients. The signed representation is as follow: for a 0-based variable index x, (x + 1) represents the variable x and -(x + 1) represents its negation. Note that the same variable shouldn't appear twice and that zero coefficients are not allowed.
repeated int32 literals = 1;
values | The literals to add. |
Definition at line 866 of file LinearBooleanConstraint.java.
Builder com.google.ortools.sat.LinearBooleanConstraint.Builder.addCoefficients | ( | long | value | ) |
repeated int64 coefficients = 2;
value | The coefficients to add. |
Definition at line 949 of file LinearBooleanConstraint.java.
Builder com.google.ortools.sat.LinearBooleanConstraint.Builder.addLiterals | ( | int | value | ) |
Linear terms involved in this constraint. literals[i] is the signed representation of the i-th literal of the constraint and coefficients[i] its coefficients. The signed representation is as follow: for a 0-based variable index x, (x + 1) represents the variable x and -(x + 1) represents its negation. Note that the same variable shouldn't appear twice and that zero coefficients are not allowed.
repeated int32 literals = 1;
value | The literals to add. |
Definition at line 841 of file LinearBooleanConstraint.java.
com.google.ortools.sat.LinearBooleanConstraint com.google.ortools.sat.LinearBooleanConstraint.Builder.build | ( | ) |
Definition at line 553 of file LinearBooleanConstraint.java.
com.google.ortools.sat.LinearBooleanConstraint com.google.ortools.sat.LinearBooleanConstraint.Builder.buildPartial | ( | ) |
Definition at line 562 of file LinearBooleanConstraint.java.
Builder com.google.ortools.sat.LinearBooleanConstraint.Builder.clear | ( | ) |
Definition at line 530 of file LinearBooleanConstraint.java.
Builder com.google.ortools.sat.LinearBooleanConstraint.Builder.clearCoefficients | ( | ) |
repeated int64 coefficients = 2;
Definition at line 975 of file LinearBooleanConstraint.java.
Builder com.google.ortools.sat.LinearBooleanConstraint.Builder.clearLiterals | ( | ) |
Linear terms involved in this constraint. literals[i] is the signed representation of the i-th literal of the constraint and coefficients[i] its coefficients. The signed representation is as follow: for a 0-based variable index x, (x + 1) represents the variable x and -(x + 1) represents its negation. Note that the same variable shouldn't appear twice and that zero coefficients are not allowed.
repeated int32 literals = 1;
Definition at line 891 of file LinearBooleanConstraint.java.
Builder com.google.ortools.sat.LinearBooleanConstraint.Builder.clearLowerBound | ( | ) |
Optional lower (resp. upper) bound of the constraint. If not present, it means that the constraint is not bounded in this direction. The bounds are INCLUSIVE.
optional int64 lower_bound = 3;
Definition at line 1039 of file LinearBooleanConstraint.java.
Builder com.google.ortools.sat.LinearBooleanConstraint.Builder.clearName | ( | ) |
The name of this constraint.
optional string name = 5 [default = ""];
Definition at line 1166 of file LinearBooleanConstraint.java.
Builder com.google.ortools.sat.LinearBooleanConstraint.Builder.clearUpperBound | ( | ) |
optional int64 upper_bound = 4;
Definition at line 1079 of file LinearBooleanConstraint.java.
long com.google.ortools.sat.LinearBooleanConstraint.Builder.getCoefficients | ( | int | index | ) |
repeated int64 coefficients = 2;
index | The index of the element to return. |
Implements com.google.ortools.sat.LinearBooleanConstraintOrBuilder.
Definition at line 926 of file LinearBooleanConstraint.java.
int com.google.ortools.sat.LinearBooleanConstraint.Builder.getCoefficientsCount | ( | ) |
repeated int64 coefficients = 2;
Implements com.google.ortools.sat.LinearBooleanConstraintOrBuilder.
Definition at line 918 of file LinearBooleanConstraint.java.
java.util.List< java.lang.Long > com.google.ortools.sat.LinearBooleanConstraint.Builder.getCoefficientsList | ( | ) |
repeated int64 coefficients = 2;
Implements com.google.ortools.sat.LinearBooleanConstraintOrBuilder.
Definition at line 910 of file LinearBooleanConstraint.java.
com.google.ortools.sat.LinearBooleanConstraint com.google.ortools.sat.LinearBooleanConstraint.Builder.getDefaultInstanceForType | ( | ) |
Definition at line 548 of file LinearBooleanConstraint.java.
|
static |
Definition at line 507 of file LinearBooleanConstraint.java.
com.google.protobuf.Descriptors.Descriptor com.google.ortools.sat.LinearBooleanConstraint.Builder.getDescriptorForType | ( | ) |
Definition at line 543 of file LinearBooleanConstraint.java.
int com.google.ortools.sat.LinearBooleanConstraint.Builder.getLiterals | ( | int | index | ) |
Linear terms involved in this constraint. literals[i] is the signed representation of the i-th literal of the constraint and coefficients[i] its coefficients. The signed representation is as follow: for a 0-based variable index x, (x + 1) represents the variable x and -(x + 1) represents its negation. Note that the same variable shouldn't appear twice and that zero coefficients are not allowed.
repeated int32 literals = 1;
index | The index of the element to return. |
Implements com.google.ortools.sat.LinearBooleanConstraintOrBuilder.
Definition at line 794 of file LinearBooleanConstraint.java.
int com.google.ortools.sat.LinearBooleanConstraint.Builder.getLiteralsCount | ( | ) |
Linear terms involved in this constraint. literals[i] is the signed representation of the i-th literal of the constraint and coefficients[i] its coefficients. The signed representation is as follow: for a 0-based variable index x, (x + 1) represents the variable x and -(x + 1) represents its negation. Note that the same variable shouldn't appear twice and that zero coefficients are not allowed.
repeated int32 literals = 1;
Implements com.google.ortools.sat.LinearBooleanConstraintOrBuilder.
Definition at line 774 of file LinearBooleanConstraint.java.
java.util.List< java.lang.Integer > com.google.ortools.sat.LinearBooleanConstraint.Builder.getLiteralsList | ( | ) |
Linear terms involved in this constraint. literals[i] is the signed representation of the i-th literal of the constraint and coefficients[i] its coefficients. The signed representation is as follow: for a 0-based variable index x, (x + 1) represents the variable x and -(x + 1) represents its negation. Note that the same variable shouldn't appear twice and that zero coefficients are not allowed.
repeated int32 literals = 1;
Implements com.google.ortools.sat.LinearBooleanConstraintOrBuilder.
Definition at line 754 of file LinearBooleanConstraint.java.
long com.google.ortools.sat.LinearBooleanConstraint.Builder.getLowerBound | ( | ) |
Optional lower (resp. upper) bound of the constraint. If not present, it means that the constraint is not bounded in this direction. The bounds are INCLUSIVE.
optional int64 lower_bound = 3;
Implements com.google.ortools.sat.LinearBooleanConstraintOrBuilder.
Definition at line 1008 of file LinearBooleanConstraint.java.
java.lang.String com.google.ortools.sat.LinearBooleanConstraint.Builder.getName | ( | ) |
The name of this constraint.
optional string name = 5 [default = ""];
Implements com.google.ortools.sat.LinearBooleanConstraintOrBuilder.
Definition at line 1106 of file LinearBooleanConstraint.java.
com.google.protobuf.ByteString com.google.ortools.sat.LinearBooleanConstraint.Builder.getNameBytes | ( | ) |
The name of this constraint.
optional string name = 5 [default = ""];
Implements com.google.ortools.sat.LinearBooleanConstraintOrBuilder.
Definition at line 1129 of file LinearBooleanConstraint.java.
long com.google.ortools.sat.LinearBooleanConstraint.Builder.getUpperBound | ( | ) |
optional int64 upper_bound = 4;
Implements com.google.ortools.sat.LinearBooleanConstraintOrBuilder.
Definition at line 1060 of file LinearBooleanConstraint.java.
boolean com.google.ortools.sat.LinearBooleanConstraint.Builder.hasLowerBound | ( | ) |
Optional lower (resp. upper) bound of the constraint. If not present, it means that the constraint is not bounded in this direction. The bounds are INCLUSIVE.
optional int64 lower_bound = 3;
Implements com.google.ortools.sat.LinearBooleanConstraintOrBuilder.
Definition at line 994 of file LinearBooleanConstraint.java.
boolean com.google.ortools.sat.LinearBooleanConstraint.Builder.hasName | ( | ) |
The name of this constraint.
optional string name = 5 [default = ""];
Implements com.google.ortools.sat.LinearBooleanConstraintOrBuilder.
Definition at line 1095 of file LinearBooleanConstraint.java.
boolean com.google.ortools.sat.LinearBooleanConstraint.Builder.hasUpperBound | ( | ) |
optional int64 upper_bound = 4;
Implements com.google.ortools.sat.LinearBooleanConstraintOrBuilder.
Definition at line 1052 of file LinearBooleanConstraint.java.
|
protected |
Definition at line 513 of file LinearBooleanConstraint.java.
final boolean com.google.ortools.sat.LinearBooleanConstraint.Builder.isInitialized | ( | ) |
Definition at line 646 of file LinearBooleanConstraint.java.
Builder com.google.ortools.sat.LinearBooleanConstraint.Builder.mergeFrom | ( | com.google.ortools.sat.LinearBooleanConstraint | other | ) |
Definition at line 605 of file LinearBooleanConstraint.java.
Builder com.google.ortools.sat.LinearBooleanConstraint.Builder.mergeFrom | ( | com.google.protobuf.CodedInputStream | input, |
com.google.protobuf.ExtensionRegistryLite | extensionRegistry ) throws java.io.IOException |
Definition at line 651 of file LinearBooleanConstraint.java.
Builder com.google.ortools.sat.LinearBooleanConstraint.Builder.mergeFrom | ( | com.google.protobuf.Message | other | ) |
Definition at line 596 of file LinearBooleanConstraint.java.
Builder com.google.ortools.sat.LinearBooleanConstraint.Builder.setCoefficients | ( | int | index, |
long | value ) |
repeated int64 coefficients = 2;
index | The index to set the value at. |
value | The coefficients to set. |
Definition at line 935 of file LinearBooleanConstraint.java.
Builder com.google.ortools.sat.LinearBooleanConstraint.Builder.setLiterals | ( | int | index, |
int | value ) |
Linear terms involved in this constraint. literals[i] is the signed representation of the i-th literal of the constraint and coefficients[i] its coefficients. The signed representation is as follow: for a 0-based variable index x, (x + 1) represents the variable x and -(x + 1) represents its negation. Note that the same variable shouldn't appear twice and that zero coefficients are not allowed.
repeated int32 literals = 1;
index | The index to set the value at. |
value | The literals to set. |
Definition at line 815 of file LinearBooleanConstraint.java.
Builder com.google.ortools.sat.LinearBooleanConstraint.Builder.setLowerBound | ( | long | value | ) |
Optional lower (resp. upper) bound of the constraint. If not present, it means that the constraint is not bounded in this direction. The bounds are INCLUSIVE.
optional int64 lower_bound = 3;
value | The lowerBound to set. |
Definition at line 1022 of file LinearBooleanConstraint.java.
Builder com.google.ortools.sat.LinearBooleanConstraint.Builder.setName | ( | java.lang.String | value | ) |
The name of this constraint.
optional string name = 5 [default = ""];
value | The name to set. |
Definition at line 1150 of file LinearBooleanConstraint.java.
Builder com.google.ortools.sat.LinearBooleanConstraint.Builder.setNameBytes | ( | com.google.protobuf.ByteString | value | ) |
The name of this constraint.
optional string name = 5 [default = ""];
value | The bytes for name to set. |
Definition at line 1181 of file LinearBooleanConstraint.java.
Builder com.google.ortools.sat.LinearBooleanConstraint.Builder.setUpperBound | ( | long | value | ) |
optional int64 upper_bound = 4;
value | The upperBound to set. |
Definition at line 1068 of file LinearBooleanConstraint.java.