Package com.google.ortools.sat
Interface CpObjectiveProtoOrBuilder
- All Superinterfaces:
com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder
- All Known Implementing Classes:
CpObjectiveProto,CpObjectiveProto.Builder
public interface CpObjectiveProtoOrBuilder
extends com.google.protobuf.MessageOrBuilder
-
Method Summary
Modifier and Type Method Description longgetCoeffs(int index)repeated int64 coeffs = 4;intgetCoeffsCount()repeated int64 coeffs = 4;java.util.List<java.lang.Long>getCoeffsList()repeated int64 coeffs = 4;longgetDomain(int index)If non-empty, only look for an objective value in the given domain.intgetDomainCount()If non-empty, only look for an objective value in the given domain.java.util.List<java.lang.Long>getDomainList()If non-empty, only look for an objective value in the given domain.doublegetOffset()The displayed objective is always: scaling_factor * (sum(coefficients[i] * objective_vars[i]) + offset).doublegetScalingFactor()double scaling_factor = 3;intgetVars(int index)The linear terms of the objective to minimize.intgetVarsCount()The linear terms of the objective to minimize.java.util.List<java.lang.Integer>getVarsList()The linear terms of the objective to minimize.Methods inherited from interface com.google.protobuf.MessageLiteOrBuilder
isInitializedMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getDefaultInstanceForType, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getVarsList
java.util.List<java.lang.Integer> getVarsList()The linear terms of the objective to minimize. For a maximization problem, one can negate all coefficients in the objective and set a scaling_factor to -1.
repeated int32 vars = 1;- Returns:
- A list containing the vars.
-
getVarsCount
int getVarsCount()The linear terms of the objective to minimize. For a maximization problem, one can negate all coefficients in the objective and set a scaling_factor to -1.
repeated int32 vars = 1;- Returns:
- The count of vars.
-
getVars
int 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 a scaling_factor to -1.
repeated int32 vars = 1;- Parameters:
index- The index of the element to return.- Returns:
- The vars at the given index.
-
getCoeffsList
java.util.List<java.lang.Long> getCoeffsList()repeated int64 coeffs = 4;- Returns:
- A list containing the coeffs.
-
getCoeffsCount
int getCoeffsCount()repeated int64 coeffs = 4;- Returns:
- The count of coeffs.
-
getCoeffs
long getCoeffs(int index)repeated int64 coeffs = 4;- Parameters:
index- The index of the element to return.- Returns:
- The coeffs at the given index.
-
getOffset
double 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.
-
getScalingFactor
double getScalingFactor()double scaling_factor = 3;- Returns:
- The scalingFactor.
-
getDomainList
java.util.List<java.lang.Long> 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.
-
getDomainCount
int 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.
-
getDomain
long 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:
index- The index of the element to return.- Returns:
- The domain at the given index.
-