Google OR-Tools v9.14
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
com.google.ortools.linearsolver.MPVariableProto Class 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 type operations_research.MPVariableProto

Definition at line 28 of file MPVariableProto.java.

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

Protected Member Functions

com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable ()
Builder newBuilderForType (com.google.protobuf.GeneratedMessage.BuilderParent parent)

Member Function Documentation

◆ equals()

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

Definition at line 318 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 244 of file MPVariableProto.java.

◆ getDefaultInstance()

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

Definition at line 1083 of file MPVariableProto.java.

◆ getDefaultInstanceForType()

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

Definition at line 1119 of file MPVariableProto.java.

◆ getDescriptor()

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

Definition at line 53 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 164 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 89 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 192 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 216 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 135 of file MPVariableProto.java.

◆ getParserForType()

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

Definition at line 1114 of file MPVariableProto.java.

◆ getSerializedSize()

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

Definition at line 284 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 108 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 236 of file MPVariableProto.java.

◆ hashCode()

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

Definition at line 365 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 151 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 77 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 180 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 123 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 100 of file MPVariableProto.java.

◆ internalGetFieldAccessorTable()

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

Definition at line 59 of file MPVariableProto.java.

◆ isInitialized()

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

Definition at line 250 of file MPVariableProto.java.

◆ newBuilder() [1/2]

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

Definition at line 478 of file MPVariableProto.java.

◆ newBuilder() [2/2]

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

Definition at line 481 of file MPVariableProto.java.

◆ newBuilderForType() [1/2]

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

Definition at line 477 of file MPVariableProto.java.

◆ newBuilderForType() [2/2]

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

Definition at line 491 of file MPVariableProto.java.

◆ parseDelimitedFrom() [1/2]

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

Definition at line 449 of file MPVariableProto.java.

◆ parseDelimitedFrom() [2/2]

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 455 of file MPVariableProto.java.

◆ parseFrom() [1/10]

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

Definition at line 426 of file MPVariableProto.java.

◆ parseFrom() [2/10]

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 430 of file MPVariableProto.java.

◆ parseFrom() [3/10]

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 415 of file MPVariableProto.java.

◆ parseFrom() [4/10]

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 420 of file MPVariableProto.java.

◆ parseFrom() [5/10]

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

Definition at line 462 of file MPVariableProto.java.

◆ parseFrom() [6/10]

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 468 of file MPVariableProto.java.

◆ parseFrom() [7/10]

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

Definition at line 436 of file MPVariableProto.java.

◆ parseFrom() [8/10]

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 441 of file MPVariableProto.java.

◆ parseFrom() [9/10]

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

Definition at line 404 of file MPVariableProto.java.

◆ parseFrom() [10/10]

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 409 of file MPVariableProto.java.

◆ parser()

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

Definition at line 1109 of file MPVariableProto.java.

◆ toBuilder()

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

Definition at line 485 of file MPVariableProto.java.

◆ writeTo()

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

Definition at line 260 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 229 of file MPVariableProto.java.

◆ IS_INTEGER_FIELD_NUMBER

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

Definition at line 139 of file MPVariableProto.java.

◆ LOWER_BOUND_FIELD_NUMBER

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

Definition at line 66 of file MPVariableProto.java.

◆ NAME_FIELD_NUMBER

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

Definition at line 168 of file MPVariableProto.java.

◆ OBJECTIVE_COEFFICIENT_FIELD_NUMBER

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

Definition at line 112 of file MPVariableProto.java.

◆ UPPER_BOUND_FIELD_NUMBER

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

Definition at line 93 of file MPVariableProto.java.


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