Java Reference
Java Reference
Detailed Description
Optimization objective. This is in a message because decision problems don't have any objective.
Protobuf type
Definition at line 585 of file CpObjectiveProto.java.
Public Member Functions | |
| .lang.Override Builder | clear () |
| .lang.Override com.google.protobuf.Descriptors.Descriptor | getDescriptorForType () |
| .lang.Override com.google.ortools.sat.CpObjectiveProto | getDefaultInstanceForType () |
| .lang.Override com.google.ortools.sat.CpObjectiveProto | build () |
| .lang.Override com.google.ortools.sat.CpObjectiveProto | buildPartial () |
| .lang.Override Builder | clone () |
| .lang.Override Builder | setField (com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) |
| .lang.Override Builder | clearField (com.google.protobuf.Descriptors.FieldDescriptor field) |
| .lang.Override Builder | clearOneof (com.google.protobuf.Descriptors.OneofDescriptor oneof) |
| .lang.Override Builder | setRepeatedField (com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) |
| .lang.Override Builder | addRepeatedField (com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) |
| .lang.Override Builder | mergeFrom (com.google.protobuf.Message other) |
| Builder | mergeFrom (com.google.ortools.sat.CpObjectiveProto other) |
| .lang.Override final boolean | isInitialized () |
| .lang.Override 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 () |
repeated int64 coeffs = 4; More... | |
| int | getCoeffsCount () |
repeated int64 coeffs = 4; More... | |
| long | getCoeffs (int index) |
repeated int64 coeffs = 4; More... | |
| Builder | setCoeffs (int index, long value) |
repeated int64 coeffs = 4; More... | |
| Builder | addCoeffs (long value) |
repeated int64 coeffs = 4; More... | |
| Builder | addAllCoeffs (java.lang.Iterable<? extends java.lang.Long > values) |
repeated int64 coeffs = 4; More... | |
| Builder | clearCoeffs () |
repeated int64 coeffs = 4; More... | |
| .lang.Override double | getOffset () |
| Builder | setOffset (double value) |
| Builder | clearOffset () |
| .lang.Override double | getScalingFactor () |
double scaling_factor = 3; More... | |
| Builder | setScalingFactor (double value) |
double scaling_factor = 3; More... | |
| Builder | clearScalingFactor () |
double scaling_factor = 3; More... | |
| 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 () |
| .lang.Override final Builder | setUnknownFields (final com.google.protobuf.UnknownFieldSet unknownFields) |
| .lang.Override final Builder | mergeUnknownFields (final com.google.protobuf.UnknownFieldSet unknownFields) |
Static Public Member Functions | |
| static final com.google.protobuf.Descriptors.Descriptor | getDescriptor () |
Protected Member Functions | |
| .lang.Override com.google.protobuf.GeneratedMessageV3.FieldAccessorTable | internalGetFieldAccessorTable () |
Member Function Documentation
◆ addAllCoeffs()
|
inline |
repeated int64 coeffs = 4;
- Parameters
-
values The coeffs to add.
- Returns
- This builder for chaining.
Definition at line 969 of file CpObjectiveProto.java.
◆ addAllDomain()
|
inline |
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
-
values The domain to add.
- Returns
- This builder for chaining.
Definition at line 1173 of file CpObjectiveProto.java.
◆ addAllVars()
|
inline |
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
-
values The vars to add.
- Returns
- This builder for chaining.
Definition at line 884 of file CpObjectiveProto.java.
◆ addCoeffs()
|
inline |
repeated int64 coeffs = 4;
- Parameters
-
value The coeffs to add.
- Returns
- This builder for chaining.
Definition at line 958 of file CpObjectiveProto.java.
◆ addDomain()
|
inline |
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
-
value The domain to add.
- Returns
- This builder for chaining.
Definition at line 1156 of file CpObjectiveProto.java.
◆ addRepeatedField()
|
inline |
Definition at line 705 of file CpObjectiveProto.java.
◆ addVars()
|
inline |
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
-
value The vars to add.
- Returns
- This builder for chaining.
Definition at line 867 of file CpObjectiveProto.java.
◆ build()
|
inline |
Definition at line 645 of file CpObjectiveProto.java.
◆ buildPartial()
|
inline |
Definition at line 654 of file CpObjectiveProto.java.
◆ clear()
|
inline |
Definition at line 618 of file CpObjectiveProto.java.
◆ clearCoeffs()
|
inline |
repeated int64 coeffs = 4;
- Returns
- This builder for chaining.
Definition at line 981 of file CpObjectiveProto.java.
◆ clearDomain()
|
inline |
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
- This builder for chaining.
Definition at line 1191 of file CpObjectiveProto.java.
◆ clearField()
|
inline |
Definition at line 689 of file CpObjectiveProto.java.
◆ clearOffset()
|
inline |
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
- This builder for chaining.
Definition at line 1039 of file CpObjectiveProto.java.
◆ clearOneof()
|
inline |
Definition at line 694 of file CpObjectiveProto.java.
◆ clearScalingFactor()
|
inline |
double scaling_factor = 3;
- Returns
- This builder for chaining.
Definition at line 1070 of file CpObjectiveProto.java.
◆ clearVars()
|
inline |
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
- This builder for chaining.
Definition at line 902 of file CpObjectiveProto.java.
◆ clone()
|
inline |
Definition at line 679 of file CpObjectiveProto.java.
◆ getCoeffs()
|
inline |
repeated int64 coeffs = 4;
- Parameters
-
index The index of the element to return.
- Returns
- The coeffs at the given index.
Implements CpObjectiveProtoOrBuilder.
Definition at line 937 of file CpObjectiveProto.java.
◆ getCoeffsCount()
|
inline |
repeated int64 coeffs = 4;
- Returns
- The count of coeffs.
Implements CpObjectiveProtoOrBuilder.
Definition at line 929 of file CpObjectiveProto.java.
◆ getCoeffsList()
|
inline |
repeated int64 coeffs = 4;
- Returns
- A list containing the coeffs.
Implements CpObjectiveProtoOrBuilder.
Definition at line 921 of file CpObjectiveProto.java.
◆ getDefaultInstanceForType()
|
inline |
Definition at line 640 of file CpObjectiveProto.java.
◆ getDescriptor()
|
inlinestatic |
Definition at line 590 of file CpObjectiveProto.java.
◆ getDescriptorForType()
|
inline |
Definition at line 635 of file CpObjectiveProto.java.
◆ getDomain()
|
inline |
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.
Implements CpObjectiveProtoOrBuilder.
Definition at line 1123 of file CpObjectiveProto.java.
◆ getDomainCount()
|
inline |
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.
Implements CpObjectiveProtoOrBuilder.
Definition at line 1109 of file CpObjectiveProto.java.
◆ getDomainList()
|
inline |
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.
Implements CpObjectiveProtoOrBuilder.
Definition at line 1095 of file CpObjectiveProto.java.
◆ getOffset()
|
inline |
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.
Implements CpObjectiveProtoOrBuilder.
Definition at line 1003 of file CpObjectiveProto.java.
◆ getScalingFactor()
|
inline |
double scaling_factor = 3;
- Returns
- The scalingFactor.
Implements CpObjectiveProtoOrBuilder.
Definition at line 1052 of file CpObjectiveProto.java.
◆ getVars()
|
inline |
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.
Implements CpObjectiveProtoOrBuilder.
Definition at line 834 of file CpObjectiveProto.java.
◆ getVarsCount()
|
inline |
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.
Implements CpObjectiveProtoOrBuilder.
Definition at line 820 of file CpObjectiveProto.java.
◆ getVarsList()
|
inline |
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.
Implements CpObjectiveProtoOrBuilder.
Definition at line 806 of file CpObjectiveProto.java.
◆ internalGetFieldAccessorTable()
|
inlineprotected |
Definition at line 596 of file CpObjectiveProto.java.
◆ isInitialized()
|
inline |
Definition at line 764 of file CpObjectiveProto.java.
◆ mergeFrom() [1/3]
|
inline |
Definition at line 720 of file CpObjectiveProto.java.
◆ mergeFrom() [2/3]
|
inline |
Definition at line 769 of file CpObjectiveProto.java.
◆ mergeFrom() [3/3]
|
inline |
Definition at line 711 of file CpObjectiveProto.java.
◆ mergeUnknownFields()
|
inline |
Definition at line 1204 of file CpObjectiveProto.java.
◆ setCoeffs()
|
inline |
repeated int64 coeffs = 4;
- Parameters
-
index The index to set the value at. value The coeffs to set.
- Returns
- This builder for chaining.
Definition at line 946 of file CpObjectiveProto.java.
◆ setDomain()
|
inline |
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 to set the value at. value The domain to set.
- Returns
- This builder for chaining.
Definition at line 1138 of file CpObjectiveProto.java.
◆ setField()
|
inline |
Definition at line 683 of file CpObjectiveProto.java.
◆ setOffset()
|
inline |
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;
- Parameters
-
value The offset to set.
- Returns
- This builder for chaining.
Definition at line 1020 of file CpObjectiveProto.java.
◆ setRepeatedField()
|
inline |
Definition at line 699 of file CpObjectiveProto.java.
◆ setScalingFactor()
|
inline |
double scaling_factor = 3;
- Parameters
-
value The scalingFactor to set.
- Returns
- This builder for chaining.
Definition at line 1060 of file CpObjectiveProto.java.
◆ setUnknownFields()
|
inline |
Definition at line 1198 of file CpObjectiveProto.java.
◆ setVars()
|
inline |
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 to set the value at. value The vars to set.
- Returns
- This builder for chaining.
Definition at line 849 of file CpObjectiveProto.java.
The documentation for this class was generated from the following file: