Java Reference

Java Reference

Detailed Description

Optimization objective.
This is in a message because decision problems don't have any objective.

Protobuf type

operations_research.sat.CpObjectiveProto

Definition at line 14 of file CpObjectiveProto.java.

Classes

class  Builder
 

Public Member Functions

.lang.Override final com.google.protobuf.UnknownFieldSet getUnknownFields ()
 
.lang.Override java.util.List< java.lang.Integer > getVarsList ()
 
int getVarsCount ()
 
int getVars (int index)
 
.lang.Override java.util.List< java.lang.Long > getCoeffsList ()
 repeated int64 coeffs = 4; More...
 
int getCoeffsCount ()
 repeated int64 coeffs = 4; More...
 
long getCoeffs (int index)
 repeated int64 coeffs = 4; More...
 
.lang.Override double getOffset ()
 
.lang.Override double getScalingFactor ()
 double scaling_factor = 3; More...
 
.lang.Override java.util.List< java.lang.Long > getDomainList ()
 
int getDomainCount ()
 
long getDomain (int index)
 
.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< CpObjectiveProtogetParserForType ()
 
.lang.Override com.google.ortools.sat.CpObjectiveProto getDefaultInstanceForType ()
 

Static Public Member Functions

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

Static Public Attributes

static final int VARS_FIELD_NUMBER = 1
 
static final int COEFFS_FIELD_NUMBER = 4
 
static final int OFFSET_FIELD_NUMBER = 2
 
static final int SCALING_FACTOR_FIELD_NUMBER = 3
 
static final int DOMAIN_FIELD_NUMBER = 5
 

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)

Definition at line 432 of file CpObjectiveProto.java.

◆ getCoeffs()

long getCoeffs ( int  index)

repeated int64 coeffs = 4;

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

Implements CpObjectiveProtoOrBuilder.

Definition at line 243 of file CpObjectiveProto.java.

◆ getCoeffsCount()

int getCoeffsCount ( )

repeated int64 coeffs = 4;

Returns
The count of coeffs.

Implements CpObjectiveProtoOrBuilder.

Definition at line 235 of file CpObjectiveProto.java.

◆ getCoeffsList()

.lang.Override java.util.List<java.lang.Long> getCoeffsList ( )

repeated int64 coeffs = 4;

Returns
A list containing the coeffs.

Implements CpObjectiveProtoOrBuilder.

Definition at line 228 of file CpObjectiveProto.java.

◆ getDefaultInstance()

static com.google.ortools.sat.CpObjectiveProto getDefaultInstance ( )
static

Definition at line 1219 of file CpObjectiveProto.java.

◆ getDefaultInstanceForType()

.lang.Override com.google.ortools.sat.CpObjectiveProto getDefaultInstanceForType ( )

Definition at line 1244 of file CpObjectiveProto.java.

◆ getDescriptor()

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

Definition at line 162 of file CpObjectiveProto.java.

◆ getDomain()

long getDomain ( int  index)
If non-empty, only look for an objective value in the given domain.
Note that this does not depend on the offset or scaling factor, it is a
domain on the sum of the objective terms only.

repeated int64 domain = 5;

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

Implements CpObjectiveProtoOrBuilder.

Definition at line 320 of file CpObjectiveProto.java.

◆ getDomainCount()

int getDomainCount ( )
If non-empty, only look for an objective value in the given domain.
Note that this does not depend on the offset or scaling factor, it is a
domain on the sum of the objective terms only.

repeated int64 domain = 5;

Returns
The count of domain.

Implements CpObjectiveProtoOrBuilder.

Definition at line 306 of file CpObjectiveProto.java.

◆ getDomainList()

.lang.Override java.util.List<java.lang.Long> getDomainList ( )
If non-empty, only look for an objective value in the given domain.
Note that this does not depend on the offset or scaling factor, it is a
domain on the sum of the objective terms only.

repeated int64 domain = 5;

Returns
A list containing the domain.

Implements CpObjectiveProtoOrBuilder.

Definition at line 293 of file CpObjectiveProto.java.

◆ getOffset()

.lang.Override double getOffset ( )
The displayed objective is always:
  scaling_factor * (sum(coefficients[i] * objective_vars[i]) + offset).
This is needed to have a consistent objective after presolve or when
scaling a double problem to express it with integers.
Note that if scaling_factor is zero, then it is assumed to be 1, so that by
default these fields have no effect.

double offset = 2;

Returns
The offset.

Implements CpObjectiveProtoOrBuilder.

Definition at line 264 of file CpObjectiveProto.java.

◆ getParserForType()

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

Definition at line 1239 of file CpObjectiveProto.java.

◆ getScalingFactor()

.lang.Override double getScalingFactor ( )

double scaling_factor = 3;

Returns
The scalingFactor.

Implements CpObjectiveProtoOrBuilder.

Definition at line 275 of file CpObjectiveProto.java.

◆ getSerializedSize()

.lang.Override int getSerializedSize ( )

Definition at line 371 of file CpObjectiveProto.java.

◆ getUnknownFields()

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

Definition at line 38 of file CpObjectiveProto.java.

◆ getVars()

int getVars ( int  index)
The linear terms of the objective to minimize.
For a maximization problem, one can negate all coefficients in the
objective and set a scaling_factor to -1.

