Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
|
Static Public Member Functions | |
static final com.google.protobuf.Descriptors.Descriptor | getDescriptor () |
Protected Member Functions | |
com.google.protobuf.GeneratedMessage.FieldAccessorTable | internalGetFieldAccessorTable () |
Optimization objective.
Protobuf type operations_research.sat.CpObjectiveProto
Definition at line 585 of file CpObjectiveProto.java.
Builder com.google.ortools.sat.CpObjectiveProto.Builder.addAllCoeffs | ( | java.lang.Iterable<? extends java.lang.Long > | values | ) |
repeated int64 coeffs = 4;
values | The coeffs to add. |
Definition at line 1064 of file CpObjectiveProto.java.
Builder com.google.ortools.sat.CpObjectiveProto.Builder.addAllDomain | ( | java.lang.Iterable<? extends java.lang.Long > | values | ) |
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;
values | The domain to add. |
Definition at line 1278 of file CpObjectiveProto.java.
Builder com.google.ortools.sat.CpObjectiveProto.Builder.addAllVars | ( | java.lang.Iterable<? extends java.lang.Integer > | values | ) |
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;
values | The vars to add. |
Definition at line 974 of file CpObjectiveProto.java.
Builder com.google.ortools.sat.CpObjectiveProto.Builder.addCoeffs | ( | long | value | ) |
repeated int64 coeffs = 4;
value | The coeffs to add. |
Definition at line 1051 of file CpObjectiveProto.java.
Builder com.google.ortools.sat.CpObjectiveProto.Builder.addDomain | ( | long | value | ) |
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;
value | The domain to add. |
Definition at line 1259 of file CpObjectiveProto.java.
Builder com.google.ortools.sat.CpObjectiveProto.Builder.addVars | ( | int | value | ) |
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;
value | The vars to add. |
Definition at line 955 of file CpObjectiveProto.java.
com.google.ortools.sat.CpObjectiveProto com.google.ortools.sat.CpObjectiveProto.Builder.build | ( | ) |
Definition at line 640 of file CpObjectiveProto.java.
com.google.ortools.sat.CpObjectiveProto com.google.ortools.sat.CpObjectiveProto.Builder.buildPartial | ( | ) |
Definition at line 649 of file CpObjectiveProto.java.
Builder com.google.ortools.sat.CpObjectiveProto.Builder.clear | ( | ) |
Definition at line 613 of file CpObjectiveProto.java.
Builder com.google.ortools.sat.CpObjectiveProto.Builder.clearCoeffs | ( | ) |
repeated int64 coeffs = 4;
Definition at line 1077 of file CpObjectiveProto.java.
Builder com.google.ortools.sat.CpObjectiveProto.Builder.clearDomain | ( | ) |
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;
Definition at line 1297 of file CpObjectiveProto.java.
Builder com.google.ortools.sat.CpObjectiveProto.Builder.clearIntegerAfterOffset | ( | ) |
int64 integer_after_offset = 9;
Definition at line 1462 of file CpObjectiveProto.java.
Builder com.google.ortools.sat.CpObjectiveProto.Builder.clearIntegerBeforeOffset | ( | ) |
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;
Definition at line 1430 of file CpObjectiveProto.java.
Builder com.google.ortools.sat.CpObjectiveProto.Builder.clearIntegerScalingFactor | ( | ) |
int64 integer_scaling_factor = 8;
Definition at line 1494 of file CpObjectiveProto.java.
Builder com.google.ortools.sat.CpObjectiveProto.Builder.clearOffset | ( | ) |
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;
Definition at line 1139 of file CpObjectiveProto.java.
Builder com.google.ortools.sat.CpObjectiveProto.Builder.clearScalingFactor | ( | ) |
double scaling_factor = 3;
Definition at line 1171 of file CpObjectiveProto.java.
Builder com.google.ortools.sat.CpObjectiveProto.Builder.clearScalingWasExact | ( | ) |
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;
Definition at line 1353 of file CpObjectiveProto.java.
Builder com.google.ortools.sat.CpObjectiveProto.Builder.clearVars | ( | ) |
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;
Definition at line 993 of file CpObjectiveProto.java.
long com.google.ortools.sat.CpObjectiveProto.Builder.getCoeffs | ( | int | index | ) |
repeated int64 coeffs = 4;
index | The index of the element to return. |
Implements com.google.ortools.sat.CpObjectiveProtoOrBuilder.
Definition at line 1028 of file CpObjectiveProto.java.
int com.google.ortools.sat.CpObjectiveProto.Builder.getCoeffsCount | ( | ) |
repeated int64 coeffs = 4;
Implements com.google.ortools.sat.CpObjectiveProtoOrBuilder.
Definition at line 1020 of file CpObjectiveProto.java.
java.util.List< java.lang.Long > com.google.ortools.sat.CpObjectiveProto.Builder.getCoeffsList | ( | ) |
repeated int64 coeffs = 4;
Implements com.google.ortools.sat.CpObjectiveProtoOrBuilder.
Definition at line 1012 of file CpObjectiveProto.java.
com.google.ortools.sat.CpObjectiveProto com.google.ortools.sat.CpObjectiveProto.Builder.getDefaultInstanceForType | ( | ) |
Definition at line 635 of file CpObjectiveProto.java.
|
static |
Definition at line 590 of file CpObjectiveProto.java.
com.google.protobuf.Descriptors.Descriptor com.google.ortools.sat.CpObjectiveProto.Builder.getDescriptorForType | ( | ) |
Definition at line 630 of file CpObjectiveProto.java.
long com.google.ortools.sat.CpObjectiveProto.Builder.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. |
Implements com.google.ortools.sat.CpObjectiveProtoOrBuilder.
Definition at line 1224 of file CpObjectiveProto.java.
int com.google.ortools.sat.CpObjectiveProto.Builder.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;
Implements com.google.ortools.sat.CpObjectiveProtoOrBuilder.
Definition at line 1210 of file CpObjectiveProto.java.
java.util.List< java.lang.Long > com.google.ortools.sat.CpObjectiveProto.Builder.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;
Implements com.google.ortools.sat.CpObjectiveProtoOrBuilder.
Definition at line 1196 of file CpObjectiveProto.java.
long com.google.ortools.sat.CpObjectiveProto.Builder.getIntegerAfterOffset | ( | ) |
int64 integer_after_offset = 9;
Implements com.google.ortools.sat.CpObjectiveProtoOrBuilder.
Definition at line 1443 of file CpObjectiveProto.java.
long com.google.ortools.sat.CpObjectiveProto.Builder.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;
Implements com.google.ortools.sat.CpObjectiveProtoOrBuilder.
Definition at line 1381 of file CpObjectiveProto.java.
long com.google.ortools.sat.CpObjectiveProto.Builder.getIntegerScalingFactor | ( | ) |
int64 integer_scaling_factor = 8;
Implements com.google.ortools.sat.CpObjectiveProtoOrBuilder.
Definition at line 1475 of file CpObjectiveProto.java.
double com.google.ortools.sat.CpObjectiveProto.Builder.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;
Implements com.google.ortools.sat.CpObjectiveProtoOrBuilder.
Definition at line 1100 of file CpObjectiveProto.java.
double com.google.ortools.sat.CpObjectiveProto.Builder.getScalingFactor | ( | ) |
double scaling_factor = 3;
Implements com.google.ortools.sat.CpObjectiveProtoOrBuilder.
Definition at line 1152 of file CpObjectiveProto.java.
boolean com.google.ortools.sat.CpObjectiveProto.Builder.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;
Implements com.google.ortools.sat.CpObjectiveProtoOrBuilder.
Definition at line 1318 of file CpObjectiveProto.java.
int com.google.ortools.sat.CpObjectiveProto.Builder.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. |
Implements com.google.ortools.sat.CpObjectiveProtoOrBuilder.
Definition at line 920 of file CpObjectiveProto.java.
int com.google.ortools.sat.CpObjectiveProto.Builder.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;
Implements com.google.ortools.sat.CpObjectiveProtoOrBuilder.
Definition at line 906 of file CpObjectiveProto.java.
java.util.List< java.lang.Integer > com.google.ortools.sat.CpObjectiveProto.Builder.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;
Implements com.google.ortools.sat.CpObjectiveProtoOrBuilder.
Definition at line 892 of file CpObjectiveProto.java.
|
protected |
Definition at line 596 of file CpObjectiveProto.java.
final boolean com.google.ortools.sat.CpObjectiveProto.Builder.isInitialized | ( | ) |
Definition at line 759 of file CpObjectiveProto.java.
Builder com.google.ortools.sat.CpObjectiveProto.Builder.mergeFrom | ( | com.google.ortools.sat.CpObjectiveProto | other | ) |
Definition at line 700 of file CpObjectiveProto.java.
Builder com.google.ortools.sat.CpObjectiveProto.Builder.mergeFrom | ( | com.google.protobuf.CodedInputStream | input, |
com.google.protobuf.ExtensionRegistryLite | extensionRegistry ) throws java.io.IOException |
Definition at line 764 of file CpObjectiveProto.java.
Builder com.google.ortools.sat.CpObjectiveProto.Builder.mergeFrom | ( | com.google.protobuf.Message | other | ) |
Definition at line 691 of file CpObjectiveProto.java.
Builder com.google.ortools.sat.CpObjectiveProto.Builder.setCoeffs | ( | int | index, |
long | value ) |
repeated int64 coeffs = 4;
index | The index to set the value at. |
value | The coeffs to set. |
Definition at line 1037 of file CpObjectiveProto.java.
Builder com.google.ortools.sat.CpObjectiveProto.Builder.setDomain | ( | int | index, |
long | value ) |
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 to set the value at. |
value | The domain to set. |
Definition at line 1239 of file CpObjectiveProto.java.
Builder com.google.ortools.sat.CpObjectiveProto.Builder.setIntegerAfterOffset | ( | long | value | ) |
int64 integer_after_offset = 9;
value | The integerAfterOffset to set. |
Definition at line 1451 of file CpObjectiveProto.java.
Builder com.google.ortools.sat.CpObjectiveProto.Builder.setIntegerBeforeOffset | ( | long | value | ) |
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;
value | The integerBeforeOffset to set. |
Definition at line 1404 of file CpObjectiveProto.java.
Builder com.google.ortools.sat.CpObjectiveProto.Builder.setIntegerScalingFactor | ( | long | value | ) |
int64 integer_scaling_factor = 8;
value | The integerScalingFactor to set. |
Definition at line 1483 of file CpObjectiveProto.java.
Builder com.google.ortools.sat.CpObjectiveProto.Builder.setOffset | ( | double | value | ) |
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;
value | The offset to set. |
Definition at line 1118 of file CpObjectiveProto.java.
Builder com.google.ortools.sat.CpObjectiveProto.Builder.setScalingFactor | ( | double | value | ) |
double scaling_factor = 3;
value | The scalingFactor to set. |
Definition at line 1160 of file CpObjectiveProto.java.
Builder com.google.ortools.sat.CpObjectiveProto.Builder.setScalingWasExact | ( | boolean | value | ) |
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;
value | The scalingWasExact to set. |
Definition at line 1334 of file CpObjectiveProto.java.
Builder com.google.ortools.sat.CpObjectiveProto.Builder.setVars | ( | int | index, |
int | value ) |
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 to set the value at. |
value | The vars to set. |
Definition at line 935 of file CpObjectiveProto.java.