Google OR-Tools v9.9
a fast and portable software suite for combinatorial optimization
|
Public Member Functions | |
Builder | clear () |
com.google.protobuf.Descriptors.Descriptor | getDescriptorForType () |
com.google.ortools.sat.CpObjectiveProto | getDefaultInstanceForType () |
com.google.ortools.sat.CpObjectiveProto | build () |
com.google.ortools.sat.CpObjectiveProto | buildPartial () |
Builder | clone () |
Builder | setField (com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) |
Builder | clearField (com.google.protobuf.Descriptors.FieldDescriptor field) |
Builder | clearOneof (com.google.protobuf.Descriptors.OneofDescriptor oneof) |
Builder | setRepeatedField (com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) |
Builder | addRepeatedField (com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) |
Builder | mergeFrom (com.google.protobuf.Message other) |
Builder | mergeFrom (com.google.ortools.sat.CpObjectiveProto other) |
final boolean | isInitialized () |
Builder | mergeFrom (com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException |
java.util.List< java.lang.Integer > | getVarsList () |
int | getVarsCount () |
int | getVars (int index) |
Builder | setVars (int index, int value) |
Builder | addVars (int value) |
Builder | addAllVars (java.lang.Iterable<? extends java.lang.Integer > values) |
Builder | clearVars () |
java.util.List< java.lang.Long > | getCoeffsList () |
int | getCoeffsCount () |
long | getCoeffs (int index) |
Builder | setCoeffs (int index, long value) |
Builder | addCoeffs (long value) |
Builder | addAllCoeffs (java.lang.Iterable<? extends java.lang.Long > values) |
Builder | clearCoeffs () |
double | getOffset () |
Builder | setOffset (double value) |
Builder | clearOffset () |
double | getScalingFactor () |
Builder | setScalingFactor (double value) |
Builder | clearScalingFactor () |
java.util.List< java.lang.Long > | getDomainList () |
int | getDomainCount () |
long | getDomain (int index) |
Builder | setDomain (int index, long value) |
Builder | addDomain (long value) |
Builder | addAllDomain (java.lang.Iterable<? extends java.lang.Long > values) |
Builder | clearDomain () |
boolean | getScalingWasExact () |
Builder | setScalingWasExact (boolean value) |
Builder | clearScalingWasExact () |
long | getIntegerBeforeOffset () |
Builder | setIntegerBeforeOffset (long value) |
Builder | clearIntegerBeforeOffset () |
long | getIntegerAfterOffset () |
Builder | setIntegerAfterOffset (long value) |
Builder | clearIntegerAfterOffset () |
long | getIntegerScalingFactor () |
Builder | setIntegerScalingFactor (long value) |
Builder | clearIntegerScalingFactor () |
final Builder | setUnknownFields (final com.google.protobuf.UnknownFieldSet unknownFields) |
final Builder | mergeUnknownFields (final com.google.protobuf.UnknownFieldSet unknownFields) |
Static Public Member Functions | |
static final com.google.protobuf.Descriptors.Descriptor | getDescriptor () |
Protected Member Functions | |
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable | internalGetFieldAccessorTable () |
Optimization objective.
Protobuf type operations_research.sat.CpObjectiveProto
Definition at line 583 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 1094 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 1308 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 1004 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 1081 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 1289 of file CpObjectiveProto.java.
Builder com.google.ortools.sat.CpObjectiveProto.Builder.addRepeatedField | ( | com.google.protobuf.Descriptors.FieldDescriptor | field, |
java.lang.Object | value ) |
Definition at line 715 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 985 of file CpObjectiveProto.java.
com.google.ortools.sat.CpObjectiveProto com.google.ortools.sat.CpObjectiveProto.Builder.build | ( | ) |
Definition at line 638 of file CpObjectiveProto.java.
com.google.ortools.sat.CpObjectiveProto com.google.ortools.sat.CpObjectiveProto.Builder.buildPartial | ( | ) |
Definition at line 647 of file CpObjectiveProto.java.
Builder com.google.ortools.sat.CpObjectiveProto.Builder.clear | ( | ) |
Definition at line 611 of file CpObjectiveProto.java.
Builder com.google.ortools.sat.CpObjectiveProto.Builder.clearCoeffs | ( | ) |
repeated int64 coeffs = 4;
Definition at line 1107 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 1327 of file CpObjectiveProto.java.
Builder com.google.ortools.sat.CpObjectiveProto.Builder.clearField | ( | com.google.protobuf.Descriptors.FieldDescriptor | field | ) |
Definition at line 699 of file CpObjectiveProto.java.
Builder com.google.ortools.sat.CpObjectiveProto.Builder.clearIntegerAfterOffset | ( | ) |
int64 integer_after_offset = 9;
Definition at line 1492 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 1460 of file CpObjectiveProto.java.
Builder com.google.ortools.sat.CpObjectiveProto.Builder.clearIntegerScalingFactor | ( | ) |
int64 integer_scaling_factor = 8;
Definition at line 1524 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 1169 of file CpObjectiveProto.java.
Builder com.google.ortools.sat.CpObjectiveProto.Builder.clearOneof | ( | com.google.protobuf.Descriptors.OneofDescriptor | oneof | ) |
Definition at line 704 of file CpObjectiveProto.java.
Builder com.google.ortools.sat.CpObjectiveProto.Builder.clearScalingFactor | ( | ) |
double scaling_factor = 3;
Definition at line 1201 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 1383 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 1023 of file CpObjectiveProto.java.
Builder com.google.ortools.sat.CpObjectiveProto.Builder.clone | ( | ) |
Definition at line 689 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 1058 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 1050 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 1042 of file CpObjectiveProto.java.
com.google.ortools.sat.CpObjectiveProto com.google.ortools.sat.CpObjectiveProto.Builder.getDefaultInstanceForType | ( | ) |
Definition at line 633 of file CpObjectiveProto.java.
|
static |
Definition at line 588 of file CpObjectiveProto.java.
com.google.protobuf.Descriptors.Descriptor com.google.ortools.sat.CpObjectiveProto.Builder.getDescriptorForType | ( | ) |
Definition at line 628 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 1254 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 1240 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 1226 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 1473 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 1411 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 1505 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 1130 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 1182 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 1348 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 950 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 936 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 922 of file CpObjectiveProto.java.
|
protected |
Definition at line 594 of file CpObjectiveProto.java.
final boolean com.google.ortools.sat.CpObjectiveProto.Builder.isInitialized | ( | ) |
Definition at line 789 of file CpObjectiveProto.java.
Builder com.google.ortools.sat.CpObjectiveProto.Builder.mergeFrom | ( | com.google.ortools.sat.CpObjectiveProto | other | ) |
Definition at line 730 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 794 of file CpObjectiveProto.java.
Builder com.google.ortools.sat.CpObjectiveProto.Builder.mergeFrom | ( | com.google.protobuf.Message | other | ) |
Definition at line 721 of file CpObjectiveProto.java.
final Builder com.google.ortools.sat.CpObjectiveProto.Builder.mergeUnknownFields | ( | final com.google.protobuf.UnknownFieldSet | unknownFields | ) |
Definition at line 1537 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 1067 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 1269 of file CpObjectiveProto.java.
Builder com.google.ortools.sat.CpObjectiveProto.Builder.setField | ( | com.google.protobuf.Descriptors.FieldDescriptor | field, |
java.lang.Object | value ) |
Definition at line 693 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 1481 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 1434 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 1513 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 1148 of file CpObjectiveProto.java.
Builder com.google.ortools.sat.CpObjectiveProto.Builder.setRepeatedField | ( | com.google.protobuf.Descriptors.FieldDescriptor | field, |
int | index, | ||
java.lang.Object | value ) |
Definition at line 709 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 1190 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 1364 of file CpObjectiveProto.java.
final Builder com.google.ortools.sat.CpObjectiveProto.Builder.setUnknownFields | ( | final com.google.protobuf.UnknownFieldSet | unknownFields | ) |
Definition at line 1531 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 965 of file CpObjectiveProto.java.