Google OR-Tools v9.9
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
com.google.ortools.sat.CpObjectiveProto Class Reference
Inheritance diagram for com.google.ortools.sat.CpObjectiveProto:
com.google.ortools.sat.CpObjectiveProtoOrBuilder

Classes

class  Builder
 

Public Member Functions

java.util.List< java.lang.Integer > getVarsList ()
 
int getVarsCount ()
 
int getVars (int index)
 
java.util.List< java.lang.Long > getCoeffsList ()
 
int getCoeffsCount ()
 
long getCoeffs (int index)
 
double getOffset ()
 
double getScalingFactor ()
 
java.util.List< java.lang.Long > getDomainList ()
 
int getDomainCount ()
 
long getDomain (int index)
 
boolean getScalingWasExact ()
 
long getIntegerBeforeOffset ()
 
long getIntegerAfterOffset ()
 
long getIntegerScalingFactor ()
 
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< CpObjectiveProtogetParserForType ()
 
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
 
static final int SCALING_WAS_EXACT_FIELD_NUMBER = 6
 
static final int INTEGER_BEFORE_OFFSET_FIELD_NUMBER = 7
 
static final int INTEGER_AFTER_OFFSET_FIELD_NUMBER = 9
 
static final int INTEGER_SCALING_FACTOR_FIELD_NUMBER = 8
 

Protected Member Functions

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

Detailed Description

Optimization objective.

Protobuf type operations_research.sat.CpObjectiveProto

Definition at line 14 of file CpObjectiveProto.java.

Member Function Documentation

◆ equals()

boolean com.google.ortools.sat.CpObjectiveProto.equals ( final java.lang.Object obj)

Definition at line 409 of file CpObjectiveProto.java.

◆ getCoeffs()

long com.google.ortools.sat.CpObjectiveProto.getCoeffs ( int index)

repeated int64 coeffs = 4;

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

Implements com.google.ortools.sat.CpObjectiveProtoOrBuilder.

Definition at line 122 of file CpObjectiveProto.java.

◆ getCoeffsCount()

int com.google.ortools.sat.CpObjectiveProto.getCoeffsCount ( )

repeated int64 coeffs = 4;

Returns
The count of coeffs.

Implements com.google.ortools.sat.CpObjectiveProtoOrBuilder.

Definition at line 114 of file CpObjectiveProto.java.

◆ getCoeffsList()

java.util.List< java.lang.Long > com.google.ortools.sat.CpObjectiveProto.getCoeffsList ( )

repeated int64 coeffs = 4;

Returns
A list containing the coeffs.

Implements com.google.ortools.sat.CpObjectiveProtoOrBuilder.

Definition at line 107 of file CpObjectiveProto.java.

◆ getDefaultInstance()

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

Definition at line 1552 of file CpObjectiveProto.java.

◆ getDefaultInstanceForType()

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

Definition at line 1588 of file CpObjectiveProto.java.

◆ getDescriptor()

static final com.google.protobuf.Descriptors.Descriptor com.google.ortools.sat.CpObjectiveProto.getDescriptor ( )
static

Definition at line 37 of file CpObjectiveProto.java.

◆ getDomain()

long com.google.ortools.sat.CpObjectiveProto.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 com.google.ortools.sat.CpObjectiveProtoOrBuilder.

Definition at line 202 of file CpObjectiveProto.java.

◆ getDomainCount()

int com.google.ortools.sat.CpObjectiveProto.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 com.google.ortools.sat.CpObjectiveProtoOrBuilder.

Definition at line 188 of file CpObjectiveProto.java.

◆ getDomainList()

java.util.List< java.lang.Long > com.google.ortools.sat.CpObjectiveProto.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 com.google.ortools.sat.CpObjectiveProtoOrBuilder.

Definition at line 175 of file CpObjectiveProto.java.

◆ getIntegerAfterOffset()

long com.google.ortools.sat.CpObjectiveProto.getIntegerAfterOffset ( )

int64 integer_after_offset = 9;

Returns
The integerAfterOffset.

Implements com.google.ortools.sat.CpObjectiveProtoOrBuilder.

Definition at line 259 of file CpObjectiveProto.java.

◆ getIntegerBeforeOffset()

