![]() |
Google OR-Tools v9.14
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 () |
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 609 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 1147 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 1503 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 1295 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 1389 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 1026 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 1130 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 1486 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 1272 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 1376 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 1006 of file MPQuadraticConstraint.java.
com.google.ortools.linearsolver.MPQuadraticConstraint com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.build | ( | ) |
Definition at line 662 of file MPQuadraticConstraint.java.
com.google.ortools.linearsolver.MPQuadraticConstraint com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.buildPartial | ( | ) |
Definition at line 671 of file MPQuadraticConstraint.java.
Builder com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.clear | ( | ) |
Definition at line 637 of file MPQuadraticConstraint.java.
Builder com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.clearCoefficient | ( | ) |
Must be finite.
repeated double coefficient = 2;
Definition at line 1164 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 1576 of file MPQuadraticConstraint.java.
Builder com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.clearQcoefficient | ( | ) |
Must be finite.
repeated double qcoefficient = 5;
Definition at line 1520 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 1318 of file MPQuadraticConstraint.java.
Builder com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.clearQvar2Index | ( | ) |
repeated int32 qvar2_index = 4;
Definition at line 1402 of file MPQuadraticConstraint.java.
Builder com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.clearUpperBound | ( | ) |
optional double upper_bound = 7 [default = inf];
Definition at line 1616 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 1046 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 1099 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 1087 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 1075 of file MPQuadraticConstraint.java.
com.google.ortools.linearsolver.MPQuadraticConstraint com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.getDefaultInstanceForType | ( | ) |
Definition at line 657 of file MPQuadraticConstraint.java.
|
static |
Definition at line 614 of file MPQuadraticConstraint.java.
com.google.protobuf.Descriptors.Descriptor com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.getDescriptorForType | ( | ) |
Definition at line 652 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 1549 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 1455 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 1443 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 1431 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 1229 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 1211 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 1193 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 1353 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 1345 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 1337 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 1597 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 969 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 954 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 939 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 1537 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 1589 of file MPQuadraticConstraint.java.
|
protected |
Definition at line 620 of file MPQuadraticConstraint.java.
final boolean com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.isInitialized | ( | ) |
Definition at line 791 of file MPQuadraticConstraint.java.
Builder com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.mergeFrom | ( | com.google.ortools.linearsolver.MPQuadraticConstraint | other | ) |
Definition at line 722 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 796 of file MPQuadraticConstraint.java.
Builder com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.mergeFrom | ( | com.google.protobuf.Message | other | ) |
Definition at line 713 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 1112 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 1561 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 1468 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 1248 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 1362 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 1605 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 985 of file MPQuadraticConstraint.java.