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.MPConstraintProto | getDefaultInstanceForType () |
com.google.ortools.linearsolver.MPConstraintProto | build () |
com.google.ortools.linearsolver.MPConstraintProto | buildPartial () |
Builder | mergeFrom (com.google.protobuf.Message other) |
Builder | mergeFrom (com.google.ortools.linearsolver.MPConstraintProto 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 () |
boolean | hasLowerBound () |
double | getLowerBound () |
Builder | setLowerBound (double value) |
Builder | clearLowerBound () |
boolean | hasUpperBound () |
double | getUpperBound () |
Builder | setUpperBound (double 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) |
boolean | hasIsLazy () |
boolean | getIsLazy () |
Builder | setIsLazy (boolean value) |
Builder | clearIsLazy () |
Public Member Functions inherited from com.google.ortools.linearsolver.MPConstraintProtoOrBuilder |
Static Public Member Functions | |
static final com.google.protobuf.Descriptors.Descriptor | getDescriptor () |
Protected Member Functions | |
com.google.protobuf.GeneratedMessage.FieldAccessorTable | internalGetFieldAccessorTable () |
A linear constraint is always of the form: lower_bound <= sum of linear term elements <= upper_bound, where lower_bound and upper_bound: - Can form a singleton: lower_bound == upper_bound. The constraint is an equation. - Can form a finite interval [lower_bound, upper_bound]. The constraint is both lower- and upper-bounded, i.e. "boxed". - Can form a semi-infinite interval. lower_bound = -infinity: the constraint is upper-bounded. upper_bound = +infinity: the constraint is lower-bounded. - Can form the infinite interval: lower_bound = -infinity and upper_bound = +infinity. The constraint is free.
Protobuf type operations_research.MPConstraintProto
Definition at line 580 of file MPConstraintProto.java.
Builder com.google.ortools.linearsolver.MPConstraintProto.Builder.addAllCoefficient | ( | java.lang.Iterable<? extends java.lang.Double > | values | ) |
Must be finite.
repeated double coefficient = 7 [packed = true];
values | The coefficient to add. |
Definition at line 1049 of file MPConstraintProto.java.
Builder com.google.ortools.linearsolver.MPConstraintProto.Builder.addAllVarIndex | ( | java.lang.Iterable<? extends java.lang.Integer > | values | ) |
var_index[i] is the variable index (w.r.t. to "variable" field of MPModelProto) of the i-th linear term involved in this constraint, and coefficient[i] is its coefficient. Only the terms with non-zero coefficients need to appear. var_index may not contain duplicates.
repeated int32 var_index = 6 [packed = true];
values | The varIndex to add. |
Definition at line 928 of file MPConstraintProto.java.
Builder com.google.ortools.linearsolver.MPConstraintProto.Builder.addCoefficient | ( | double | value | ) |
Must be finite.
repeated double coefficient = 7 [packed = true];
value | The coefficient to add. |
Definition at line 1032 of file MPConstraintProto.java.
Builder com.google.ortools.linearsolver.MPConstraintProto.Builder.addVarIndex | ( | int | value | ) |
var_index[i] is the variable index (w.r.t. to "variable" field of MPModelProto) of the i-th linear term involved in this constraint, and coefficient[i] is its coefficient. Only the terms with non-zero coefficients need to appear. var_index may not contain duplicates.
repeated int32 var_index = 6 [packed = true];
value | The varIndex to add. |
Definition at line 908 of file MPConstraintProto.java.
com.google.ortools.linearsolver.MPConstraintProto com.google.ortools.linearsolver.MPConstraintProto.Builder.build | ( | ) |
Definition at line 632 of file MPConstraintProto.java.
com.google.ortools.linearsolver.MPConstraintProto com.google.ortools.linearsolver.MPConstraintProto.Builder.buildPartial | ( | ) |
Definition at line 641 of file MPConstraintProto.java.
Builder com.google.ortools.linearsolver.MPConstraintProto.Builder.clear | ( | ) |
Definition at line 608 of file MPConstraintProto.java.
Builder com.google.ortools.linearsolver.MPConstraintProto.Builder.clearCoefficient | ( | ) |
Must be finite.
repeated double coefficient = 7 [packed = true];
Definition at line 1066 of file MPConstraintProto.java.
Builder com.google.ortools.linearsolver.MPConstraintProto.Builder.clearIsLazy | ( | ) |
[Advanced usage: do not use this if you don't know what you're doing.] A lazy constraint is handled differently by the core solving engine, but it does not change the result. It may or may not impact the performance. For more info see: http://tinyurl.com/lazy-constraints.
optional bool is_lazy = 5 [default = false];
Definition at line 1334 of file MPConstraintProto.java.
Builder com.google.ortools.linearsolver.MPConstraintProto.Builder.clearLowerBound | ( | ) |
lower_bound must be <= upper_bound.
optional double lower_bound = 2 [default = -inf];
Definition at line 1122 of file MPConstraintProto.java.
Builder com.google.ortools.linearsolver.MPConstraintProto.Builder.clearName | ( | ) |
The name of the constraint.
optional string name = 4 [default = ""];
Definition at line 1249 of file MPConstraintProto.java.
Builder com.google.ortools.linearsolver.MPConstraintProto.Builder.clearUpperBound | ( | ) |
optional double upper_bound = 3 [default = inf];
Definition at line 1162 of file MPConstraintProto.java.
Builder com.google.ortools.linearsolver.MPConstraintProto.Builder.clearVarIndex | ( | ) |
var_index[i] is the variable index (w.r.t. to "variable" field of MPModelProto) of the i-th linear term involved in this constraint, and coefficient[i] is its coefficient. Only the terms with non-zero coefficients need to appear. var_index may not contain duplicates.
repeated int32 var_index = 6 [packed = true];
Definition at line 948 of file MPConstraintProto.java.
double com.google.ortools.linearsolver.MPConstraintProto.Builder.getCoefficient | ( | int | index | ) |
Must be finite.
repeated double coefficient = 7 [packed = true];
index | The index of the element to return. |
Implements com.google.ortools.linearsolver.MPConstraintProtoOrBuilder.
Definition at line 1001 of file MPConstraintProto.java.
int com.google.ortools.linearsolver.MPConstraintProto.Builder.getCoefficientCount | ( | ) |
Must be finite.
repeated double coefficient = 7 [packed = true];
Implements com.google.ortools.linearsolver.MPConstraintProtoOrBuilder.
Definition at line 989 of file MPConstraintProto.java.
java.util.List< java.lang.Double > com.google.ortools.linearsolver.MPConstraintProto.Builder.getCoefficientList | ( | ) |
Must be finite.
repeated double coefficient = 7 [packed = true];
Implements com.google.ortools.linearsolver.MPConstraintProtoOrBuilder.
Definition at line 977 of file MPConstraintProto.java.
com.google.ortools.linearsolver.MPConstraintProto com.google.ortools.linearsolver.MPConstraintProto.Builder.getDefaultInstanceForType | ( | ) |
Definition at line 627 of file MPConstraintProto.java.
|
static |
Definition at line 585 of file MPConstraintProto.java.
com.google.protobuf.Descriptors.Descriptor com.google.ortools.linearsolver.MPConstraintProto.Builder.getDescriptorForType | ( | ) |
Definition at line 622 of file MPConstraintProto.java.
boolean com.google.ortools.linearsolver.MPConstraintProto.Builder.getIsLazy | ( | ) |
[Advanced usage: do not use this if you don't know what you're doing.] A lazy constraint is handled differently by the core solving engine, but it does not change the result. It may or may not impact the performance. For more info see: http://tinyurl.com/lazy-constraints.
optional bool is_lazy = 5 [default = false];
Implements com.google.ortools.linearsolver.MPConstraintProtoOrBuilder.
Definition at line 1301 of file MPConstraintProto.java.
double com.google.ortools.linearsolver.MPConstraintProto.Builder.getLowerBound | ( | ) |
lower_bound must be <= upper_bound.
optional double lower_bound = 2 [default = -inf];
Implements com.google.ortools.linearsolver.MPConstraintProtoOrBuilder.
Definition at line 1095 of file MPConstraintProto.java.
java.lang.String com.google.ortools.linearsolver.MPConstraintProto.Builder.getName | ( | ) |
The name of the constraint.
optional string name = 4 [default = ""];
Implements com.google.ortools.linearsolver.MPConstraintProtoOrBuilder.
Definition at line 1189 of file MPConstraintProto.java.
com.google.protobuf.ByteString com.google.ortools.linearsolver.MPConstraintProto.Builder.getNameBytes | ( | ) |
The name of the constraint.
optional string name = 4 [default = ""];
Implements com.google.ortools.linearsolver.MPConstraintProtoOrBuilder.
Definition at line 1212 of file MPConstraintProto.java.
double com.google.ortools.linearsolver.MPConstraintProto.Builder.getUpperBound | ( | ) |
optional double upper_bound = 3 [default = inf];
Implements com.google.ortools.linearsolver.MPConstraintProtoOrBuilder.
Definition at line 1143 of file MPConstraintProto.java.
int com.google.ortools.linearsolver.MPConstraintProto.Builder.getVarIndex | ( | int | index | ) |
var_index[i] is the variable index (w.r.t. to "variable" field of MPModelProto) of the i-th linear term involved in this constraint, and coefficient[i] is its coefficient. Only the terms with non-zero coefficients need to appear. var_index may not contain duplicates.
repeated int32 var_index = 6 [packed = true];
index | The index of the element to return. |
Implements com.google.ortools.linearsolver.MPConstraintProtoOrBuilder.
Definition at line 871 of file MPConstraintProto.java.
int com.google.ortools.linearsolver.MPConstraintProto.Builder.getVarIndexCount | ( | ) |
var_index[i] is the variable index (w.r.t. to "variable" field of MPModelProto) of the i-th linear term involved in this constraint, and coefficient[i] is its coefficient. Only the terms with non-zero coefficients need to appear. var_index may not contain duplicates.
repeated int32 var_index = 6 [packed = true];
Implements com.google.ortools.linearsolver.MPConstraintProtoOrBuilder.
Definition at line 856 of file MPConstraintProto.java.
java.util.List< java.lang.Integer > com.google.ortools.linearsolver.MPConstraintProto.Builder.getVarIndexList | ( | ) |
var_index[i] is the variable index (w.r.t. to "variable" field of MPModelProto) of the i-th linear term involved in this constraint, and coefficient[i] is its coefficient. Only the terms with non-zero coefficients need to appear. var_index may not contain duplicates.
repeated int32 var_index = 6 [packed = true];
Implements com.google.ortools.linearsolver.MPConstraintProtoOrBuilder.
Definition at line 841 of file MPConstraintProto.java.
boolean com.google.ortools.linearsolver.MPConstraintProto.Builder.hasIsLazy | ( | ) |
[Advanced usage: do not use this if you don't know what you're doing.] A lazy constraint is handled differently by the core solving engine, but it does not change the result. It may or may not impact the performance. For more info see: http://tinyurl.com/lazy-constraints.
optional bool is_lazy = 5 [default = false];
Implements com.google.ortools.linearsolver.MPConstraintProtoOrBuilder.
Definition at line 1286 of file MPConstraintProto.java.
boolean com.google.ortools.linearsolver.MPConstraintProto.Builder.hasLowerBound | ( | ) |
lower_bound must be <= upper_bound.
optional double lower_bound = 2 [default = -inf];
Implements com.google.ortools.linearsolver.MPConstraintProtoOrBuilder.
Definition at line 1083 of file MPConstraintProto.java.
boolean com.google.ortools.linearsolver.MPConstraintProto.Builder.hasName | ( | ) |
The name of the constraint.
optional string name = 4 [default = ""];
Implements com.google.ortools.linearsolver.MPConstraintProtoOrBuilder.
Definition at line 1178 of file MPConstraintProto.java.
boolean com.google.ortools.linearsolver.MPConstraintProto.Builder.hasUpperBound | ( | ) |
optional double upper_bound = 3 [default = inf];
Implements com.google.ortools.linearsolver.MPConstraintProtoOrBuilder.
Definition at line 1135 of file MPConstraintProto.java.
|
protected |
Definition at line 591 of file MPConstraintProto.java.
final boolean com.google.ortools.linearsolver.MPConstraintProto.Builder.isInitialized | ( | ) |
Definition at line 732 of file MPConstraintProto.java.
Builder com.google.ortools.linearsolver.MPConstraintProto.Builder.mergeFrom | ( | com.google.ortools.linearsolver.MPConstraintProto | other | ) |
Definition at line 688 of file MPConstraintProto.java.
Builder com.google.ortools.linearsolver.MPConstraintProto.Builder.mergeFrom | ( | com.google.protobuf.CodedInputStream | input, |
com.google.protobuf.ExtensionRegistryLite | extensionRegistry ) throws java.io.IOException |
Definition at line 737 of file MPConstraintProto.java.
Builder com.google.ortools.linearsolver.MPConstraintProto.Builder.mergeFrom | ( | com.google.protobuf.Message | other | ) |
Definition at line 679 of file MPConstraintProto.java.
Builder com.google.ortools.linearsolver.MPConstraintProto.Builder.setCoefficient | ( | int | index, |
double | value ) |
Must be finite.
repeated double coefficient = 7 [packed = true];
index | The index to set the value at. |
value | The coefficient to set. |
Definition at line 1014 of file MPConstraintProto.java.
Builder com.google.ortools.linearsolver.MPConstraintProto.Builder.setIsLazy | ( | boolean | value | ) |
[Advanced usage: do not use this if you don't know what you're doing.] A lazy constraint is handled differently by the core solving engine, but it does not change the result. It may or may not impact the performance. For more info see: http://tinyurl.com/lazy-constraints.
optional bool is_lazy = 5 [default = false];
value | The isLazy to set. |
Definition at line 1316 of file MPConstraintProto.java.
Builder com.google.ortools.linearsolver.MPConstraintProto.Builder.setLowerBound | ( | double | value | ) |
lower_bound must be <= upper_bound.
optional double lower_bound = 2 [default = -inf];
value | The lowerBound to set. |
Definition at line 1107 of file MPConstraintProto.java.
Builder com.google.ortools.linearsolver.MPConstraintProto.Builder.setName | ( | java.lang.String | value | ) |
The name of the constraint.
optional string name = 4 [default = ""];
value | The name to set. |
Definition at line 1233 of file MPConstraintProto.java.
Builder com.google.ortools.linearsolver.MPConstraintProto.Builder.setNameBytes | ( | com.google.protobuf.ByteString | value | ) |
The name of the constraint.
optional string name = 4 [default = ""];
value | The bytes for name to set. |
Definition at line 1264 of file MPConstraintProto.java.
Builder com.google.ortools.linearsolver.MPConstraintProto.Builder.setUpperBound | ( | double | value | ) |
optional double upper_bound = 3 [default = inf];
value | The upperBound to set. |
Definition at line 1151 of file MPConstraintProto.java.
Builder com.google.ortools.linearsolver.MPConstraintProto.Builder.setVarIndex | ( | int | index, |
int | value ) |
var_index[i] is the variable index (w.r.t. to "variable" field of MPModelProto) of the i-th linear term involved in this constraint, and coefficient[i] is its coefficient. Only the terms with non-zero coefficients need to appear. var_index may not contain duplicates.
repeated int32 var_index = 6 [packed = true];
index | The index to set the value at. |
value | The varIndex to set. |
Definition at line 887 of file MPConstraintProto.java.