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

Classes

class  Builder
 

Public Member Functions

java.util.List< java.lang.Integer > getVarIndexList ()
 
int getVarIndexCount ()
 
int getVarIndex (int index)
 
java.util.List< java.lang.Double > getCoefficientList ()
 
int getCoefficientCount ()
 
double getCoefficient (int index)
 
boolean hasLowerBound ()
 
double getLowerBound ()
 
boolean hasUpperBound ()
 
double getUpperBound ()
 
boolean hasName ()
 
java.lang.String getName ()
 
com.google.protobuf.ByteString getNameBytes ()
 
boolean hasIsLazy ()
 
boolean getIsLazy ()
 
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< MPConstraintProtogetParserForType ()
 
com.google.ortools.linearsolver.MPConstraintProto getDefaultInstanceForType ()
 
- Public Member Functions inherited from com.google.ortools.linearsolver.MPConstraintProtoOrBuilder

Static Public Member Functions

static final com.google.protobuf.Descriptors.Descriptor getDescriptor ()
 
static com.google.ortools.linearsolver.MPConstraintProto parseFrom (java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
 
static com.google.ortools.linearsolver.MPConstraintProto parseFrom (java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
 
static com.google.ortools.linearsolver.MPConstraintProto parseFrom (com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
 
static com.google.ortools.linearsolver.MPConstraintProto parseFrom (com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
 
static com.google.ortools.linearsolver.MPConstraintProto parseFrom (byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
 
static com.google.ortools.linearsolver.MPConstraintProto parseFrom (byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
 
static com.google.ortools.linearsolver.MPConstraintProto parseFrom (java.io.InputStream input) throws java.io.IOException
 
static com.google.ortools.linearsolver.MPConstraintProto parseFrom (java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
 
static com.google.ortools.linearsolver.MPConstraintProto parseDelimitedFrom (java.io.InputStream input) throws java.io.IOException
 
static com.google.ortools.linearsolver.MPConstraintProto parseDelimitedFrom (java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
 
static com.google.ortools.linearsolver.MPConstraintProto parseFrom (com.google.protobuf.CodedInputStream input) throws java.io.IOException
 
static com.google.ortools.linearsolver.MPConstraintProto 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.MPConstraintProto prototype)
 
static com.google.ortools.linearsolver.MPConstraintProto getDefaultInstance ()
 
static com.google.protobuf.Parser< MPConstraintProtoparser ()
 

Static Public Attributes

static final int VAR_INDEX_FIELD_NUMBER = 6
 
static final int COEFFICIENT_FIELD_NUMBER = 7
 
static final int LOWER_BOUND_FIELD_NUMBER = 2
 
static final int UPPER_BOUND_FIELD_NUMBER = 3
 
static final int NAME_FIELD_NUMBER = 4
 
static final int IS_LAZY_FIELD_NUMBER = 5
 

Protected Member Functions

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

Detailed Description

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 24 of file MPConstraintProto.java.

Member Function Documentation

◆ equals()

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

Definition at line 393 of file MPConstraintProto.java.

◆ getCoefficient()

double com.google.ortools.linearsolver.MPConstraintProto.getCoefficient ( int index)
Must be finite.

repeated double coefficient = 7 [packed = true];

Parameters
indexThe index of the element to return.
Returns
The coefficient at the given index.

Implements com.google.ortools.linearsolver.MPConstraintProtoOrBuilder.

Definition at line 152 of file MPConstraintProto.java.

◆ getCoefficientCount()

int com.google.ortools.linearsolver.MPConstraintProto.getCoefficientCount ( )
Must be finite.

repeated double coefficient = 7 [packed = true];

Returns
The count of coefficient.

Implements com.google.ortools.linearsolver.MPConstraintProtoOrBuilder.

Definition at line 140 of file MPConstraintProto.java.

◆ getCoefficientList()

java.util.List< java.lang.Double > com.google.ortools.linearsolver.MPConstraintProto.getCoefficientList ( )
Must be finite.

repeated double coefficient = 7 [packed = true];

Returns
A list containing the coefficient.

Implements com.google.ortools.linearsolver.MPConstraintProtoOrBuilder.

Definition at line 129 of file MPConstraintProto.java.

◆ getDefaultInstance()

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

Definition at line 1350 of file MPConstraintProto.java.

◆ getDefaultInstanceForType()

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

Definition at line 1386 of file MPConstraintProto.java.

◆ getDescriptor()

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

Definition at line 51 of file MPConstraintProto.java.

◆ getIsLazy()

boolean com.google.ortools.linearsolver.MPConstraintProto.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];

Returns
The isLazy.

Implements com.google.ortools.linearsolver.MPConstraintProtoOrBuilder.

Definition at line 293 of file MPConstraintProto.java.

◆ getLowerBound()

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

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

Returns
The lowerBound.

Implements com.google.ortools.linearsolver.MPConstraintProtoOrBuilder.

Definition at line 180 of file MPConstraintProto.java.

◆ getName()

java.lang.String com.google.ortools.linearsolver.MPConstraintProto.getName ( )
The name of the constraint.

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

Returns
The name.

Implements com.google.ortools.linearsolver.MPConstraintProtoOrBuilder.

Definition at line 227 of file MPConstraintProto.java.

◆ getNameBytes()

com.google.protobuf.ByteString com.google.ortools.linearsolver.MPConstraintProto.getNameBytes ( )
The name of the constraint.

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

Returns
The bytes for name.

Implements com.google.ortools.linearsolver.MPConstraintProtoOrBuilder.

Definition at line 251 of file MPConstraintProto.java.

◆ getParserForType()

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

Definition at line 1381 of file MPConstraintProto.java.

◆ getSerializedSize()

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

Definition at line 342 of file MPConstraintProto.java.

◆ getUpperBound()

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

optional double upper_bound = 3 [default = inf];

Returns
The upperBound.

Implements com.google.ortools.linearsolver.MPConstraintProtoOrBuilder.

Definition at line 199 of file MPConstraintProto.java.

◆ getVarIndex()

int com.google.ortools.linearsolver.MPConstraintProto.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];

Parameters
indexThe index of the element to return.
Returns
The varIndex at the given index.

Implements com.google.ortools.linearsolver.MPConstraintProtoOrBuilder.

Definition at line 110 of file MPConstraintProto.java.

◆ getVarIndexCount()

int com.google.ortools.linearsolver.MPConstraintProto.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];

Returns
The count of varIndex.

Implements com.google.ortools.linearsolver.MPConstraintProtoOrBuilder.

Definition at line 95 of file MPConstraintProto.java.

◆ getVarIndexList()

java.util.List< java.lang.Integer > com.google.ortools.linearsolver.MPConstraintProto.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];

Returns
A list containing the varIndex.

Implements com.google.ortools.linearsolver.MPConstraintProtoOrBuilder.

Definition at line 81 of file MPConstraintProto.java.

◆ hashCode()

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

Definition at line 433 of file MPConstraintProto.java.

◆ hasIsLazy()

boolean com.google.ortools.linearsolver.MPConstraintProto.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];

Returns
Whether the isLazy field is set.

Implements com.google.ortools.linearsolver.MPConstraintProtoOrBuilder.

Definition at line 278 of file MPConstraintProto.java.

◆ hasLowerBound()

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

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

Returns
Whether the lowerBound field is set.

Implements com.google.ortools.linearsolver.MPConstraintProtoOrBuilder.

Definition at line 168 of file MPConstraintProto.java.

◆ hasName()

boolean com.google.ortools.linearsolver.MPConstraintProto.hasName ( )
The name of the constraint.

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

Returns
Whether the name field is set.

Implements com.google.ortools.linearsolver.MPConstraintProtoOrBuilder.

Definition at line 215 of file MPConstraintProto.java.

◆ hasUpperBound()

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

optional double upper_bound = 3 [default = inf];

Returns
Whether the upperBound field is set.

Implements com.google.ortools.linearsolver.MPConstraintProtoOrBuilder.

Definition at line 191 of file MPConstraintProto.java.

◆ internalGetFieldAccessorTable()

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

Definition at line 57 of file MPConstraintProto.java.

◆ isInitialized()

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

Definition at line 299 of file MPConstraintProto.java.

◆ newBuilder() [1/2]

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

Definition at line 545 of file MPConstraintProto.java.

◆ newBuilder() [2/2]

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

Definition at line 548 of file MPConstraintProto.java.

◆ newBuilderForType() [1/2]

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

Definition at line 544 of file MPConstraintProto.java.

◆ newBuilderForType() [2/2]

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

Definition at line 558 of file MPConstraintProto.java.

◆ parseDelimitedFrom() [1/2]

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

Definition at line 516 of file MPConstraintProto.java.

◆ parseDelimitedFrom() [2/2]

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

Definition at line 522 of file MPConstraintProto.java.

◆ parseFrom() [1/10]

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

Definition at line 493 of file MPConstraintProto.java.

◆ parseFrom() [2/10]

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

Definition at line 497 of file MPConstraintProto.java.

◆ parseFrom() [3/10]

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

Definition at line 482 of file MPConstraintProto.java.

◆ parseFrom() [4/10]

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

Definition at line 487 of file MPConstraintProto.java.

◆ parseFrom() [5/10]

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

Definition at line 529 of file MPConstraintProto.java.

◆ parseFrom() [6/10]

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

Definition at line 535 of file MPConstraintProto.java.

◆ parseFrom() [7/10]

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

Definition at line 503 of file MPConstraintProto.java.

◆ parseFrom() [8/10]

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

Definition at line 508 of file MPConstraintProto.java.

◆ parseFrom() [9/10]

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

Definition at line 471 of file MPConstraintProto.java.

◆ parseFrom() [10/10]

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

Definition at line 476 of file MPConstraintProto.java.

◆ parser()

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

Definition at line 1376 of file MPConstraintProto.java.

◆ toBuilder()

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

Definition at line 552 of file MPConstraintProto.java.

◆ writeTo()

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

Definition at line 309 of file MPConstraintProto.java.

Member Data Documentation

◆ COEFFICIENT_FIELD_NUMBER

final int com.google.ortools.linearsolver.MPConstraintProto.COEFFICIENT_FIELD_NUMBER = 7
static

Definition at line 115 of file MPConstraintProto.java.

◆ IS_LAZY_FIELD_NUMBER

final int com.google.ortools.linearsolver.MPConstraintProto.IS_LAZY_FIELD_NUMBER = 5
static

Definition at line 264 of file MPConstraintProto.java.

◆ LOWER_BOUND_FIELD_NUMBER

final int com.google.ortools.linearsolver.MPConstraintProto.LOWER_BOUND_FIELD_NUMBER = 2
static

Definition at line 157 of file MPConstraintProto.java.

◆ NAME_FIELD_NUMBER

final int com.google.ortools.linearsolver.MPConstraintProto.NAME_FIELD_NUMBER = 4
static

Definition at line 203 of file MPConstraintProto.java.

◆ UPPER_BOUND_FIELD_NUMBER

final int com.google.ortools.linearsolver.MPConstraintProto.UPPER_BOUND_FIELD_NUMBER = 3
static

Definition at line 184 of file MPConstraintProto.java.

◆ VAR_INDEX_FIELD_NUMBER

final int com.google.ortools.linearsolver.MPConstraintProto.VAR_INDEX_FIELD_NUMBER = 6
static

Definition at line 64 of file MPConstraintProto.java.


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