Java Reference

Java Reference

MPConstraintProto

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

Classes

class  Builder
 

Public Member Functions

.lang.Override final com.google.protobuf.UnknownFieldSet getUnknownFields ()
 
.lang.Override java.util.List< java.lang.Integer > getVarIndexList ()
 
int getVarIndexCount ()
 
int getVarIndex (int index)
 
.lang.Override java.util.List< java.lang.Double > getCoefficientList ()
 
int getCoefficientCount ()
 
double getCoefficient (int index)
 
.lang.Override boolean hasLowerBound ()
 
.lang.Override double getLowerBound ()
 
.lang.Override boolean hasUpperBound ()
 optional double upper_bound = 3 [default = inf]; More...
 
.lang.Override double getUpperBound ()
 optional double upper_bound = 3 [default = inf]; More...
 
.lang.Override boolean hasName ()
 
.lang.Override java.lang.String getName ()
 
.lang.Override com.google.protobuf.ByteString getNameBytes ()
 
.lang.Override boolean hasIsLazy ()
 
.lang.Override boolean getIsLazy ()
 
.lang.Override final boolean isInitialized ()
 
.lang.Override void writeTo (com.google.protobuf.CodedOutputStream output) throws java.io.IOException
 
.lang.Override int getSerializedSize ()
 
.lang.Override boolean equals (final java.lang.Object obj)
 
.lang.Override int hashCode ()
 
.lang.Override Builder newBuilderForType ()
 
.lang.Override Builder toBuilder ()
 
.lang.Override com.google.protobuf.Parser< MPConstraintProtogetParserForType ()
 
.lang.Override com.google.ortools.linearsolver.MPConstraintProto getDefaultInstanceForType ()
 

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
 
.lang.Deprecated static final com.google.protobuf.Parser< MPConstraintProtoPARSER
 

Protected Member Functions

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

Member Function Documentation

◆ equals()

.lang.Override boolean equals ( final java.lang.Object  obj)
inline

Definition at line 497 of file MPConstraintProto.java.

◆ getCoefficient()

double getCoefficient ( int  index)
inline
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 MPConstraintProtoOrBuilder.

Definition at line 257 of file MPConstraintProto.java.

◆ getCoefficientCount()

int getCoefficientCount ( )
inline
Must be finite.

repeated double coefficient = 7 [packed = true];

Returns
The count of coefficient.

Implements MPConstraintProtoOrBuilder.

Definition at line 245 of file MPConstraintProto.java.

◆ getCoefficientList()

.lang.Override java.util.List<java.lang.Double> getCoefficientList ( )
inline
Must be finite.

repeated double coefficient = 7 [packed = true];

Returns
A list containing the coefficient.

Implements MPConstraintProtoOrBuilder.

Definition at line 234 of file MPConstraintProto.java.

◆ getDefaultInstance()

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

Definition at line 1421 of file MPConstraintProto.java.

◆ getDefaultInstanceForType()

.lang.Override com.google.ortools.linearsolver.MPConstraintProto getDefaultInstanceForType ( )
inline

Definition at line 1446 of file MPConstraintProto.java.

◆ getDescriptor()

static final com.google.protobuf.Descriptors.Descriptor getDescriptor ( )
inlinestatic

Definition at line 160 of file MPConstraintProto.java.

◆ getIsLazy()

