Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
com.google.ortools.linearsolver.MPQuadraticConstraint.Builder Class Reference
Inheritance diagram for com.google.ortools.linearsolver.MPQuadraticConstraint.Builder:
com.google.ortools.linearsolver.MPQuadraticConstraintOrBuilder

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 ()
 

Detailed Description

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.

Member Function Documentation

◆ addAllCoefficient()

Builder com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.addAllCoefficient ( java.lang.Iterable<? extends java.lang.Double > values)
Must be finite.

repeated double coefficient = 2;

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

Definition at line 1145 of file MPQuadraticConstraint.java.

◆ addAllQcoefficient()

Builder com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.addAllQcoefficient ( java.lang.Iterable<? extends java.lang.Double > values)
Must be finite.

repeated double qcoefficient = 5;

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

Definition at line 1501 of file MPQuadraticConstraint.java.

◆ addAllQvar1Index()

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;

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

Definition at line 1293 of file MPQuadraticConstraint.java.

◆ addAllQvar2Index()

Builder com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.addAllQvar2Index ( java.lang.Iterable<? extends java.lang.Integer > values)

repeated int32 qvar2_index = 4;

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

Definition at line 1387 of file MPQuadraticConstraint.java.

◆ addAllVarIndex()

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;

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

Definition at line 1024 of file MPQuadraticConstraint.java.

◆ addCoefficient()

Builder com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.addCoefficient ( double value)
Must be finite.

repeated double coefficient = 2;

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

Definition at line 1128 of file MPQuadraticConstraint.java.

◆ addQcoefficient()

Builder com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.addQcoefficient ( double value)
Must be finite.

repeated double qcoefficient = 5;

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

Definition at line 1484 of file MPQuadraticConstraint.java.

◆ addQvar1Index()

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;

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

Definition at line 1270 of file MPQuadraticConstraint.java.

◆ addQvar2Index()

Builder com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.addQvar2Index ( int value)

repeated int32 qvar2_index = 4;

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

Definition at line 1374 of file MPQuadraticConstraint.java.

◆ addVarIndex()

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;

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

Definition at line 1004 of file MPQuadraticConstraint.java.

◆ build()

com.google.ortools.linearsolver.MPQuadraticConstraint com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.build ( )

Definition at line 660 of file MPQuadraticConstraint.java.

◆ buildPartial()

com.google.ortools.linearsolver.MPQuadraticConstraint com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.buildPartial ( )

Definition at line 669 of file MPQuadraticConstraint.java.

◆ clear()

Builder com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.clear ( )

Definition at line 635 of file MPQuadraticConstraint.java.

◆ clearCoefficient()

Builder com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.clearCoefficient ( )
Must be finite.

repeated double coefficient = 2;

Returns
This builder for chaining.

Definition at line 1162 of file MPQuadraticConstraint.java.

◆ clearLowerBound()

Builder com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.clearLowerBound ( )
lower_bound must be <= upper_bound.

optional double lower_bound = 6 [default = -inf];

Returns
This builder for chaining.

Definition at line 1574 of file MPQuadraticConstraint.java.

◆ clearQcoefficient()

Builder com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.clearQcoefficient ( )
Must be finite.

repeated double qcoefficient = 5;

Returns
This builder for chaining.

Definition at line 1518 of file MPQuadraticConstraint.java.

◆ clearQvar1Index()

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;

Returns
This builder for chaining.

Definition at line 1316 of file MPQuadraticConstraint.java.

◆ clearQvar2Index()

Builder com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.clearQvar2Index ( )

repeated int32 qvar2_index = 4;

Returns
This builder for chaining.

Definition at line 1400 of file MPQuadraticConstraint.java.

◆ clearUpperBound()

Builder com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.clearUpperBound ( )

optional double upper_bound = 7 [default = inf];

Returns
This builder for chaining.

Definition at line 1614 of file MPQuadraticConstraint.java.

◆ clearVarIndex()

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;

Returns
This builder for chaining.

Definition at line 1044 of file MPQuadraticConstraint.java.

◆ getCoefficient()

