Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
com.google.ortools.sat.CpObjectiveProtoOrBuilder Interface Reference
Inheritance diagram for com.google.ortools.sat.CpObjectiveProtoOrBuilder:
com.google.ortools.sat.CpObjectiveProto com.google.ortools.sat.CpObjectiveProto.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 ()
 

Detailed Description

Definition at line 7 of file CpObjectiveProtoOrBuilder.java.

Member Function Documentation

◆ getCoeffs()

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

repeated int64 coeffs = 4;

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

Implemented in com.google.ortools.sat.CpObjectiveProto.Builder, and com.google.ortools.sat.CpObjectiveProto.

◆ getCoeffsCount()

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

repeated int64 coeffs = 4;

Returns
The count of coeffs.

Implemented in com.google.ortools.sat.CpObjectiveProto.Builder, and com.google.ortools.sat.CpObjectiveProto.

◆ getCoeffsList()

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

repeated int64 coeffs = 4;

Returns
A list containing the coeffs.

Implemented in com.google.ortools.sat.CpObjectiveProto.Builder, and com.google.ortools.sat.CpObjectiveProto.

◆ getDomain()

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

Implemented in com.google.ortools.sat.CpObjectiveProto.Builder, and com.google.ortools.sat.CpObjectiveProto.

◆ getDomainCount()

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

Implemented in com.google.ortools.sat.CpObjectiveProto.Builder, and com.google.ortools.sat.CpObjectiveProto.

◆ getDomainList()

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

Implemented in com.google.ortools.sat.CpObjectiveProto.Builder, and com.google.ortools.sat.CpObjectiveProto.

◆ getIntegerAfterOffset()

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

int64 integer_after_offset = 9;

Returns
The integerAfterOffset.

Implemented in com.google.ortools.sat.CpObjectiveProto.Builder, and com.google.ortools.sat.CpObjectiveProto.

◆ getIntegerBeforeOffset()

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

Implemented in com.google.ortools.sat.CpObjectiveProto.Builder, and com.google.ortools.sat.CpObjectiveProto.

◆ getIntegerScalingFactor()

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

int64 integer_scaling_factor = 8;

Returns
The integerScalingFactor.

Implemented in com.google.ortools.sat.CpObjectiveProto.Builder, and com.google.ortools.sat.CpObjectiveProto.

◆ getOffset()

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

Implemented in com.google.ortools.sat.CpObjectiveProto.Builder, and com.google.ortools.sat.CpObjectiveProto.

◆ getScalingFactor()

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

double scaling_factor = 3;

Returns
The scalingFactor.

Implemented in com.google.ortools.sat.CpObjectiveProto.Builder, and com.google.ortools.sat.CpObjectiveProto.

◆ getScalingWasExact()

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

Implemented in com.google.ortools.sat.CpObjectiveProto.Builder, and com.google.ortools.sat.CpObjectiveProto.

◆ getVars()

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

Implemented in com.google.ortools.sat.CpObjectiveProto.Builder, and com.google.ortools.sat.CpObjectiveProto.

◆ getVarsCount()

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

Implemented in com.google.ortools.sat.CpObjectiveProto.Builder, and com.google.ortools.sat.CpObjectiveProto.

◆ getVarsList()

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

Implemented in com.google.ortools.sat.CpObjectiveProto.Builder, and com.google.ortools.sat.CpObjectiveProto.


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