.lang.Override boolean getIsLazy ( )
inline
[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 MPConstraintProtoOrBuilder.

Definition at line 397 of file MPConstraintProto.java.

◆ getLowerBound()

.lang.Override double getLowerBound ( )
inline
lower_bound must be <= upper_bound.

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

Returns
The lowerBound.

Implements MPConstraintProtoOrBuilder.

Definition at line 285 of file MPConstraintProto.java.

◆ getName()

.lang.Override java.lang.String getName ( )
inline
The name of the constraint.

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

Returns
The name.

Implements MPConstraintProtoOrBuilder.

Definition at line 331 of file MPConstraintProto.java.

◆ getNameBytes()

.lang.Override com.google.protobuf.ByteString getNameBytes ( )
inline
The name of the constraint.

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

Returns
The bytes for name.

Implements MPConstraintProtoOrBuilder.

Definition at line 355 of file MPConstraintProto.java.

◆ getParserForType()

.lang.Override com.google.protobuf.Parser<MPConstraintProto> getParserForType ( )
inline

Definition at line 1441 of file MPConstraintProto.java.

◆ getSerializedSize()

.lang.Override int getSerializedSize ( )
inline

Definition at line 446 of file MPConstraintProto.java.

◆ getUnknownFields()

.lang.Override final com.google.protobuf.UnknownFieldSet getUnknownFields ( )
inline

Definition at line 49 of file MPConstraintProto.java.

◆ getUpperBound()

.lang.Override double getUpperBound ( )
inline

optional double upper_bound = 3 [default = inf];

Returns
The upperBound.

Implements MPConstraintProtoOrBuilder.

Definition at line 304 of file MPConstraintProto.java.

◆ getVarIndex()

int getVarIndex ( int  index)
inline
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 MPConstraintProtoOrBuilder.

Definition at line 217 of file MPConstraintProto.java.

◆ getVarIndexCount()

int getVarIndexCount ( )
inline
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 MPConstraintProtoOrBuilder.

Definition at line 202 of file MPConstraintProto.java.

◆ getVarIndexList()

.lang.Override java.util.List<java.lang.Integer> getVarIndexList ( )
inline
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 MPConstraintProtoOrBuilder.

Definition at line 188 of file MPConstraintProto.java.

◆ hashCode()

.lang.Override int hashCode ( )
inline

Definition at line 537 of file MPConstraintProto.java.

◆ hasIsLazy()

.lang.Override boolean hasIsLazy ( )
inline
[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 MPConstraintProtoOrBuilder.

Definition at line 382 of file MPConstraintProto.java.

◆ hasLowerBound()

.lang.Override boolean hasLowerBound ( )
inline
lower_bound must be <= upper_bound.

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

Returns
Whether the lowerBound field is set.

Implements MPConstraintProtoOrBuilder.

Definition at line 273 of file MPConstraintProto.java.

◆ hasName()

.lang.Override boolean hasName ( )
inline
The name of the constraint.

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

Returns
Whether the name field is set.

Implements MPConstraintProtoOrBuilder.

Definition at line 319 of file MPConstraintProto.java.

◆ hasUpperBound()

.lang.Override boolean hasUpperBound ( )
inline

optional double upper_bound = 3 [default = inf];

Returns
Whether the upperBound field is set.

Implements MPConstraintProtoOrBuilder.

Definition at line 296 of file MPConstraintProto.java.

◆ internalGetFieldAccessorTable()

.lang.Override com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable ( )
inlineprotected

Definition at line 166 of file MPConstraintProto.java.

◆ isInitialized()

.lang.Override final boolean isInitialized ( )
inline

Definition at line 403 of file MPConstraintProto.java.

◆ newBuilder() [1/2]

static Builder newBuilder ( )
inlinestatic

Definition at line 647 of file MPConstraintProto.java.

◆ newBuilder() [2/2]

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

Definition at line 650 of file MPConstraintProto.java.

◆ newBuilderForType() [1/2]

.lang.Override Builder newBuilderForType ( )
inline

Definition at line 646 of file MPConstraintProto.java.

◆ newBuilderForType() [2/2]

.lang.Override Builder newBuilderForType ( com.google.protobuf.GeneratedMessageV3.BuilderParent  parent)
inlineprotected

Definition at line 660 of file MPConstraintProto.java.

◆ newInstance()

.lang.Override java.lang.Object newInstance ( UnusedPrivateParameter  unused)
inlineprotected

Definition at line 42 of file MPConstraintProto.java.

◆ parseDelimitedFrom() [1/2]

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

Definition at line 619 of file MPConstraintProto.java.

◆ parseDelimitedFrom() [2/2]

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

Definition at line 624 of file MPConstraintProto.java.

◆ parseFrom() [1/10]

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

Definition at line 597 of file MPConstraintProto.java.

◆ parseFrom() [2/10]

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

Definition at line 601 of file MPConstraintProto.java.

◆ parseFrom() [3/10]

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

Definition at line 586 of file MPConstraintProto.java.

◆ parseFrom() [4/10]

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

Definition at line 591 of file MPConstraintProto.java.

◆ parseFrom() [5/10]

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

Definition at line 631 of file MPConstraintProto.java.

◆ parseFrom() [6/10]

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

Definition at line 637 of file MPConstraintProto.java.

◆ parseFrom() [7/10]

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

Definition at line 607 of file MPConstraintProto.java.

◆ parseFrom() [8/10]

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

Definition at line 612 of file MPConstraintProto.java.

◆ parseFrom() [9/10]

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

Definition at line 575 of file MPConstraintProto.java.

◆ parseFrom() [10/10]

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

Definition at line 580 of file MPConstraintProto.java.

◆ parser()

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

Definition at line 1436 of file MPConstraintProto.java.

◆ toBuilder()

.lang.Override Builder toBuilder ( )
inline

Definition at line 654 of file MPConstraintProto.java.

◆ writeTo()

.lang.Override void writeTo ( com.google.protobuf.CodedOutputStream  output) throws java.io.IOException
inline

Definition at line 413 of file MPConstraintProto.java.

Member Data Documentation

◆ COEFFICIENT_FIELD_NUMBER

final int COEFFICIENT_FIELD_NUMBER = 7
static

Definition at line 222 of file MPConstraintProto.java.

◆ IS_LAZY_FIELD_NUMBER

final int IS_LAZY_FIELD_NUMBER = 5
static

Definition at line 368 of file MPConstraintProto.java.

◆ LOWER_BOUND_FIELD_NUMBER

final int LOWER_BOUND_FIELD_NUMBER = 2
static

Definition at line 262 of file MPConstraintProto.java.

◆ NAME_FIELD_NUMBER

final int NAME_FIELD_NUMBER = 4
static

Definition at line 308 of file MPConstraintProto.java.

◆ PARSER

.lang.Deprecated static final com.google.protobuf.Parser<MPConstraintProto> PARSER
static
Initial value:
= new com.google.protobuf.AbstractParser<MPConstraintProto>() {
@java.lang.Override
public MPConstraintProto parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new MPConstraintProto(input, extensionRegistry);
}
}

Definition at line 1426 of file MPConstraintProto.java.

◆ UPPER_BOUND_FIELD_NUMBER

final int UPPER_BOUND_FIELD_NUMBER = 3
static

Definition at line 289 of file MPConstraintProto.java.

◆ VAR_INDEX_FIELD_NUMBER

final int VAR_INDEX_FIELD_NUMBER = 6
static

Definition at line 173 of file MPConstraintProto.java.


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