Google OR-Tools v9.12
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
 

Protected Member Functions

com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable ()
 
Builder newBuilderForType (com.google.protobuf.GeneratedMessage.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 27 of file MPVariableProto.java.

Member Function Documentation

◆ equals()

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

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

◆ getDefaultInstance()

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

Definition at line 1082 of file MPVariableProto.java.

◆ getDefaultInstanceForType()

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

Definition at line 1118 of file MPVariableProto.java.

◆ getDescriptor()

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

Definition at line 52 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 163 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 88 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 191 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 215 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 134 of file MPVariableProto.java.

◆ getParserForType()

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

Definition at line 1113 of file MPVariableProto.java.

◆ getSerializedSize()

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

Definition at line 283 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 107 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 235 of file MPVariableProto.java.

◆ hashCode()

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

Definition at line 364 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 150 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 76 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 179 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 122 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 99 of file MPVariableProto.java.

◆ internalGetFieldAccessorTable()

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

Definition at line 58 of file MPVariableProto.java.

◆ isInitialized()

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

Definition at line 249 of file MPVariableProto.java.

◆ newBuilder() [1/2]

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

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

◆ newBuilderForType() [1/2]

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

Definition at line 476 of file MPVariableProto.java.

◆ newBuilderForType() [2/2]

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

Definition at line 490 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 448 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 454 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 425 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 429 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 414 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 419 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 461 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 467 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 435 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 440 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 403 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 408 of file MPVariableProto.java.

◆ parser()

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

Definition at line 1108 of file MPVariableProto.java.

◆ toBuilder()

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

Definition at line 484 of file MPVariableProto.java.

◆ writeTo()

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

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

◆ IS_INTEGER_FIELD_NUMBER

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

Definition at line 138 of file MPVariableProto.java.

◆ LOWER_BOUND_FIELD_NUMBER

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

Definition at line 65 of file MPVariableProto.java.

◆ NAME_FIELD_NUMBER

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

Definition at line 167 of file MPVariableProto.java.

◆ OBJECTIVE_COEFFICIENT_FIELD_NUMBER

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

Definition at line 111 of file MPVariableProto.java.

◆ UPPER_BOUND_FIELD_NUMBER

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

Definition at line 92 of file MPVariableProto.java.


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