long com.google.ortools.sat.CpObjectiveProto.getIntegerBeforeOffset ( )
Internal fields to recover a bound on the original integer objective from
the presolved one. Basically, initially the integer objective fit on an
int64 and is in [Initial_lb, Initial_ub]. During presolve, we might change
the linear expression to have a new domain [Presolved_lb, Presolved_ub]
that will also always fit on an int64.

The two domain will always be linked with an affine transformation between
the two of the form:
  old = (new + before_offset) * integer_scaling_factor + after_offset.
Note that we use both offsets to always be able to do the computation while
staying in the int64 domain. In particular, the after_offset will always
be in (-integer_scaling_factor, integer_scaling_factor).

int64 integer_before_offset = 7;

Returns
The integerBeforeOffset.

Implements com.google.ortools.sat.CpObjectiveProtoOrBuilder.

Definition at line 248 of file CpObjectiveProto.java.

◆ getIntegerScalingFactor()

long com.google.ortools.sat.CpObjectiveProto.getIntegerScalingFactor ( )

int64 integer_scaling_factor = 8;

Returns
The integerScalingFactor.

Implements com.google.ortools.sat.CpObjectiveProtoOrBuilder.

Definition at line 270 of file CpObjectiveProto.java.

◆ getOffset()

double com.google.ortools.sat.CpObjectiveProto.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 com.google.ortools.sat.CpObjectiveProtoOrBuilder.

Definition at line 144 of file CpObjectiveProto.java.

◆ getParserForType()

com.google.protobuf.Parser< CpObjectiveProto > com.google.ortools.sat.CpObjectiveProto.getParserForType ( )

Definition at line 1583 of file CpObjectiveProto.java.

◆ getScalingFactor()

double com.google.ortools.sat.CpObjectiveProto.getScalingFactor ( )

double scaling_factor = 3;

Returns
The scalingFactor.

Implements com.google.ortools.sat.CpObjectiveProtoOrBuilder.

Definition at line 155 of file CpObjectiveProto.java.

◆ getScalingWasExact()

boolean com.google.ortools.sat.CpObjectiveProto.getScalingWasExact ( )
Internal field. Do not set. When we scale a FloatObjectiveProto to a
integer version, we set this to true if the scaling was exact (i.e. all
original coeff were integer for instance).

TODO(user): Put the error bounds we computed instead?

bool scaling_was_exact = 6;

Returns
The scalingWasExact.

Implements com.google.ortools.sat.CpObjectiveProtoOrBuilder.

Definition at line 222 of file CpObjectiveProto.java.

◆ getSerializedSize()

int com.google.ortools.sat.CpObjectiveProto.getSerializedSize ( )

Definition at line 332 of file CpObjectiveProto.java.

◆ getVars()

int com.google.ortools.sat.CpObjectiveProto.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 scaling_factor to -1.

repeated int32 vars = 1;

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

Implements com.google.ortools.sat.CpObjectiveProtoOrBuilder.

Definition at line 92 of file CpObjectiveProto.java.

◆ getVarsCount()

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

repeated int32 vars = 1;

Returns
The count of vars.

Implements com.google.ortools.sat.CpObjectiveProtoOrBuilder.

Definition at line 78 of file CpObjectiveProto.java.

◆ getVarsList()

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

repeated int32 vars = 1;

Returns
A list containing the vars.

Implements com.google.ortools.sat.CpObjectiveProtoOrBuilder.

Definition at line 65 of file CpObjectiveProto.java.

◆ hashCode()

int com.google.ortools.sat.CpObjectiveProto.hashCode ( )

Definition at line 443 of file CpObjectiveProto.java.

◆ internalGetFieldAccessorTable()

com.google.protobuf.GeneratedMessageV3.FieldAccessorTable com.google.ortools.sat.CpObjectiveProto.internalGetFieldAccessorTable ( )
protected

Definition at line 43 of file CpObjectiveProto.java.

◆ isInitialized()

final boolean com.google.ortools.sat.CpObjectiveProto.isInitialized ( )

Definition at line 276 of file CpObjectiveProto.java.

◆ newBuilder() [1/2]

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

Definition at line 558 of file CpObjectiveProto.java.

◆ newBuilder() [2/2]

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

Definition at line 561 of file CpObjectiveProto.java.

◆ newBuilderForType() [1/2]

Builder com.google.ortools.sat.CpObjectiveProto.newBuilderForType ( )

Definition at line 557 of file CpObjectiveProto.java.

◆ newBuilderForType() [2/2]

