Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
|
Public Member Functions | |
Builder | clear () |
com.google.protobuf.Descriptors.Descriptor | getDescriptorForType () |
com.google.ortools.linearsolver.MPQuadraticConstraint | getDefaultInstanceForType () |
com.google.ortools.linearsolver.MPQuadraticConstraint | build () |
com.google.ortools.linearsolver.MPQuadraticConstraint | buildPartial () |
Builder | mergeFrom (com.google.protobuf.Message other) |
Builder | mergeFrom (com.google.ortools.linearsolver.MPQuadraticConstraint 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 > | getVarIndexList () |
int | getVarIndexCount () |
int | getVarIndex (int index) |
Builder | setVarIndex (int index, int value) |
Builder | addVarIndex (int value) |
Builder | addAllVarIndex (java.lang.Iterable<? extends java.lang.Integer > values) |
Builder | clearVarIndex () |
java.util.List< java.lang.Double > | getCoefficientList () |
int | getCoefficientCount () |
double | getCoefficient (int index) |
Builder | setCoefficient (int index, double value) |
Builder | addCoefficient (double value) |
Builder | addAllCoefficient (java.lang.Iterable<? extends java.lang.Double > values) |
Builder | clearCoefficient () |
java.util.List< java.lang.Integer > | getQvar1IndexList () |
int | getQvar1IndexCount () |
int | getQvar1Index (int index) |
Builder | setQvar1Index (int index, int value) |
Builder | addQvar1Index (int value) |
Builder | addAllQvar1Index (java.lang.Iterable<? extends java.lang.Integer > values) |
Builder | clearQvar1Index () |
java.util.List< java.lang.Integer > | getQvar2IndexList () |
int | getQvar2IndexCount () |
int | getQvar2Index (int index) |
Builder | setQvar2Index (int index, int value) |
Builder | addQvar2Index (int value) |
Builder | addAllQvar2Index (java.lang.Iterable<? extends java.lang.Integer > values) |
Builder | clearQvar2Index () |
java.util.List< java.lang.Double > | getQcoefficientList () |
int | getQcoefficientCount () |
double | getQcoefficient (int index) |
Builder | setQcoefficient (int index, double value) |
Builder | addQcoefficient (double value) |
Builder | addAllQcoefficient (java.lang.Iterable<? extends java.lang.Double > values) |
Builder | clearQcoefficient () |
boolean | hasLowerBound () |
double | getLowerBound () |
Builder | setLowerBound (double value) |
Builder | clearLowerBound () |
boolean | hasUpperBound () |
double | getUpperBound () |
Builder | setUpperBound (double value) |
Builder | clearUpperBound () |
Public Member Functions inherited from com.google.ortools.linearsolver.MPQuadraticConstraintOrBuilder |
Static Public Member Functions | |
static final com.google.protobuf.Descriptors.Descriptor | getDescriptor () |
Protected Member Functions | |
com.google.protobuf.GeneratedMessage.FieldAccessorTable | internalGetFieldAccessorTable () |
Quadratic constraints of the form lb <= sum a_i x_i + sum b_ij x_i x_j <= ub, where a, b, lb and ub are constants, and x are the model's variables. Quadratic matrices that are Positive Semi-Definite, Second-Order Cones or rotated Second-Order Cones are always accepted. Other forms may or may not be accepted depending on the underlying solver used. See https://scip.zib.de/doc/html/cons__quadratic_8h.php and https://www.gurobi.com/documentation/9.0/refman/constraints.html#subsubsection:QuadraticConstraints
Protobuf type operations_research.MPQuadraticConstraint
Definition at line 607 of file MPQuadraticConstraint.java.
Builder com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.addAllCoefficient | ( | java.lang.Iterable<? extends java.lang.Double > | values | ) |
Must be finite.
repeated double coefficient = 2;
values | The coefficient to add. |
Definition at line 1145 of file MPQuadraticConstraint.java.
Builder com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.addAllQcoefficient | ( | java.lang.Iterable<? extends java.lang.Double > | values | ) |
Must be finite.
repeated double qcoefficient = 5;
values | The qcoefficient to add. |
Definition at line 1501 of file MPQuadraticConstraint.java.
Builder com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.addAllQvar1Index | ( | java.lang.Iterable<? extends java.lang.Integer > | values | ) |
Sparse representation of quadratic terms in the quadratic constraint, where term i is qvar1_index[i] * qvar2_index[i] * qcoefficient[i]. `qvar1_index` and `qvar2_index` are variable indices w.r.t the "variable" field in MPModelProto. `qvar1_index`, `qvar2_index` and `coefficients` must have the same size. If the same unordered pair (qvar1_index, qvar2_index) appears several times, the sum of all of the associated coefficients will be applied.
repeated int32 qvar1_index = 3;
values | The qvar1Index to add. |
Definition at line 1293 of file MPQuadraticConstraint.java.
Builder com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.addAllQvar2Index | ( | java.lang.Iterable<? extends java.lang.Integer > | values | ) |
repeated int32 qvar2_index = 4;
values | The qvar2Index to add. |
Definition at line 1387 of file MPQuadraticConstraint.java.
Builder com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.addAllVarIndex | ( | java.lang.Iterable<? extends java.lang.Integer > | values | ) |
Sparse representation of linear terms in the quadratic constraint, where term i is var_index[i] * coefficient[i]. `var_index` are variable indices w.r.t the "variable" field in MPModelProto, and should be unique.
repeated int32 var_index = 1;
values | The varIndex to add. |
Definition at line 1024 of file MPQuadraticConstraint.java.
Builder com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.addCoefficient | ( | double | value | ) |
Must be finite.
repeated double coefficient = 2;
value | The coefficient to add. |
Definition at line 1128 of file MPQuadraticConstraint.java.
Builder com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.addQcoefficient | ( | double | value | ) |
Must be finite.
repeated double qcoefficient = 5;
value | The qcoefficient to add. |
Definition at line 1484 of file MPQuadraticConstraint.java.
Builder com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.addQvar1Index | ( | int | value | ) |
Sparse representation of quadratic terms in the quadratic constraint, where term i is qvar1_index[i] * qvar2_index[i] * qcoefficient[i]. `qvar1_index` and `qvar2_index` are variable indices w.r.t the "variable" field in MPModelProto. `qvar1_index`, `qvar2_index` and `coefficients` must have the same size. If the same unordered pair (qvar1_index, qvar2_index) appears several times, the sum of all of the associated coefficients will be applied.
repeated int32 qvar1_index = 3;
value | The qvar1Index to add. |
Definition at line 1270 of file MPQuadraticConstraint.java.
Builder com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.addQvar2Index | ( | int | value | ) |
repeated int32 qvar2_index = 4;
value | The qvar2Index to add. |
Definition at line 1374 of file MPQuadraticConstraint.java.
Builder com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.addVarIndex | ( | int | value | ) |
Sparse representation of linear terms in the quadratic constraint, where term i is var_index[i] * coefficient[i]. `var_index` are variable indices w.r.t the "variable" field in MPModelProto, and should be unique.
repeated int32 var_index = 1;
value | The varIndex to add. |
Definition at line 1004 of file MPQuadraticConstraint.java.
com.google.ortools.linearsolver.MPQuadraticConstraint com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.build | ( | ) |
Definition at line 660 of file MPQuadraticConstraint.java.
com.google.ortools.linearsolver.MPQuadraticConstraint com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.buildPartial | ( | ) |
Definition at line 669 of file MPQuadraticConstraint.java.
Builder com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.clear | ( | ) |
Definition at line 635 of file MPQuadraticConstraint.java.
Builder com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.clearCoefficient | ( | ) |
Must be finite.
repeated double coefficient = 2;
Definition at line 1162 of file MPQuadraticConstraint.java.
Builder com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.clearLowerBound | ( | ) |
lower_bound must be <= upper_bound.
optional double lower_bound = 6 [default = -inf];
Definition at line 1574 of file MPQuadraticConstraint.java.
Builder com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.clearQcoefficient | ( | ) |
Must be finite.
repeated double qcoefficient = 5;
Definition at line 1518 of file MPQuadraticConstraint.java.
Builder com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.clearQvar1Index | ( | ) |
Sparse representation of quadratic terms in the quadratic constraint, where term i is qvar1_index[i] * qvar2_index[i] * qcoefficient[i]. `qvar1_index` and `qvar2_index` are variable indices w.r.t the "variable" field in MPModelProto. `qvar1_index`, `qvar2_index` and `coefficients` must have the same size. If the same unordered pair (qvar1_index, qvar2_index) appears several times, the sum of all of the associated coefficients will be applied.
repeated int32 qvar1_index = 3;
Definition at line 1316 of file MPQuadraticConstraint.java.
Builder com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.clearQvar2Index | ( | ) |
repeated int32 qvar2_index = 4;
Definition at line 1400 of file MPQuadraticConstraint.java.
Builder com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.clearUpperBound | ( | ) |
optional double upper_bound = 7 [default = inf];
Definition at line 1614 of file MPQuadraticConstraint.java.
Builder com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.clearVarIndex | ( | ) |
Sparse representation of linear terms in the quadratic constraint, where term i is var_index[i] * coefficient[i]. `var_index` are variable indices w.r.t the "variable" field in MPModelProto, and should be unique.
repeated int32 var_index = 1;
Definition at line 1044 of file MPQuadraticConstraint.java.
double com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.getCoefficient | ( | int | index | ) |
Must be finite.
repeated double coefficient = 2;
index | The index of the element to return. |
Implements com.google.ortools.linearsolver.MPQuadraticConstraintOrBuilder.
Definition at line 1097 of file MPQuadraticConstraint.java.
int com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.getCoefficientCount | ( | ) |
Must be finite.
repeated double coefficient = 2;
Implements com.google.ortools.linearsolver.MPQuadraticConstraintOrBuilder.
Definition at line 1085 of file MPQuadraticConstraint.java.
java.util.List< java.lang.Double > com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.getCoefficientList | ( | ) |
Must be finite.
repeated double coefficient = 2;
Implements com.google.ortools.linearsolver.MPQuadraticConstraintOrBuilder.
Definition at line 1073 of file MPQuadraticConstraint.java.
com.google.ortools.linearsolver.MPQuadraticConstraint com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.getDefaultInstanceForType | ( | ) |
Definition at line 655 of file MPQuadraticConstraint.java.
|
static |
Definition at line 612 of file MPQuadraticConstraint.java.
com.google.protobuf.Descriptors.Descriptor com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.getDescriptorForType | ( | ) |
Definition at line 650 of file MPQuadraticConstraint.java.
double com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.getLowerBound | ( | ) |
lower_bound must be <= upper_bound.
optional double lower_bound = 6 [default = -inf];
Implements com.google.ortools.linearsolver.MPQuadraticConstraintOrBuilder.
Definition at line 1547 of file MPQuadraticConstraint.java.
double com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.getQcoefficient | ( | int | index | ) |
Must be finite.
repeated double qcoefficient = 5;
index | The index of the element to return. |
Implements com.google.ortools.linearsolver.MPQuadraticConstraintOrBuilder.
Definition at line 1453 of file MPQuadraticConstraint.java.
int com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.getQcoefficientCount | ( | ) |
Must be finite.
repeated double qcoefficient = 5;
Implements com.google.ortools.linearsolver.MPQuadraticConstraintOrBuilder.
Definition at line 1441 of file MPQuadraticConstraint.java.
java.util.List< java.lang.Double > com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.getQcoefficientList | ( | ) |
Must be finite.
repeated double qcoefficient = 5;
Implements com.google.ortools.linearsolver.MPQuadraticConstraintOrBuilder.
Definition at line 1429 of file MPQuadraticConstraint.java.
int com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.getQvar1Index | ( | int | index | ) |
Sparse representation of quadratic terms in the quadratic constraint, where term i is qvar1_index[i] * qvar2_index[i] * qcoefficient[i]. `qvar1_index` and `qvar2_index` are variable indices w.r.t the "variable" field in MPModelProto. `qvar1_index`, `qvar2_index` and `coefficients` must have the same size. If the same unordered pair (qvar1_index, qvar2_index) appears several times, the sum of all of the associated coefficients will be applied.
repeated int32 qvar1_index = 3;
index | The index of the element to return. |
Implements com.google.ortools.linearsolver.MPQuadraticConstraintOrBuilder.
Definition at line 1227 of file MPQuadraticConstraint.java.
int com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.getQvar1IndexCount | ( | ) |
Sparse representation of quadratic terms in the quadratic constraint, where term i is qvar1_index[i] * qvar2_index[i] * qcoefficient[i]. `qvar1_index` and `qvar2_index` are variable indices w.r.t the "variable" field in MPModelProto. `qvar1_index`, `qvar2_index` and `coefficients` must have the same size. If the same unordered pair (qvar1_index, qvar2_index) appears several times, the sum of all of the associated coefficients will be applied.
repeated int32 qvar1_index = 3;
Implements com.google.ortools.linearsolver.MPQuadraticConstraintOrBuilder.
Definition at line 1209 of file MPQuadraticConstraint.java.
java.util.List< java.lang.Integer > com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.getQvar1IndexList | ( | ) |
Sparse representation of quadratic terms in the quadratic constraint, where term i is qvar1_index[i] * qvar2_index[i] * qcoefficient[i]. `qvar1_index` and `qvar2_index` are variable indices w.r.t the "variable" field in MPModelProto. `qvar1_index`, `qvar2_index` and `coefficients` must have the same size. If the same unordered pair (qvar1_index, qvar2_index) appears several times, the sum of all of the associated coefficients will be applied.
repeated int32 qvar1_index = 3;
Implements com.google.ortools.linearsolver.MPQuadraticConstraintOrBuilder.
Definition at line 1191 of file MPQuadraticConstraint.java.
int com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.getQvar2Index | ( | int | index | ) |
repeated int32 qvar2_index = 4;
index | The index of the element to return. |
Implements com.google.ortools.linearsolver.MPQuadraticConstraintOrBuilder.
Definition at line 1351 of file MPQuadraticConstraint.java.
int com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.getQvar2IndexCount | ( | ) |
repeated int32 qvar2_index = 4;
Implements com.google.ortools.linearsolver.MPQuadraticConstraintOrBuilder.
Definition at line 1343 of file MPQuadraticConstraint.java.
java.util.List< java.lang.Integer > com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.getQvar2IndexList | ( | ) |
repeated int32 qvar2_index = 4;
Implements com.google.ortools.linearsolver.MPQuadraticConstraintOrBuilder.
Definition at line 1335 of file MPQuadraticConstraint.java.
double com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.getUpperBound | ( | ) |
optional double upper_bound = 7 [default = inf];
Implements com.google.ortools.linearsolver.MPQuadraticConstraintOrBuilder.
Definition at line 1595 of file MPQuadraticConstraint.java.
int com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.getVarIndex | ( | int | index | ) |
Sparse representation of linear terms in the quadratic constraint, where term i is var_index[i] * coefficient[i]. `var_index` are variable indices w.r.t the "variable" field in MPModelProto, and should be unique.
repeated int32 var_index = 1;
index | The index of the element to return. |
Implements com.google.ortools.linearsolver.MPQuadraticConstraintOrBuilder.
Definition at line 967 of file MPQuadraticConstraint.java.
int com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.getVarIndexCount | ( | ) |
Sparse representation of linear terms in the quadratic constraint, where term i is var_index[i] * coefficient[i]. `var_index` are variable indices w.r.t the "variable" field in MPModelProto, and should be unique.
repeated int32 var_index = 1;
Implements com.google.ortools.linearsolver.MPQuadraticConstraintOrBuilder.
Definition at line 952 of file MPQuadraticConstraint.java.
java.util.List< java.lang.Integer > com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.getVarIndexList | ( | ) |
Sparse representation of linear terms in the quadratic constraint, where term i is var_index[i] * coefficient[i]. `var_index` are variable indices w.r.t the "variable" field in MPModelProto, and should be unique.
repeated int32 var_index = 1;
Implements com.google.ortools.linearsolver.MPQuadraticConstraintOrBuilder.
Definition at line 937 of file MPQuadraticConstraint.java.
boolean com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.hasLowerBound | ( | ) |
lower_bound must be <= upper_bound.
optional double lower_bound = 6 [default = -inf];
Implements com.google.ortools.linearsolver.MPQuadraticConstraintOrBuilder.
Definition at line 1535 of file MPQuadraticConstraint.java.
boolean com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.hasUpperBound | ( | ) |
optional double upper_bound = 7 [default = inf];
Implements com.google.ortools.linearsolver.MPQuadraticConstraintOrBuilder.
Definition at line 1587 of file MPQuadraticConstraint.java.
|
protected |
Definition at line 618 of file MPQuadraticConstraint.java.
final boolean com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.isInitialized | ( | ) |
Definition at line 789 of file MPQuadraticConstraint.java.
Builder com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.mergeFrom | ( | com.google.ortools.linearsolver.MPQuadraticConstraint | other | ) |
Definition at line 720 of file MPQuadraticConstraint.java.
Builder com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.mergeFrom | ( | com.google.protobuf.CodedInputStream | input, |
com.google.protobuf.ExtensionRegistryLite | extensionRegistry ) throws java.io.IOException |
Definition at line 794 of file MPQuadraticConstraint.java.
Builder com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.mergeFrom | ( | com.google.protobuf.Message | other | ) |
Definition at line 711 of file MPQuadraticConstraint.java.
Builder com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.setCoefficient | ( | int | index, |
double | value ) |
Must be finite.
repeated double coefficient = 2;
index | The index to set the value at. |
value | The coefficient to set. |
Definition at line 1110 of file MPQuadraticConstraint.java.
Builder com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.setLowerBound | ( | double | value | ) |
lower_bound must be <= upper_bound.
optional double lower_bound = 6 [default = -inf];
value | The lowerBound to set. |
Definition at line 1559 of file MPQuadraticConstraint.java.
Builder com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.setQcoefficient | ( | int | index, |
double | value ) |
Must be finite.
repeated double qcoefficient = 5;
index | The index to set the value at. |
value | The qcoefficient to set. |
Definition at line 1466 of file MPQuadraticConstraint.java.
Builder com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.setQvar1Index | ( | int | index, |
int | value ) |
Sparse representation of quadratic terms in the quadratic constraint, where term i is qvar1_index[i] * qvar2_index[i] * qcoefficient[i]. `qvar1_index` and `qvar2_index` are variable indices w.r.t the "variable" field in MPModelProto. `qvar1_index`, `qvar2_index` and `coefficients` must have the same size. If the same unordered pair (qvar1_index, qvar2_index) appears several times, the sum of all of the associated coefficients will be applied.
repeated int32 qvar1_index = 3;
index | The index to set the value at. |
value | The qvar1Index to set. |
Definition at line 1246 of file MPQuadraticConstraint.java.
Builder com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.setQvar2Index | ( | int | index, |
int | value ) |
repeated int32 qvar2_index = 4;
index | The index to set the value at. |
value | The qvar2Index to set. |
Definition at line 1360 of file MPQuadraticConstraint.java.
Builder com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.setUpperBound | ( | double | value | ) |
optional double upper_bound = 7 [default = inf];
value | The upperBound to set. |
Definition at line 1603 of file MPQuadraticConstraint.java.
Builder com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.setVarIndex | ( | int | index, |
int | value ) |
Sparse representation of linear terms in the quadratic constraint, where term i is var_index[i] * coefficient[i]. `var_index` are variable indices w.r.t the "variable" field in MPModelProto, and should be unique.
repeated int32 var_index = 1;
index | The index to set the value at. |
value | The varIndex to set. |
Definition at line 983 of file MPQuadraticConstraint.java.