Google OR-Tools v9.12
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

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 15 of file CpObjectiveProto.java.

Member Function Documentation

◆ equals()

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

Definition at line 412 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 125 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 117 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 110 of file CpObjectiveProto.java.

◆ getDefaultInstance()

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

Definition at line 1511 of file CpObjectiveProto.java.

◆ getDefaultInstanceForType()

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

Definition at line 1547 of file CpObjectiveProto.java.

◆ getDescriptor()

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

Definition at line 40 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 205 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 191 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 178 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 262 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 251 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 273 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 147 of file CpObjectiveProto.java.

◆ getParserForType()

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

Definition at line 1542 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 158 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 225 of file CpObjectiveProto.java.

◆ getSerializedSize()

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

Definition at line 335 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 95 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 81 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 68 of file CpObjectiveProto.java.

◆ hashCode()

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

Definition at line 446 of file CpObjectiveProto.java.

◆ internalGetFieldAccessorTable()

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

Definition at line 46 of file CpObjectiveProto.java.

◆ isInitialized()

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

Definition at line 279 of file CpObjectiveProto.java.

◆ newBuilder() [1/2]

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

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

◆ newBuilderForType() [1/2]

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

Definition at line 560 of file CpObjectiveProto.java.

◆ newBuilderForType() [2/2]

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

Definition at line 574 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 532 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 538 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 509 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 513 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 498 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 503 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 545 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 551 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 519 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 524 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 487 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 492 of file CpObjectiveProto.java.

◆ parser()

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

Definition at line 1537 of file CpObjectiveProto.java.

◆ toBuilder()

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

Definition at line 568 of file CpObjectiveProto.java.

◆ writeTo()

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

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

◆ DOMAIN_FIELD_NUMBER

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

Definition at line 162 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 255 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 229 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 266 of file CpObjectiveProto.java.

◆ OFFSET_FIELD_NUMBER

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

Definition at line 130 of file CpObjectiveProto.java.

◆ SCALING_FACTOR_FIELD_NUMBER

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

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

◆ VARS_FIELD_NUMBER

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

Definition at line 52 of file CpObjectiveProto.java.


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