Builder com.google.ortools.sat.CpObjectiveProto.newBuilderForType ( com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
protected

Definition at line 571 of file CpObjectiveProto.java.

◆ newInstance()

java.lang.Object com.google.ortools.sat.CpObjectiveProto.newInstance ( UnusedPrivateParameter unused)
protected

Definition at line 31 of file CpObjectiveProto.java.

◆ parseDelimitedFrom() [1/2]

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

Definition at line 529 of file CpObjectiveProto.java.

◆ parseDelimitedFrom() [2/2]

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

Definition at line 535 of file CpObjectiveProto.java.

◆ parseFrom() [1/10]

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

Definition at line 506 of file CpObjectiveProto.java.

◆ parseFrom() [2/10]

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

Definition at line 510 of file CpObjectiveProto.java.

◆ parseFrom() [3/10]

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

Definition at line 495 of file CpObjectiveProto.java.

◆ parseFrom() [4/10]

static com.google.ortools.sat.CpObjectiveProto 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 500 of file CpObjectiveProto.java.

◆ parseFrom() [5/10]

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

Definition at line 542 of file CpObjectiveProto.java.

◆ parseFrom() [6/10]

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

Definition at line 548 of file CpObjectiveProto.java.

◆ parseFrom() [7/10]

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

Definition at line 516 of file CpObjectiveProto.java.

◆ parseFrom() [8/10]

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

Definition at line 521 of file CpObjectiveProto.java.

◆ parseFrom() [9/10]

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

Definition at line 484 of file CpObjectiveProto.java.

◆ parseFrom() [10/10]

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

Definition at line 489 of file CpObjectiveProto.java.

◆ parser()

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

Definition at line 1578 of file CpObjectiveProto.java.

◆ toBuilder()

Builder com.google.ortools.sat.CpObjectiveProto.toBuilder ( )

Definition at line 565 of file CpObjectiveProto.java.

◆ writeTo()

void com.google.ortools.sat.CpObjectiveProto.writeTo ( com.google.protobuf.CodedOutputStream output) throws java.io.IOException

Definition at line 286 of file CpObjectiveProto.java.

Member Data Documentation

◆ COEFFS_FIELD_NUMBER

final int com.google.ortools.sat.CpObjectiveProto.COEFFS_FIELD_NUMBER = 4
static

Definition at line 97 of file CpObjectiveProto.java.

◆ DOMAIN_FIELD_NUMBER

final int com.google.ortools.sat.CpObjectiveProto.DOMAIN_FIELD_NUMBER = 5
static

Definition at line 159 of file CpObjectiveProto.java.

◆ INTEGER_AFTER_OFFSET_FIELD_NUMBER

final int com.google.ortools.sat.CpObjectiveProto.INTEGER_AFTER_OFFSET_FIELD_NUMBER = 9
static

Definition at line 252 of file CpObjectiveProto.java.

◆ INTEGER_BEFORE_OFFSET_FIELD_NUMBER

final int com.google.ortools.sat.CpObjectiveProto.INTEGER_BEFORE_OFFSET_FIELD_NUMBER = 7
static

Definition at line 226 of file CpObjectiveProto.java.

◆ INTEGER_SCALING_FACTOR_FIELD_NUMBER

final int com.google.ortools.sat.CpObjectiveProto.INTEGER_SCALING_FACTOR_FIELD_NUMBER = 8
static

Definition at line 263 of file CpObjectiveProto.java.

◆ OFFSET_FIELD_NUMBER

final int com.google.ortools.sat.CpObjectiveProto.OFFSET_FIELD_NUMBER = 2
static

Definition at line 127 of file CpObjectiveProto.java.

◆ SCALING_FACTOR_FIELD_NUMBER

final int com.google.ortools.sat.CpObjectiveProto.SCALING_FACTOR_FIELD_NUMBER = 3
static

Definition at line 148 of file CpObjectiveProto.java.

◆ SCALING_WAS_EXACT_FIELD_NUMBER

final int com.google.ortools.sat.CpObjectiveProto.SCALING_WAS_EXACT_FIELD_NUMBER = 6
static

Definition at line 207 of file CpObjectiveProto.java.

◆ VARS_FIELD_NUMBER

final int com.google.ortools.sat.CpObjectiveProto.VARS_FIELD_NUMBER = 1
static

Definition at line 49 of file CpObjectiveProto.java.


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