double com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.getCoefficient ( int index)
Must be finite.

repeated double coefficient = 2;

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

Implements com.google.ortools.linearsolver.MPQuadraticConstraintOrBuilder.

Definition at line 1097 of file MPQuadraticConstraint.java.

◆ getCoefficientCount()

int com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.getCoefficientCount ( )
Must be finite.

repeated double coefficient = 2;

Returns
The count of coefficient.

Implements com.google.ortools.linearsolver.MPQuadraticConstraintOrBuilder.

Definition at line 1085 of file MPQuadraticConstraint.java.

◆ getCoefficientList()

java.util.List< java.lang.Double > com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.getCoefficientList ( )
Must be finite.

repeated double coefficient = 2;

Returns
A list containing the coefficient.

Implements com.google.ortools.linearsolver.MPQuadraticConstraintOrBuilder.

Definition at line 1073 of file MPQuadraticConstraint.java.

◆ getDefaultInstanceForType()

com.google.ortools.linearsolver.MPQuadraticConstraint com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.getDefaultInstanceForType ( )

Definition at line 655 of file MPQuadraticConstraint.java.

◆ getDescriptor()

static final com.google.protobuf.Descriptors.Descriptor com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.getDescriptor ( )
static

Definition at line 612 of file MPQuadraticConstraint.java.

◆ getDescriptorForType()

com.google.protobuf.Descriptors.Descriptor com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.getDescriptorForType ( )

Definition at line 650 of file MPQuadraticConstraint.java.

◆ getLowerBound()

double com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.getLowerBound ( )
lower_bound must be <= upper_bound.

optional double lower_bound = 6 [default = -inf];

Returns
The lowerBound.

Implements com.google.ortools.linearsolver.MPQuadraticConstraintOrBuilder.

Definition at line 1547 of file MPQuadraticConstraint.java.

◆ getQcoefficient()

double com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.getQcoefficient ( int index)
Must be finite.

repeated double qcoefficient = 5;

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

Implements com.google.ortools.linearsolver.MPQuadraticConstraintOrBuilder.

Definition at line 1453 of file MPQuadraticConstraint.java.

◆ getQcoefficientCount()

int com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.getQcoefficientCount ( )
Must be finite.

repeated double qcoefficient = 5;

Returns
The count of qcoefficient.

Implements com.google.ortools.linearsolver.MPQuadraticConstraintOrBuilder.

Definition at line 1441 of file MPQuadraticConstraint.java.

◆ getQcoefficientList()

java.util.List< java.lang.Double > com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.getQcoefficientList ( )
Must be finite.

repeated double qcoefficient = 5;

Returns
A list containing the qcoefficient.

Implements com.google.ortools.linearsolver.MPQuadraticConstraintOrBuilder.

Definition at line 1429 of file MPQuadraticConstraint.java.

◆ getQvar1Index()

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;

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

Implements com.google.ortools.linearsolver.MPQuadraticConstraintOrBuilder.

Definition at line 1227 of file MPQuadraticConstraint.java.

◆ getQvar1IndexCount()

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;

Returns
The count of qvar1Index.

Implements com.google.ortools.linearsolver.MPQuadraticConstraintOrBuilder.

Definition at line 1209 of file MPQuadraticConstraint.java.

◆ getQvar1IndexList()

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;

Returns
A list containing the qvar1Index.

Implements com.google.ortools.linearsolver.MPQuadraticConstraintOrBuilder.

Definition at line 1191 of file MPQuadraticConstraint.java.

◆ getQvar2Index()

int com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.getQvar2Index ( int index)

repeated int32 qvar2_index = 4;

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

Implements com.google.ortools.linearsolver.MPQuadraticConstraintOrBuilder.

Definition at line 1351 of file MPQuadraticConstraint.java.

◆ getQvar2IndexCount()

int com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.getQvar2IndexCount ( )

repeated int32 qvar2_index = 4;

Returns
The count of qvar2Index.

Implements com.google.ortools.linearsolver.MPQuadraticConstraintOrBuilder.

Definition at line 1343 of file MPQuadraticConstraint.java.

