Google OR-Tools v9.9
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 | 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.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) |
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 () |
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 499 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 991 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 895 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 978 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 870 of file LinearBooleanConstraint.java.
Builder com.google.ortools.sat.LinearBooleanConstraint.Builder.addRepeatedField | ( | com.google.protobuf.Descriptors.FieldDescriptor | field, |
java.lang.Object | value ) |
Definition at line 619 of file LinearBooleanConstraint.java.
com.google.ortools.sat.LinearBooleanConstraint com.google.ortools.sat.LinearBooleanConstraint.Builder.build | ( | ) |
Definition at line 550 of file LinearBooleanConstraint.java.
com.google.ortools.sat.LinearBooleanConstraint com.google.ortools.sat.LinearBooleanConstraint.Builder.buildPartial | ( | ) |
Definition at line 559 of file LinearBooleanConstraint.java.
Builder com.google.ortools.sat.LinearBooleanConstraint.Builder.clear | ( | ) |
Definition at line 527 of file LinearBooleanConstraint.java.
Builder com.google.ortools.sat.LinearBooleanConstraint.Builder.clearCoefficients | ( | ) |
repeated int64 coefficients = 2;
Definition at line 1004 of file LinearBooleanConstraint.java.
Builder com.google.ortools.sat.LinearBooleanConstraint.Builder.clearField | ( | com.google.protobuf.Descriptors.FieldDescriptor | field | ) |
Definition at line 603 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 920 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 1068 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 1195 of file LinearBooleanConstraint.java.
Builder com.google.ortools.sat.LinearBooleanConstraint.Builder.clearOneof | ( | com.google.protobuf.Descriptors.OneofDescriptor | oneof | ) |
Definition at line 608 of file LinearBooleanConstraint.java.
Builder com.google.ortools.sat.LinearBooleanConstraint.Builder.clearUpperBound | ( | ) |
optional int64 upper_bound = 4;
Definition at line 1108 of file LinearBooleanConstraint.java.
Builder com.google.ortools.sat.LinearBooleanConstraint.Builder.clone | ( | ) |
Definition at line 593 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 955 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 947 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 939 of file LinearBooleanConstraint.java.
com.google.ortools.sat.LinearBooleanConstraint com.google.ortools.sat.LinearBooleanConstraint.Builder.getDefaultInstanceForType | ( | ) |
Definition at line 545 of file LinearBooleanConstraint.java.
|
static |
Definition at line 504 of file LinearBooleanConstraint.java.
com.google.protobuf.Descriptors.Descriptor com.google.ortools.sat.LinearBooleanConstraint.Builder.getDescriptorForType | ( | ) |
Definition at line 540 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 823 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 803 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 783 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 1037 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 1135 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 1158 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 1089 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 1023 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 1124 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 1081 of file LinearBooleanConstraint.java.
|
protected |
Definition at line 510 of file LinearBooleanConstraint.java.
final boolean com.google.ortools.sat.LinearBooleanConstraint.Builder.isInitialized | ( | ) |
Definition at line 675 of file LinearBooleanConstraint.java.
Builder com.google.ortools.sat.LinearBooleanConstraint.Builder.mergeFrom | ( | com.google.ortools.sat.LinearBooleanConstraint | other | ) |
Definition at line 634 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 680 of file LinearBooleanConstraint.java.
Builder com.google.ortools.sat.LinearBooleanConstraint.Builder.mergeFrom | ( | com.google.protobuf.Message | other | ) |
Definition at line 625 of file LinearBooleanConstraint.java.
final Builder com.google.ortools.sat.LinearBooleanConstraint.Builder.mergeUnknownFields | ( | final com.google.protobuf.UnknownFieldSet | unknownFields | ) |
Definition at line 1225 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 964 of file LinearBooleanConstraint.java.
Builder com.google.ortools.sat.LinearBooleanConstraint.Builder.setField | ( | com.google.protobuf.Descriptors.FieldDescriptor | field, |
java.lang.Object | value ) |
Definition at line 597 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 844 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 1051 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 1179 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 1210 of file LinearBooleanConstraint.java.
Builder com.google.ortools.sat.LinearBooleanConstraint.Builder.setRepeatedField | ( | com.google.protobuf.Descriptors.FieldDescriptor | field, |
int | index, | ||
java.lang.Object | value ) |
Definition at line 613 of file LinearBooleanConstraint.java.
final Builder com.google.ortools.sat.LinearBooleanConstraint.Builder.setUnknownFields | ( | final com.google.protobuf.UnknownFieldSet | unknownFields | ) |
Definition at line 1219 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 1097 of file LinearBooleanConstraint.java.