Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
|
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 () |
Definition at line 7 of file CpObjectiveProtoOrBuilder.java.
long com.google.ortools.sat.CpObjectiveProtoOrBuilder.getCoeffs | ( | int | index | ) |
repeated int64 coeffs = 4;
index | The index of the element to return. |
Implemented in com.google.ortools.sat.CpObjectiveProto.Builder, and com.google.ortools.sat.CpObjectiveProto.
int com.google.ortools.sat.CpObjectiveProtoOrBuilder.getCoeffsCount | ( | ) |
repeated int64 coeffs = 4;
Implemented in com.google.ortools.sat.CpObjectiveProto.Builder, and com.google.ortools.sat.CpObjectiveProto.
java.util.List< java.lang.Long > com.google.ortools.sat.CpObjectiveProtoOrBuilder.getCoeffsList | ( | ) |
repeated int64 coeffs = 4;
Implemented in com.google.ortools.sat.CpObjectiveProto.Builder, and com.google.ortools.sat.CpObjectiveProto.
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;
index | The index of the element to return. |
Implemented in com.google.ortools.sat.CpObjectiveProto.Builder, and com.google.ortools.sat.CpObjectiveProto.
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;
Implemented in com.google.ortools.sat.CpObjectiveProto.Builder, and com.google.ortools.sat.CpObjectiveProto.
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;
Implemented in com.google.ortools.sat.CpObjectiveProto.Builder, and com.google.ortools.sat.CpObjectiveProto.
long com.google.ortools.sat.CpObjectiveProtoOrBuilder.getIntegerAfterOffset | ( | ) |
int64 integer_after_offset = 9;
Implemented in com.google.ortools.sat.CpObjectiveProto.Builder, and com.google.ortools.sat.CpObjectiveProto.
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;
Implemented in com.google.ortools.sat.CpObjectiveProto.Builder, and com.google.ortools.sat.CpObjectiveProto.
long com.google.ortools.sat.CpObjectiveProtoOrBuilder.getIntegerScalingFactor | ( | ) |
int64 integer_scaling_factor = 8;
Implemented in com.google.ortools.sat.CpObjectiveProto.Builder, and com.google.ortools.sat.CpObjectiveProto.
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;
Implemented in com.google.ortools.sat.CpObjectiveProto.Builder, and com.google.ortools.sat.CpObjectiveProto.
double com.google.ortools.sat.CpObjectiveProtoOrBuilder.getScalingFactor | ( | ) |
double scaling_factor = 3;
Implemented in com.google.ortools.sat.CpObjectiveProto.Builder, and com.google.ortools.sat.CpObjectiveProto.
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;
Implemented in com.google.ortools.sat.CpObjectiveProto.Builder, and com.google.ortools.sat.CpObjectiveProto.
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;
index | The index of the element to return. |
Implemented in com.google.ortools.sat.CpObjectiveProto.Builder, and com.google.ortools.sat.CpObjectiveProto.
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;
Implemented in com.google.ortools.sat.CpObjectiveProto.Builder, and com.google.ortools.sat.CpObjectiveProto.
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;
Implemented in com.google.ortools.sat.CpObjectiveProto.Builder, and com.google.ortools.sat.CpObjectiveProto.