repeated int32 vars = 1;

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

Implements CpObjectiveProtoOrBuilder.

Definition at line 215 of file CpObjectiveProto.java.

◆ getVarsCount()

int getVarsCount ( )
The linear terms of the objective to minimize.
For a maximization problem, one can negate all coefficients in the
objective and set a scaling_factor to -1.

repeated int32 vars = 1;

Returns
The count of vars.

Implements CpObjectiveProtoOrBuilder.

Definition at line 201 of file CpObjectiveProto.java.

◆ getVarsList()

.lang.Override java.util.List<java.lang.Integer> getVarsList ( )
The linear terms of the objective to minimize.
For a maximization problem, one can negate all coefficients in the
objective and set a scaling_factor to -1.

repeated int32 vars = 1;

Returns
A list containing the vars.

Implements CpObjectiveProtoOrBuilder.

Definition at line 188 of file CpObjectiveProto.java.

◆ hashCode()

.lang.Override int hashCode ( )

Definition at line 458 of file CpObjectiveProto.java.

◆ internalGetFieldAccessorTable()

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

Definition at line 168 of file CpObjectiveProto.java.

◆ isInitialized()

.lang.Override final boolean isInitialized ( )

Definition at line 327 of file CpObjectiveProto.java.

◆ newBuilder() [1/2]

static Builder newBuilder ( )
static

Definition at line 559 of file CpObjectiveProto.java.

◆ newBuilder() [2/2]

static Builder newBuilder ( com.google.ortools.sat.CpObjectiveProto  prototype)
static

Definition at line 562 of file CpObjectiveProto.java.

◆ newBuilderForType() [1/2]

.lang.Override Builder newBuilderForType ( )

Definition at line 558 of file CpObjectiveProto.java.

◆ newBuilderForType() [2/2]

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

Definition at line 572 of file CpObjectiveProto.java.

◆ newInstance()

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

Definition at line 31 of file CpObjectiveProto.java.

◆ parseDelimitedFrom() [1/2]

static com.google.ortools.sat.CpObjectiveProto parseDelimitedFrom ( java.io.InputStream  input) throws java.io.IOException
static

Definition at line 531 of file CpObjectiveProto.java.

◆ parseDelimitedFrom() [2/2]

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

Definition at line 536 of file CpObjectiveProto.java.

◆ parseFrom() [1/10]

static com.google.ortools.sat.CpObjectiveProto parseFrom ( byte[]  data) throws com.google.protobuf.InvalidProtocolBufferException
static

Definition at line 509 of file CpObjectiveProto.java.

◆ parseFrom() [2/10]

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

Definition at line 513 of file CpObjectiveProto.java.

◆ parseFrom() [3/10]

static com.google.ortools.sat.CpObjectiveProto parseFrom ( com.google.protobuf.ByteString  data) throws com.google.protobuf.InvalidProtocolBufferException
static

Definition at line 498 of file CpObjectiveProto.java.

◆ parseFrom() [4/10]

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

Definition at line 503 of file CpObjectiveProto.java.

◆ parseFrom() [5/10]

static com.google.ortools.sat.CpObjectiveProto parseFrom ( com.google.protobuf.CodedInputStream  input) throws java.io.IOException
static

Definition at line 543 of file CpObjectiveProto.java.

◆ parseFrom() [6/10]

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

Definition at line 549 of file CpObjectiveProto.java.

◆ parseFrom() [7/10]

static com.google.ortools.sat.CpObjectiveProto parseFrom ( java.io.InputStream  input) throws java.io.IOException
static

Definition at line 519 of file CpObjectiveProto.java.

◆ parseFrom() [8/10]

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

Definition at line 524 of file CpObjectiveProto.java.

◆ parseFrom() [9/10]

static com.google.ortools.sat.CpObjectiveProto parseFrom ( java.nio.ByteBuffer  data) throws com.google.protobuf.InvalidProtocolBufferException
static

Definition at line 487 of file CpObjectiveProto.java.

◆ parseFrom() [10/10]

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

Definition at line 492 of file CpObjectiveProto.java.

◆ parser()

static com.google.protobuf.Parser<CpObjectiveProto> parser ( )
static

Definition at line 1234 of file CpObjectiveProto.java.

◆ toBuilder()

.lang.Override Builder toBuilder ( )

Definition at line 566 of file CpObjectiveProto.java.

◆ writeTo()

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

Definition at line 337 of file CpObjectiveProto.java.

Member Data Documentation

◆ COEFFS_FIELD_NUMBER

final int COEFFS_FIELD_NUMBER = 4
static

Definition at line 220 of file CpObjectiveProto.java.

◆ DOMAIN_FIELD_NUMBER

final int DOMAIN_FIELD_NUMBER = 5
static

Definition at line 279 of file CpObjectiveProto.java.

◆ OFFSET_FIELD_NUMBER

final int OFFSET_FIELD_NUMBER = 2
static

Definition at line 248 of file CpObjectiveProto.java.

◆ SCALING_FACTOR_FIELD_NUMBER

final int SCALING_FACTOR_FIELD_NUMBER = 3
static

Definition at line 268 of file CpObjectiveProto.java.

◆ VARS_FIELD_NUMBER

final int VARS_FIELD_NUMBER = 1
static

Definition at line 174 of file CpObjectiveProto.java.


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