Java Reference
Java Reference
Detailed Description
A variable is always constrained in the form: lower_bound <= x <= upper_bound where lower_bound and upper_bound:
- Can form a singleton: x = constant = lower_bound = upper_bound.
- Can form a finite interval: lower_bound <= x <= upper_bound. (x is boxed.)
- Can form a semi-infinite interval.
- lower_bound = -infinity: x <= upper_bound.
- upper_bound = +infinity: x >= lower_bound.
- Can form the infinite interval: lower_bound = -infinity and
upper_bound = +infinity, x is free.
MPVariableProto furthermore stores:
- The coefficient of the variable in the objective.
- Whether the variable is integer.
Protobuf typeoperations_research.MPVariableProto
Definition at line 581 of file MPVariableProto.java.
Public Member Functions | |
| .lang.Override Builder | clear () |
| .lang.Override com.google.protobuf.Descriptors.Descriptor | getDescriptorForType () |
| .lang.Override com.google.ortools.linearsolver.MPVariableProto | getDefaultInstanceForType () |
| .lang.Override com.google.ortools.linearsolver.MPVariableProto | build () |
| .lang.Override com.google.ortools.linearsolver.MPVariableProto | buildPartial () |
| .lang.Override Builder | clone () |
| .lang.Override Builder | setField (com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) |
| .lang.Override Builder | clearField (com.google.protobuf.Descriptors.FieldDescriptor field) |
| .lang.Override Builder | clearOneof (com.google.protobuf.Descriptors.OneofDescriptor oneof) |
| .lang.Override Builder | setRepeatedField (com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) |
| .lang.Override Builder | addRepeatedField (com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) |
| .lang.Override Builder | mergeFrom (com.google.protobuf.Message other) |
| Builder | mergeFrom (com.google.ortools.linearsolver.MPVariableProto other) |
| .lang.Override final boolean | isInitialized () |
| .lang.Override Builder | mergeFrom (com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException |
| .lang.Override boolean | hasLowerBound () |
| .lang.Override double | getLowerBound () |
| Builder | setLowerBound (double value) |
| Builder | clearLowerBound () |
| .lang.Override boolean | hasUpperBound () |
optional double upper_bound = 2 [default = inf]; More... | |
| .lang.Override double | getUpperBound () |
optional double upper_bound = 2 [default = inf]; More... | |
| Builder | setUpperBound (double value) |
optional double upper_bound = 2 [default = inf]; More... | |
| Builder | clearUpperBound () |
optional double upper_bound = 2 [default = inf]; More... | |
| .lang.Override boolean | hasObjectiveCoefficient () |
| .lang.Override double | getObjectiveCoefficient () |
| Builder | setObjectiveCoefficient (double value) |
| Builder | clearObjectiveCoefficient () |
| .lang.Override boolean | hasIsInteger () |
| .lang.Override boolean | getIsInteger () |
| Builder | setIsInteger (boolean value) |
| Builder | clearIsInteger () |
| 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) |
| .lang.Override boolean | hasBranchingPriority () |
optional int32 branching_priority = 6 [default = 0]; More... | |
| .lang.Override int | getBranchingPriority () |
optional int32 branching_priority = 6 [default = 0]; More... | |
| Builder | setBranchingPriority (int value) |
optional int32 branching_priority = 6 [default = 0]; More... | |
| Builder | clearBranchingPriority () |
optional int32 branching_priority = 6 [default = 0]; More... | |
| .lang.Override final Builder | setUnknownFields (final com.google.protobuf.UnknownFieldSet unknownFields) |
| .lang.Override final Builder | mergeUnknownFields (final com.google.protobuf.UnknownFieldSet unknownFields) |
Static Public Member Functions | |
| static final com.google.protobuf.Descriptors.Descriptor | getDescriptor () |
Protected Member Functions | |
| .lang.Override com.google.protobuf.GeneratedMessageV3.FieldAccessorTable | internalGetFieldAccessorTable () |
Member Function Documentation
◆ addRepeatedField()
|
inline |
Definition at line 712 of file MPVariableProto.java.
◆ build()
|
inline |
Definition at line 643 of file MPVariableProto.java.
◆ buildPartial()
|
inline |
Definition at line 652 of file MPVariableProto.java.
◆ clear()
|
inline |
Definition at line 614 of file MPVariableProto.java.
◆ clearBranchingPriority()
|
inline |
optional int32 branching_priority = 6 [default = 0];
- Returns
- This builder for chaining.
Definition at line 1127 of file MPVariableProto.java.
◆ clearField()
|
inline |
Definition at line 696 of file MPVariableProto.java.
◆ clearIsInteger()
|
inline |
True if the variable is constrained to be integer. Ignored if MPModelProto::solver_type is *LINEAR_PROGRAMMING*.
optional bool is_integer = 4 [default = false];
- Returns
- This builder for chaining.
Definition at line 980 of file MPVariableProto.java.
◆ clearLowerBound()
|
inline |
lower_bound must be <= upper_bound.
optional double lower_bound = 1 [default = -inf];
- Returns
- This builder for chaining.
Definition at line 827 of file MPVariableProto.java.
◆ clearName()
|
inline |
The name of the variable.
optional string name = 5 [default = ""];
- Returns
- This builder for chaining.
Definition at line 1069 of file MPVariableProto.java.
◆ clearObjectiveCoefficient()
|
inline |
The coefficient of the variable in the objective. Must be finite.
optional double objective_coefficient = 3 [default = 0];
- Returns
- This builder for chaining.
Definition at line 921 of file MPVariableProto.java.
◆ clearOneof()
|
inline |
Definition at line 701 of file MPVariableProto.java.
◆ clearUpperBound()
|
inline |
optional double upper_bound = 2 [default = inf];
- Returns
- This builder for chaining.
Definition at line 866 of file MPVariableProto.java.
◆ clone()
|
inline |
Definition at line 686 of file MPVariableProto.java.
◆ getBranchingPriority()
|
inline |
optional int32 branching_priority = 6 [default = 0];
- Returns
- The branchingPriority.
Implements MPVariableProtoOrBuilder.
Definition at line 1109 of file MPVariableProto.java.
◆ getDefaultInstanceForType()
|
inline |
Definition at line 638 of file MPVariableProto.java.
◆ getDescriptor()
|
inlinestatic |
Definition at line 586 of file MPVariableProto.java.
◆ getDescriptorForType()
|
inline |
Definition at line 633 of file MPVariableProto.java.
◆ getIsInteger()
|
inline |
True if the variable is constrained to be integer. Ignored if MPModelProto::solver_type is *LINEAR_PROGRAMMING*.
optional bool is_integer = 4 [default = false];
- Returns
- The isInteger.
Implements MPVariableProtoOrBuilder.
Definition at line 952 of file MPVariableProto.java.
◆ getLowerBound()
|
inline |
lower_bound must be <= upper_bound.
optional double lower_bound = 1 [default = -inf];
- Returns
- The lowerBound.
Implements MPVariableProtoOrBuilder.
Definition at line 801 of file MPVariableProto.java.
◆ getName()
|
inline |
The name of the variable.
optional string name = 5 [default = ""];
- Returns
- The name.
Implements MPVariableProtoOrBuilder.
Definition at line 1007 of file MPVariableProto.java.
◆ getNameBytes()
|
inline |
The name of the variable.
optional string name = 5 [default = ""];
- Returns
- The bytes for name.
Implements MPVariableProtoOrBuilder.
Definition at line 1030 of file MPVariableProto.java.
◆ getObjectiveCoefficient()
|
inline |
The coefficient of the variable in the objective. Must be finite.
optional double objective_coefficient = 3 [default = 0];
- Returns
- The objectiveCoefficient.
Implements MPVariableProtoOrBuilder.
Definition at line 895 of file MPVariableProto.java.
◆ getUpperBound()
|
inline |
optional double upper_bound = 2 [default = inf];
- Returns
- The upperBound.
Implements MPVariableProtoOrBuilder.
Definition at line 848 of file MPVariableProto.java.
◆ hasBranchingPriority()
|
inline |
optional int32 branching_priority = 6 [default = 0];
- Returns
- Whether the branchingPriority field is set.
Implements MPVariableProtoOrBuilder.
Definition at line 1101 of file MPVariableProto.java.
◆ hasIsInteger()
|
inline |
True if the variable is constrained to be integer. Ignored if MPModelProto::solver_type is *LINEAR_PROGRAMMING*.
optional bool is_integer = 4 [default = false];
- Returns
- Whether the isInteger field is set.
Implements MPVariableProtoOrBuilder.
Definition at line 939 of file MPVariableProto.java.
◆ hasLowerBound()
|
inline |
lower_bound must be <= upper_bound.
optional double lower_bound = 1 [default = -inf];
- Returns
- Whether the lowerBound field is set.
Implements MPVariableProtoOrBuilder.
Definition at line 789 of file MPVariableProto.java.
◆ hasName()
|
inline |
The name of the variable.
optional string name = 5 [default = ""];
- Returns
- Whether the name field is set.
Implements MPVariableProtoOrBuilder.
Definition at line 996 of file MPVariableProto.java.
◆ hasObjectiveCoefficient()
|
inline |
The coefficient of the variable in the objective. Must be finite.
optional double objective_coefficient = 3 [default = 0];
- Returns
- Whether the objectiveCoefficient field is set.
Implements MPVariableProtoOrBuilder.
Definition at line 883 of file MPVariableProto.java.
◆ hasUpperBound()
|
inline |
optional double upper_bound = 2 [default = inf];
- Returns
- Whether the upperBound field is set.
Implements MPVariableProtoOrBuilder.
Definition at line 840 of file MPVariableProto.java.
◆ internalGetFieldAccessorTable()
|
inlineprotected |
Definition at line 592 of file MPVariableProto.java.
◆ isInitialized()
|
inline |
Definition at line 755 of file MPVariableProto.java.
◆ mergeFrom() [1/3]
|
inline |
Definition at line 727 of file MPVariableProto.java.
◆ mergeFrom() [2/3]
|
inline |
Definition at line 760 of file MPVariableProto.java.
◆ mergeFrom() [3/3]
|
inline |
Definition at line 718 of file MPVariableProto.java.
◆ mergeUnknownFields()
|
inline |
Definition at line 1140 of file MPVariableProto.java.
◆ setBranchingPriority()
|
inline |
optional int32 branching_priority = 6 [default = 0];
- Parameters
-
value The branchingPriority to set.
- Returns
- This builder for chaining.
Definition at line 1117 of file MPVariableProto.java.
◆ setField()
|
inline |
Definition at line 690 of file MPVariableProto.java.
◆ setIsInteger()
|
inline |
True if the variable is constrained to be integer. Ignored if MPModelProto::solver_type is *LINEAR_PROGRAMMING*.
optional bool is_integer = 4 [default = false];
- Parameters
-
value The isInteger to set.
- Returns
- This builder for chaining.
Definition at line 965 of file MPVariableProto.java.
◆ setLowerBound()
|
inline |
lower_bound must be <= upper_bound.
optional double lower_bound = 1 [default = -inf];
- Parameters
-
value The lowerBound to set.
- Returns
- This builder for chaining.
Definition at line 813 of file MPVariableProto.java.
◆ setName()
|
inline |
The name of the variable.
optional string name = 5 [default = ""];
- Parameters
-
value The name to set.
- Returns
- This builder for chaining.
Definition at line 1051 of file MPVariableProto.java.
◆ setNameBytes()
|
inline |
The name of the variable.
optional string name = 5 [default = ""];
- Parameters
-
value The bytes for name to set.
- Returns
- This builder for chaining.
Definition at line 1084 of file MPVariableProto.java.
◆ setObjectiveCoefficient()
|
inline |
The coefficient of the variable in the objective. Must be finite.
optional double objective_coefficient = 3 [default = 0];
- Parameters
-
value The objectiveCoefficient to set.
- Returns
- This builder for chaining.
Definition at line 907 of file MPVariableProto.java.
◆ setRepeatedField()
|
inline |
Definition at line 706 of file MPVariableProto.java.
◆ setUnknownFields()
|
inline |
Definition at line 1134 of file MPVariableProto.java.
◆ setUpperBound()
|
inline |
optional double upper_bound = 2 [default = inf];
- Parameters
-
value The upperBound to set.
- Returns
- This builder for chaining.
Definition at line 856 of file MPVariableProto.java.
The documentation for this class was generated from the following file: