Google OR-Tools v9.11
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 ()
 
- Public Member Functions inherited from com.google.ortools.sat.CpObjectiveProtoOrBuilder

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

com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable ()
 
Builder newBuilderForType (com.google.protobuf.GeneratedMessage.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 411 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 124 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 116 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 109 of file CpObjectiveProto.java.

◆ getDefaultInstance()

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

Definition at line 1510 of file CpObjectiveProto.java.

◆ getDefaultInstanceForType()

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

Definition at line 1546 of file CpObjectiveProto.java.

◆ getDescriptor()

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

Definition at line 39 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 204 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 190 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 177 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 261 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 250 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 272 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 146 of file CpObjectiveProto.java.

◆ getParserForType()

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

Definition at line 1541 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 157 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 224 of file CpObjectiveProto.java.

◆ getSerializedSize()

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

Definition at line 334 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 94 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 80 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 67 of file CpObjectiveProto.java.

◆ hashCode()

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

Definition at line 445 of file CpObjectiveProto.java.

◆ internalGetFieldAccessorTable()

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

Definition at line 45 of file CpObjectiveProto.java.

◆ isInitialized()

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

Definition at line 278 of file CpObjectiveProto.java.

◆ newBuilder() [1/2]

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

Definition at line 560 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 563 of file CpObjectiveProto.java.

◆ newBuilderForType() [1/2]

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

Definition at line 559 of file CpObjectiveProto.java.

◆ newBuilderForType() [2/2]

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

Definition at line 573 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 531 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 537 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 508 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 512 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 497 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 502 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 544 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 550 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 518 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 523 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 486 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 491 of file CpObjectiveProto.java.

◆ parser()

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

Definition at line 1536 of file CpObjectiveProto.java.

◆ toBuilder()

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

Definition at line 567 of file CpObjectiveProto.java.

◆ writeTo()

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

Definition at line 288 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 99 of file CpObjectiveProto.java.

◆ DOMAIN_FIELD_NUMBER

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

Definition at line 161 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 254 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 228 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 265 of file CpObjectiveProto.java.

◆ OFFSET_FIELD_NUMBER

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

Definition at line 129 of file CpObjectiveProto.java.

◆ SCALING_FACTOR_FIELD_NUMBER

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

Definition at line 150 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 209 of file CpObjectiveProto.java.

◆ VARS_FIELD_NUMBER

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

Definition at line 51 of file CpObjectiveProto.java.


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