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

Classes

class  Builder
 

Public Member Functions

boolean hasLowerBound ()
 
double getLowerBound ()
 
boolean hasUpperBound ()
 
double getUpperBound ()
 
boolean hasObjectiveCoefficient ()
 
double getObjectiveCoefficient ()
 
boolean hasIsInteger ()
 
boolean getIsInteger ()
 
boolean hasName ()
 
java.lang.String getName ()
 
com.google.protobuf.ByteString getNameBytes ()
 
boolean hasBranchingPriority ()
 
int getBranchingPriority ()
 
final boolean isInitialized ()
 
void writeTo (com.google.protobuf.CodedOutputStream output) throws java.io.IOException
 
int getSerializedSize ()
 
boolean equals (final java.lang.Object obj)
 
int hashCode ()
 
Builder newBuilderForType ()
 
Builder toBuilder ()
 
com.google.protobuf.Parser< MPVariableProtogetParserForType ()
 
com.google.ortools.linearsolver.MPVariableProto getDefaultInstanceForType ()
 

Static Public Member Functions

static final com.google.protobuf.Descriptors.Descriptor getDescriptor ()
 
static com.google.ortools.linearsolver.MPVariableProto parseFrom (java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
 
static com.google.ortools.linearsolver.MPVariableProto parseFrom (java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
 
static com.google.ortools.linearsolver.MPVariableProto parseFrom (com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
 
static com.google.ortools.linearsolver.MPVariableProto parseFrom (com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
 
static com.google.ortools.linearsolver.MPVariableProto parseFrom (byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
 
static com.google.ortools.linearsolver.MPVariableProto parseFrom (byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
 
static com.google.ortools.linearsolver.MPVariableProto parseFrom (java.io.InputStream input) throws java.io.IOException
 
static com.google.ortools.linearsolver.MPVariableProto parseFrom (java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
 
static com.google.ortools.linearsolver.MPVariableProto parseDelimitedFrom (java.io.InputStream input) throws java.io.IOException
 
static com.google.ortools.linearsolver.MPVariableProto parseDelimitedFrom (java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
 
static com.google.ortools.linearsolver.MPVariableProto parseFrom (com.google.protobuf.CodedInputStream input) throws java.io.IOException
 
static com.google.ortools.linearsolver.MPVariableProto parseFrom (com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
 
static Builder newBuilder ()
 
static Builder newBuilder (com.google.ortools.linearsolver.MPVariableProto prototype)
 
static com.google.ortools.linearsolver.MPVariableProto getDefaultInstance ()
 
static com.google.protobuf.Parser< MPVariableProtoparser ()
 

Static Public Attributes

static final int LOWER_BOUND_FIELD_NUMBER = 1
 
static final int UPPER_BOUND_FIELD_NUMBER = 2
 
static final int OBJECTIVE_COEFFICIENT_FIELD_NUMBER = 3
 
static final int IS_INTEGER_FIELD_NUMBER = 4
 
static final int NAME_FIELD_NUMBER = 5
 
static final int BRANCHING_PRIORITY_FIELD_NUMBER = 6
 
static final com.google.protobuf.Parser< MPVariableProtoPARSER
 

Protected Member Functions

java.lang.Object newInstance (UnusedPrivateParameter unused)
 
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable ()
 
Builder newBuilderForType (com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
 

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 type operations_research.MPVariableProto

Definition at line 26 of file MPVariableProto.java.

Member Function Documentation

◆ equals()

boolean com.google.ortools.linearsolver.MPVariableProto.equals ( final java.lang.Object obj)

Definition at line 314 of file MPVariableProto.java.

◆ getBranchingPriority()

int com.google.ortools.linearsolver.MPVariableProto.getBranchingPriority ( )

optional int32 branching_priority = 6 [default = 0];

Returns
The branchingPriority.

Implements com.google.ortools.linearsolver.MPVariableProtoOrBuilder.

Definition at line 240 of file MPVariableProto.java.

◆ getDefaultInstance()

static com.google.ortools.linearsolver.MPVariableProto com.google.ortools.linearsolver.MPVariableProto.getDefaultInstance ( )
static

Definition at line 1123 of file MPVariableProto.java.

◆ getDefaultInstanceForType()

com.google.ortools.linearsolver.MPVariableProto com.google.ortools.linearsolver.MPVariableProto.getDefaultInstanceForType ( )

Definition at line 1159 of file MPVariableProto.java.

◆ getDescriptor()

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

Definition at line 49 of file MPVariableProto.java.

◆ getIsInteger()

boolean com.google.ortools.linearsolver.MPVariableProto.getIsInteger ( )
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 com.google.ortools.linearsolver.MPVariableProtoOrBuilder.

Definition at line 160 of file MPVariableProto.java.

◆ getLowerBound()

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

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

Returns
The lowerBound.

Implements com.google.ortools.linearsolver.MPVariableProtoOrBuilder.

Definition at line 85 of file MPVariableProto.java.

◆ getName()

java.lang.String com.google.ortools.linearsolver.MPVariableProto.getName ( )
The name of the variable.

optional string name = 5 [default = ""];

Returns
The name.

Implements com.google.ortools.linearsolver.MPVariableProtoOrBuilder.

Definition at line 188 of file MPVariableProto.java.

◆ getNameBytes()

com.google.protobuf.ByteString com.google.ortools.linearsolver.MPVariableProto.getNameBytes ( )
The name of the variable.

optional string name = 5 [default = ""];

Returns
The bytes for name.

Implements com.google.ortools.linearsolver.MPVariableProtoOrBuilder.

Definition at line 212 of file MPVariableProto.java.

◆ getObjectiveCoefficient()

double com.google.ortools.linearsolver.MPVariableProto.getObjectiveCoefficient ( )
The coefficient of the variable in the objective. Must be finite.

optional double objective_coefficient = 3 [default = 0];

Returns
The objectiveCoefficient.

Implements com.google.ortools.linearsolver.MPVariableProtoOrBuilder.

Definition at line 131 of file MPVariableProto.java.

◆ getParserForType()

com.google.protobuf.Parser< MPVariableProto > com.google.ortools.linearsolver.MPVariableProto.getParserForType ( )

Definition at line 1154 of file MPVariableProto.java.

◆ getSerializedSize()

int com.google.ortools.linearsolver.MPVariableProto.getSerializedSize ( )

Definition at line 280 of file MPVariableProto.java.

◆ getUpperBound()

double com.google.ortools.linearsolver.MPVariableProto.getUpperBound ( )

optional double upper_bound = 2 [default = inf];

Returns
The upperBound.

Implements com.google.ortools.linearsolver.MPVariableProtoOrBuilder.

Definition at line 104 of file MPVariableProto.java.

◆ hasBranchingPriority()

boolean com.google.ortools.linearsolver.MPVariableProto.hasBranchingPriority ( )

optional int32 branching_priority = 6 [default = 0];

Returns
Whether the branchingPriority field is set.

Implements com.google.ortools.linearsolver.MPVariableProtoOrBuilder.

Definition at line 232 of file MPVariableProto.java.

◆ hashCode()

int com.google.ortools.linearsolver.MPVariableProto.hashCode ( )

Definition at line 361 of file MPVariableProto.java.

◆ hasIsInteger()

boolean com.google.ortools.linearsolver.MPVariableProto.hasIsInteger ( )
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 com.google.ortools.linearsolver.MPVariableProtoOrBuilder.

Definition at line 147 of file MPVariableProto.java.

◆ hasLowerBound()

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

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

Returns
Whether the lowerBound field is set.

Implements com.google.ortools.linearsolver.MPVariableProtoOrBuilder.

Definition at line 73 of file MPVariableProto.java.

◆ hasName()

boolean com.google.ortools.linearsolver.MPVariableProto.hasName ( )
The name of the variable.

optional string name = 5 [default = ""];

Returns
Whether the name field is set.

Implements com.google.ortools.linearsolver.MPVariableProtoOrBuilder.

Definition at line 176 of file MPVariableProto.java.

◆ hasObjectiveCoefficient()

boolean com.google.ortools.linearsolver.MPVariableProto.hasObjectiveCoefficient ( )
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 com.google.ortools.linearsolver.MPVariableProtoOrBuilder.

Definition at line 119 of file MPVariableProto.java.

◆ hasUpperBound()

boolean com.google.ortools.linearsolver.MPVariableProto.hasUpperBound ( )

optional double upper_bound = 2 [default = inf];

Returns
Whether the upperBound field is set.

Implements com.google.ortools.linearsolver.MPVariableProtoOrBuilder.

Definition at line 96 of file MPVariableProto.java.

◆ internalGetFieldAccessorTable()

com.google.protobuf.GeneratedMessageV3.FieldAccessorTable com.google.ortools.linearsolver.MPVariableProto.internalGetFieldAccessorTable ( )
protected

Definition at line 55 of file MPVariableProto.java.

◆ isInitialized()

final boolean com.google.ortools.linearsolver.MPVariableProto.isInitialized ( )

Definition at line 246 of file MPVariableProto.java.

◆ newBuilder() [1/2]

static Builder com.google.ortools.linearsolver.MPVariableProto.newBuilder ( )
static

Definition at line 474 of file MPVariableProto.java.

◆ newBuilder() [2/2]

static Builder com.google.ortools.linearsolver.MPVariableProto.newBuilder ( com.google.ortools.linearsolver.MPVariableProto prototype)
static

Definition at line 477 of file MPVariableProto.java.

◆ newBuilderForType() [1/2]

Builder com.google.ortools.linearsolver.MPVariableProto.newBuilderForType ( )

Definition at line 473 of file MPVariableProto.java.

◆ newBuilderForType() [2/2]

Builder com.google.ortools.linearsolver.MPVariableProto.newBuilderForType ( com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
protected

Definition at line 487 of file MPVariableProto.java.

◆ newInstance()

java.lang.Object com.google.ortools.linearsolver.MPVariableProto.newInstance ( UnusedPrivateParameter unused)
protected

Definition at line 43 of file MPVariableProto.java.

◆ parseDelimitedFrom() [1/2]

static com.google.ortools.linearsolver.MPVariableProto com.google.ortools.linearsolver.MPVariableProto.parseDelimitedFrom ( java.io.InputStream input) throws java.io.IOException
static

Definition at line 445 of file MPVariableProto.java.

◆ parseDelimitedFrom() [2/2]

static com.google.ortools.linearsolver.MPVariableProto com.google.ortools.linearsolver.MPVariableProto.parseDelimitedFrom ( java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry ) throws java.io.IOException
static

Definition at line 451 of file MPVariableProto.java.

◆ parseFrom() [1/10]

static com.google.ortools.linearsolver.MPVariableProto com.google.ortools.linearsolver.MPVariableProto.parseFrom ( byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
static

Definition at line 422 of file MPVariableProto.java.

◆ parseFrom() [2/10]

static com.google.ortools.linearsolver.MPVariableProto com.google.ortools.linearsolver.MPVariableProto.parseFrom ( byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry ) throws com.google.protobuf.InvalidProtocolBufferException
static

Definition at line 426 of file MPVariableProto.java.

◆ parseFrom() [3/10]

static com.google.ortools.linearsolver.MPVariableProto com.google.ortools.linearsolver.MPVariableProto.parseFrom ( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
static

Definition at line 411 of file MPVariableProto.java.

◆ parseFrom() [4/10]

static com.google.ortools.linearsolver.MPVariableProto com.google.ortools.linearsolver.MPVariableProto.parseFrom ( com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry ) throws com.google.protobuf.InvalidProtocolBufferException
static

Definition at line 416 of file MPVariableProto.java.

◆ parseFrom() [5/10]

static com.google.ortools.linearsolver.MPVariableProto com.google.ortools.linearsolver.MPVariableProto.parseFrom ( com.google.protobuf.CodedInputStream input) throws java.io.IOException
static

Definition at line 458 of file MPVariableProto.java.

◆ parseFrom() [6/10]

static com.google.ortools.linearsolver.MPVariableProto com.google.ortools.linearsolver.MPVariableProto.parseFrom ( com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry ) throws java.io.IOException
static

Definition at line 464 of file MPVariableProto.java.

◆ parseFrom() [7/10]

static com.google.ortools.linearsolver.MPVariableProto com.google.ortools.linearsolver.MPVariableProto.parseFrom ( java.io.InputStream input) throws java.io.IOException
static

Definition at line 432 of file MPVariableProto.java.

◆ parseFrom() [8/10]

static com.google.ortools.linearsolver.MPVariableProto com.google.ortools.linearsolver.MPVariableProto.parseFrom ( java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry ) throws java.io.IOException
static

Definition at line 437 of file MPVariableProto.java.

◆ parseFrom() [9/10]

static com.google.ortools.linearsolver.MPVariableProto com.google.ortools.linearsolver.MPVariableProto.parseFrom ( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
static

Definition at line 400 of file MPVariableProto.java.

◆ parseFrom() [10/10]

static com.google.ortools.linearsolver.MPVariableProto com.google.ortools.linearsolver.MPVariableProto.parseFrom ( java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry ) throws com.google.protobuf.InvalidProtocolBufferException
static

Definition at line 405 of file MPVariableProto.java.

◆ parser()

static com.google.protobuf.Parser< MPVariableProto > com.google.ortools.linearsolver.MPVariableProto.parser ( )
static

Definition at line 1149 of file MPVariableProto.java.

◆ toBuilder()

Builder com.google.ortools.linearsolver.MPVariableProto.toBuilder ( )

Definition at line 481 of file MPVariableProto.java.

◆ writeTo()

void com.google.ortools.linearsolver.MPVariableProto.writeTo ( com.google.protobuf.CodedOutputStream output) throws java.io.IOException

Definition at line 256 of file MPVariableProto.java.

Member Data Documentation

◆ BRANCHING_PRIORITY_FIELD_NUMBER

final int com.google.ortools.linearsolver.MPVariableProto.BRANCHING_PRIORITY_FIELD_NUMBER = 6
static

Definition at line 225 of file MPVariableProto.java.

◆ IS_INTEGER_FIELD_NUMBER

final int com.google.ortools.linearsolver.MPVariableProto.IS_INTEGER_FIELD_NUMBER = 4
static

Definition at line 135 of file MPVariableProto.java.

◆ LOWER_BOUND_FIELD_NUMBER

final int com.google.ortools.linearsolver.MPVariableProto.LOWER_BOUND_FIELD_NUMBER = 1
static

Definition at line 62 of file MPVariableProto.java.

◆ NAME_FIELD_NUMBER

final int com.google.ortools.linearsolver.MPVariableProto.NAME_FIELD_NUMBER = 5
static

Definition at line 164 of file MPVariableProto.java.

◆ OBJECTIVE_COEFFICIENT_FIELD_NUMBER

final int com.google.ortools.linearsolver.MPVariableProto.OBJECTIVE_COEFFICIENT_FIELD_NUMBER = 3
static

Definition at line 108 of file MPVariableProto.java.

◆ PARSER

final com.google.protobuf.Parser<MPVariableProto> com.google.ortools.linearsolver.MPVariableProto.PARSER
static
Initial value:
= new com.google.protobuf.AbstractParser<MPVariableProto>() {
@java.lang.Override
public MPVariableProto parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
}

Definition at line 1128 of file MPVariableProto.java.

◆ UPPER_BOUND_FIELD_NUMBER

final int com.google.ortools.linearsolver.MPVariableProto.UPPER_BOUND_FIELD_NUMBER = 2
static

Definition at line 89 of file MPVariableProto.java.


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