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 14 of file CpObjectiveProto.java.
Classes | |
| class | Builder |
Public Member Functions | |
| .lang.Override final com.google.protobuf.UnknownFieldSet | getUnknownFields () |
| .lang.Override java.util.List< java.lang.Integer > | getVarsList () |
| int | getVarsCount () |
| int | getVars (int index) |
| .lang.Override 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... | |
| .lang.Override double | getOffset () |
| .lang.Override double | getScalingFactor () |
double scaling_factor = 3; More... | |
| .lang.Override java.util.List< java.lang.Long > | getDomainList () |
| int | getDomainCount () |
| long | getDomain (int index) |
| .lang.Override final boolean | isInitialized () |
| .lang.Override void | writeTo (com.google.protobuf.CodedOutputStream output) throws java.io.IOException |
| .lang.Override int | getSerializedSize () |
| .lang.Override boolean | equals (final java.lang.Object obj) |
| .lang.Override int | hashCode () |
| .lang.Override Builder | newBuilderForType () |
| .lang.Override Builder | toBuilder () |
| .lang.Override com.google.protobuf.Parser< CpObjectiveProto > | getParserForType () |
| .lang.Override com.google.ortools.sat.CpObjectiveProto | getDefaultInstanceForType () |
Static Public Member Functions | |
| static final com.google.protobuf.Descriptors.Descriptor | getDescriptor () |
| static com.google.ortools.sat.CpObjectiveProto | parseFrom (java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException |
| static com.google.ortools.sat.CpObjectiveProto | parseFrom (java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException |
| static com.google.ortools.sat.CpObjectiveProto | parseFrom (com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException |
| static com.google.ortools.sat.CpObjectiveProto | parseFrom (com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException |
| static com.google.ortools.sat.CpObjectiveProto | parseFrom (byte[] data) throws com.google.protobuf.InvalidProtocolBufferException |
| static com.google.ortools.sat.CpObjectiveProto | parseFrom (byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException |
| static com.google.ortools.sat.CpObjectiveProto | parseFrom (java.io.InputStream input) throws java.io.IOException |
| static com.google.ortools.sat.CpObjectiveProto | parseFrom (java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException |
| static com.google.ortools.sat.CpObjectiveProto | parseDelimitedFrom (java.io.InputStream input) throws java.io.IOException |
| static com.google.ortools.sat.CpObjectiveProto | parseDelimitedFrom (java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException |
| static com.google.ortools.sat.CpObjectiveProto | parseFrom (com.google.protobuf.CodedInputStream input) throws java.io.IOException |
| static com.google.ortools.sat.CpObjectiveProto | parseFrom (com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException |
| static Builder | newBuilder () |
| static Builder | newBuilder (com.google.ortools.sat.CpObjectiveProto prototype) |
| static com.google.ortools.sat.CpObjectiveProto | getDefaultInstance () |
| static com.google.protobuf.Parser< CpObjectiveProto > | parser () |
Static Public Attributes | |
| static final int | VARS_FIELD_NUMBER = 1 |
| static final int | COEFFS_FIELD_NUMBER = 4 |
| static final int | OFFSET_FIELD_NUMBER = 2 |
| static final int | SCALING_FACTOR_FIELD_NUMBER = 3 |
| static final int | DOMAIN_FIELD_NUMBER = 5 |
Protected Member Functions | |
| .lang.Override java.lang.Object | newInstance (UnusedPrivateParameter unused) |
| .lang.Override com.google.protobuf.GeneratedMessageV3.FieldAccessorTable | internalGetFieldAccessorTable () |
| .lang.Override Builder | newBuilderForType (com.google.protobuf.GeneratedMessageV3.BuilderParent parent) |
Member Function Documentation
◆ equals()
|
inline |
Definition at line 432 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 243 of file CpObjectiveProto.java.
◆ getCoeffsCount()
|
inline |
repeated int64 coeffs = 4;
- Returns
- The count of coeffs.
Implements CpObjectiveProtoOrBuilder.
Definition at line 235 of file CpObjectiveProto.java.
◆ getCoeffsList()
|
inline |
repeated int64 coeffs = 4;
- Returns
- A list containing the coeffs.
Implements CpObjectiveProtoOrBuilder.
Definition at line 228 of file CpObjectiveProto.java.
◆ getDefaultInstance()
|
inlinestatic |
Definition at line 1219 of file CpObjectiveProto.java.
◆ getDefaultInstanceForType()
|
inline |
Definition at line 1244 of file CpObjectiveProto.java.
◆ getDescriptor()
|
inlinestatic |
Definition at line 162 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 320 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 306 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 293 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 264 of file CpObjectiveProto.java.
◆ getParserForType()
|
inline |
Definition at line 1239 of file CpObjectiveProto.java.
◆ getScalingFactor()
|
inline |
double scaling_factor = 3;
- Returns
- The scalingFactor.
Implements CpObjectiveProtoOrBuilder.
Definition at line 275 of file CpObjectiveProto.java.
◆ getSerializedSize()
|
inline |
Definition at line 371 of file CpObjectiveProto.java.
◆ getUnknownFields()
|
inline |
Definition at line 38 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 215 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 201 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 188 of file CpObjectiveProto.java.
◆ hashCode()
|
inline |
Definition at line 458 of file CpObjectiveProto.java.
◆ internalGetFieldAccessorTable()
|
inlineprotected |
Definition at line 168 of file CpObjectiveProto.java.
◆ isInitialized()
|
inline |
Definition at line 327 of file CpObjectiveProto.java.
◆ newBuilder() [1/2]
|
inlinestatic |
Definition at line 559 of file CpObjectiveProto.java.
◆ newBuilder() [2/2]
|
inlinestatic |
Definition at line 562 of file CpObjectiveProto.java.
◆ newBuilderForType() [1/2]
|
inline |
Definition at line 558 of file CpObjectiveProto.java.
◆ newBuilderForType() [2/2]
|
inlineprotected |
Definition at line 572 of file CpObjectiveProto.java.
◆ newInstance()
|
inlineprotected |
Definition at line 31 of file CpObjectiveProto.java.
◆ parseDelimitedFrom() [1/2]
|
inlinestatic |
Definition at line 531 of file CpObjectiveProto.java.
◆ parseDelimitedFrom() [2/2]
|
inlinestatic |
Definition at line 536 of file CpObjectiveProto.java.
◆ parseFrom() [1/10]
|
inlinestatic |
Definition at line 509 of file CpObjectiveProto.java.
◆ parseFrom() [2/10]
|
inlinestatic |
Definition at line 513 of file CpObjectiveProto.java.
◆ parseFrom() [3/10]
|
inlinestatic |
Definition at line 498 of file CpObjectiveProto.java.
◆ parseFrom() [4/10]
|
inlinestatic |
Definition at line 503 of file CpObjectiveProto.java.
◆ parseFrom() [5/10]
|
inlinestatic |
Definition at line 543 of file CpObjectiveProto.java.
◆ parseFrom() [6/10]
|
inlinestatic |
Definition at line 549 of file CpObjectiveProto.java.
◆ parseFrom() [7/10]
|
inlinestatic |
Definition at line 519 of file CpObjectiveProto.java.
◆ parseFrom() [8/10]
|
inlinestatic |
Definition at line 524 of file CpObjectiveProto.java.
◆ parseFrom() [9/10]
|
inlinestatic |
Definition at line 487 of file CpObjectiveProto.java.
◆ parseFrom() [10/10]
|
inlinestatic |
Definition at line 492 of file CpObjectiveProto.java.
◆ parser()
|
inlinestatic |
Definition at line 1234 of file CpObjectiveProto.java.
◆ toBuilder()
|
inline |
Definition at line 566 of file CpObjectiveProto.java.
◆ writeTo()
|
inline |
Definition at line 337 of file CpObjectiveProto.java.
Member Data Documentation
◆ COEFFS_FIELD_NUMBER
|
static |
Definition at line 220 of file CpObjectiveProto.java.
◆ DOMAIN_FIELD_NUMBER
|
static |
Definition at line 279 of file CpObjectiveProto.java.
◆ OFFSET_FIELD_NUMBER
|
static |
Definition at line 248 of file CpObjectiveProto.java.
◆ SCALING_FACTOR_FIELD_NUMBER
|
static |
Definition at line 268 of file CpObjectiveProto.java.
◆ VARS_FIELD_NUMBER
|
static |
Definition at line 174 of file CpObjectiveProto.java.
The documentation for this class was generated from the following file: