![]() |
Google OR-Tools v9.14
a fast and portable software suite for combinatorial optimization
|
Optimization objective.
Protobuf type operations_research.sat.CpObjectiveProto
Definition at line 587 of file CpObjectiveProto.java.
Static Public Member Functions | |
static final com.google.protobuf.Descriptors.Descriptor | getDescriptor () |
Protected Member Functions | |
com.google.protobuf.GeneratedMessage.FieldAccessorTable | internalGetFieldAccessorTable () |
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 1066 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 1280 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 976 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 1053 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 1261 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 957 of file CpObjectiveProto.java.
com.google.ortools.sat.CpObjectiveProto com.google.ortools.sat.CpObjectiveProto.Builder.build | ( | ) |
Definition at line 642 of file CpObjectiveProto.java.
com.google.ortools.sat.CpObjectiveProto com.google.ortools.sat.CpObjectiveProto.Builder.buildPartial | ( | ) |
Definition at line 651 of file CpObjectiveProto.java.
Builder com.google.ortools.sat.CpObjectiveProto.Builder.clear | ( | ) |
Definition at line 615 of file CpObjectiveProto.java.
Builder com.google.ortools.sat.CpObjectiveProto.Builder.clearCoeffs | ( | ) |
repeated int64 coeffs = 4;
Definition at line 1079 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 1299 of file CpObjectiveProto.java.
Builder com.google.ortools.sat.CpObjectiveProto.Builder.clearIntegerAfterOffset | ( | ) |
int64 integer_after_offset = 9;
Definition at line 1464 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 1432 of file CpObjectiveProto.java.
Builder com.google.ortools.sat.CpObjectiveProto.Builder.clearIntegerScalingFactor | ( | ) |
int64 integer_scaling_factor = 8;
Definition at line 1496 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 1141 of file CpObjectiveProto.java.
Builder com.google.ortools.sat.CpObjectiveProto.Builder.clearScalingFactor | ( | ) |
double scaling_factor = 3;
Definition at line 1173 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 1355 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 995 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 1030 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 1022 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 1014 of file CpObjectiveProto.java.
com.google.ortools.sat.CpObjectiveProto com.google.ortools.sat.CpObjectiveProto.Builder.getDefaultInstanceForType | ( | ) |
Definition at line 637 of file CpObjectiveProto.java.
|
static |
Definition at line 592 of file CpObjectiveProto.java.
com.google.protobuf.Descriptors.Descriptor com.google.ortools.sat.CpObjectiveProto.Builder.getDescriptorForType | ( | ) |
Definition at line 632 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 1226 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 1212 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 1198 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 1445 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 1383 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 1477 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 1102 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 1154 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 1320 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 922 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 908 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 894 of file CpObjectiveProto.java.
|
protected |
Definition at line 598 of file CpObjectiveProto.java.
final boolean com.google.ortools.sat.CpObjectiveProto.Builder.isInitialized | ( | ) |
Definition at line 761 of file CpObjectiveProto.java.
Builder com.google.ortools.sat.CpObjectiveProto.Builder.mergeFrom | ( | com.google.ortools.sat.CpObjectiveProto | other | ) |
Definition at line 702 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 766 of file CpObjectiveProto.java.
Builder com.google.ortools.sat.CpObjectiveProto.Builder.mergeFrom | ( | com.google.protobuf.Message | other | ) |
Definition at line 693 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 1039 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 1241 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 1453 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 1406 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 1485 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 1120 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 1162 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 1336 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 937 of file CpObjectiveProto.java.