◆ getQvar2IndexList()

java.util.List< java.lang.Integer > com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.getQvar2IndexList ( )

repeated int32 qvar2_index = 4;

Returns
A list containing the qvar2Index.

Implements com.google.ortools.linearsolver.MPQuadraticConstraintOrBuilder.

Definition at line 1335 of file MPQuadraticConstraint.java.

◆ getUpperBound()

double com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.getUpperBound ( )

optional double upper_bound = 7 [default = inf];

Returns
The upperBound.

Implements com.google.ortools.linearsolver.MPQuadraticConstraintOrBuilder.

Definition at line 1595 of file MPQuadraticConstraint.java.

◆ getVarIndex()

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;

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

Implements com.google.ortools.linearsolver.MPQuadraticConstraintOrBuilder.

Definition at line 967 of file MPQuadraticConstraint.java.

◆ getVarIndexCount()

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;

Returns
The count of varIndex.

Implements com.google.ortools.linearsolver.MPQuadraticConstraintOrBuilder.

Definition at line 952 of file MPQuadraticConstraint.java.

◆ getVarIndexList()

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;

Returns
A list containing the varIndex.

Implements com.google.ortools.linearsolver.MPQuadraticConstraintOrBuilder.

Definition at line 937 of file MPQuadraticConstraint.java.

◆ hasLowerBound()

boolean com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.hasLowerBound ( )
lower_bound must be <= upper_bound.

optional double lower_bound = 6 [default = -inf];

Returns
Whether the lowerBound field is set.

Implements com.google.ortools.linearsolver.MPQuadraticConstraintOrBuilder.

Definition at line 1535 of file MPQuadraticConstraint.java.

◆ hasUpperBound()

boolean com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.hasUpperBound ( )

optional double upper_bound = 7 [default = inf];

Returns
Whether the upperBound field is set.

Implements com.google.ortools.linearsolver.MPQuadraticConstraintOrBuilder.

Definition at line 1587 of file MPQuadraticConstraint.java.

◆ internalGetFieldAccessorTable()

com.google.protobuf.GeneratedMessage.FieldAccessorTable com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.internalGetFieldAccessorTable ( )
protected

Definition at line 618 of file MPQuadraticConstraint.java.

◆ isInitialized()

final boolean com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.isInitialized ( )

Definition at line 789 of file MPQuadraticConstraint.java.

◆ mergeFrom() [1/3]

Builder com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.mergeFrom ( com.google.ortools.linearsolver.MPQuadraticConstraint other)

Definition at line 720 of file MPQuadraticConstraint.java.

◆ mergeFrom() [2/3]

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.

◆ mergeFrom() [3/3]

Builder com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.mergeFrom ( com.google.protobuf.Message other)

Definition at line 711 of file MPQuadraticConstraint.java.

◆ setCoefficient()

Builder com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.setCoefficient ( int index,
double value )
Must be finite.

repeated double coefficient = 2;

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

Definition at line 1110 of file MPQuadraticConstraint.java.

◆ setLowerBound()

Builder com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.setLowerBound ( double value)
lower_bound must be <= upper_bound.

optional double lower_bound = 6 [default = -inf];

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

Definition at line 1559 of file MPQuadraticConstraint.java.

◆ setQcoefficient()

Builder com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.setQcoefficient ( int index,
double value )
Must be finite.

repeated double qcoefficient = 5;

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

Definition at line 1466 of file MPQuadraticConstraint.java.

◆ setQvar1Index()

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;

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

Definition at line 1246 of file MPQuadraticConstraint.java.

◆ setQvar2Index()

Builder com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.setQvar2Index ( int index,
int value )

repeated int32 qvar2_index = 4;

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

Definition at line 1360 of file MPQuadraticConstraint.java.

◆ setUpperBound()

Builder com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.setUpperBound ( double value)

optional double upper_bound = 7 [default = inf];

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

Definition at line 1603 of file MPQuadraticConstraint.java.

◆ setVarIndex()

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;

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

Definition at line 983 of file MPQuadraticConstraint.java.


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