![]() |
Google OR-Tools v9.14
a fast and portable software suite for combinatorial optimization
|
The objective of an optimization problem.
Protobuf type operations_research.sat.LinearObjective
Definition at line 422 of file LinearObjective.java.
Public Member Functions | |
| Builder | clear () |
| com.google.protobuf.Descriptors.Descriptor | getDescriptorForType () |
| com.google.ortools.sat.LinearObjective | getDefaultInstanceForType () |
| com.google.ortools.sat.LinearObjective | build () |
| com.google.ortools.sat.LinearObjective | buildPartial () |
| Builder | mergeFrom (com.google.protobuf.Message other) |
| Builder | mergeFrom (com.google.ortools.sat.LinearObjective 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 > | getLiteralsList () |
| int | getLiteralsCount () |
| int | getLiterals (int index) |
| Builder | setLiterals (int index, int value) |
| Builder | addLiterals (int value) |
| Builder | addAllLiterals (java.lang.Iterable<? extends java.lang.Integer > values) |
| Builder | clearLiterals () |
| java.util.List< java.lang.Long > | getCoefficientsList () |
| int | getCoefficientsCount () |
| long | getCoefficients (int index) |
| Builder | setCoefficients (int index, long value) |
| Builder | addCoefficients (long value) |
| Builder | addAllCoefficients (java.lang.Iterable<? extends java.lang.Long > values) |
| Builder | clearCoefficients () |
| boolean | hasOffset () |
| double | getOffset () |
| Builder | setOffset (double value) |
| Builder | clearOffset () |
| boolean | hasScalingFactor () |
| double | getScalingFactor () |
| Builder | setScalingFactor (double value) |
| Builder | clearScalingFactor () |
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.LinearObjective.Builder.addAllCoefficients | ( | java.lang.Iterable<? extends java.lang.Long > | values | ) |
repeated int64 coefficients = 2;
| values | The coefficients to add. |
Definition at line 846 of file LinearObjective.java.
| Builder com.google.ortools.sat.LinearObjective.Builder.addAllLiterals | ( | java.lang.Iterable<? extends java.lang.Integer > | values | ) |
The goal is always to minimize the linear Boolean formula defined by these two fields: sum_i literal_i * coefficient_i where literal_i is 1 iff literal_i is true in a given assignment. Note that the same variable shouldn't appear twice and that zero coefficients are not allowed.
repeated int32 literals = 1;
| values | The literals to add. |
Definition at line 753 of file LinearObjective.java.
| Builder com.google.ortools.sat.LinearObjective.Builder.addCoefficients | ( | long | value | ) |
repeated int64 coefficients = 2;
| value | The coefficients to add. |
Definition at line 833 of file LinearObjective.java.
| Builder com.google.ortools.sat.LinearObjective.Builder.addLiterals | ( | int | value | ) |
The goal is always to minimize the linear Boolean formula defined by these two fields: sum_i literal_i * coefficient_i where literal_i is 1 iff literal_i is true in a given assignment. Note that the same variable shouldn't appear twice and that zero coefficients are not allowed.
repeated int32 literals = 1;
| value | The literals to add. |
Definition at line 731 of file LinearObjective.java.
| com.google.ortools.sat.LinearObjective com.google.ortools.sat.LinearObjective.Builder.build | ( | ) |
Definition at line 472 of file LinearObjective.java.
| com.google.ortools.sat.LinearObjective com.google.ortools.sat.LinearObjective.Builder.buildPartial | ( | ) |
Definition at line 481 of file LinearObjective.java.
| Builder com.google.ortools.sat.LinearObjective.Builder.clear | ( | ) |
Definition at line 450 of file LinearObjective.java.
| Builder com.google.ortools.sat.LinearObjective.Builder.clearCoefficients | ( | ) |
repeated int64 coefficients = 2;
Definition at line 859 of file LinearObjective.java.
| Builder com.google.ortools.sat.LinearObjective.Builder.clearLiterals | ( | ) |
The goal is always to minimize the linear Boolean formula defined by these two fields: sum_i literal_i * coefficient_i where literal_i is 1 iff literal_i is true in a given assignment. Note that the same variable shouldn't appear twice and that zero coefficients are not allowed.
repeated int32 literals = 1;
Definition at line 775 of file LinearObjective.java.
| Builder com.google.ortools.sat.LinearObjective.Builder.clearOffset | ( | ) |
For a given variable assignment, the "real" problem objective value is 'scaling_factor * (minimization_objective + offset)' where 'minimization_objective is the one defined just above. Note that this is not what we minimize, but it is what we display. In particular if scaling_factor is negative, then the "real" problem is a maximization problem, even if the "internal" objective is minimized.
optional double offset = 3 [default = 0];
Definition at line 939 of file LinearObjective.java.
| Builder com.google.ortools.sat.LinearObjective.Builder.clearScalingFactor | ( | ) |
optional double scaling_factor = 4 [default = 1];
Definition at line 979 of file LinearObjective.java.
| long com.google.ortools.sat.LinearObjective.Builder.getCoefficients | ( | int | index | ) |
repeated int64 coefficients = 2;
| index | The index of the element to return. |
Implements com.google.ortools.sat.LinearObjectiveOrBuilder.
Definition at line 810 of file LinearObjective.java.
| int com.google.ortools.sat.LinearObjective.Builder.getCoefficientsCount | ( | ) |
repeated int64 coefficients = 2;
Implements com.google.ortools.sat.LinearObjectiveOrBuilder.
Definition at line 802 of file LinearObjective.java.
| java.util.List< java.lang.Long > com.google.ortools.sat.LinearObjective.Builder.getCoefficientsList | ( | ) |
repeated int64 coefficients = 2;
Implements com.google.ortools.sat.LinearObjectiveOrBuilder.
Definition at line 794 of file LinearObjective.java.
| com.google.ortools.sat.LinearObjective com.google.ortools.sat.LinearObjective.Builder.getDefaultInstanceForType | ( | ) |
Definition at line 467 of file LinearObjective.java.
|
static |
Definition at line 427 of file LinearObjective.java.
| com.google.protobuf.Descriptors.Descriptor com.google.ortools.sat.LinearObjective.Builder.getDescriptorForType | ( | ) |
Definition at line 462 of file LinearObjective.java.
| int com.google.ortools.sat.LinearObjective.Builder.getLiterals | ( | int | index | ) |
The goal is always to minimize the linear Boolean formula defined by these two fields: sum_i literal_i * coefficient_i where literal_i is 1 iff literal_i is true in a given assignment. Note that the same variable shouldn't appear twice and that zero coefficients are not allowed.
repeated int32 literals = 1;
| index | The index of the element to return. |
Implements com.google.ortools.sat.LinearObjectiveOrBuilder.
Definition at line 690 of file LinearObjective.java.
| int com.google.ortools.sat.LinearObjective.Builder.getLiteralsCount | ( | ) |
The goal is always to minimize the linear Boolean formula defined by these two fields: sum_i literal_i * coefficient_i where literal_i is 1 iff literal_i is true in a given assignment. Note that the same variable shouldn't appear twice and that zero coefficients are not allowed.
repeated int32 literals = 1;
Implements com.google.ortools.sat.LinearObjectiveOrBuilder.
Definition at line 673 of file LinearObjective.java.
| java.util.List< java.lang.Integer > com.google.ortools.sat.LinearObjective.Builder.getLiteralsList | ( | ) |
The goal is always to minimize the linear Boolean formula defined by these two fields: sum_i literal_i * coefficient_i where literal_i is 1 iff literal_i is true in a given assignment. Note that the same variable shouldn't appear twice and that zero coefficients are not allowed.
repeated int32 literals = 1;
Implements com.google.ortools.sat.LinearObjectiveOrBuilder.
Definition at line 656 of file LinearObjective.java.
| double com.google.ortools.sat.LinearObjective.Builder.getOffset | ( | ) |
For a given variable assignment, the "real" problem objective value is 'scaling_factor * (minimization_objective + offset)' where 'minimization_objective is the one defined just above. Note that this is not what we minimize, but it is what we display. In particular if scaling_factor is negative, then the "real" problem is a maximization problem, even if the "internal" objective is minimized.
optional double offset = 3 [default = 0];
Implements com.google.ortools.sat.LinearObjectiveOrBuilder.
Definition at line 900 of file LinearObjective.java.
| double com.google.ortools.sat.LinearObjective.Builder.getScalingFactor | ( | ) |
optional double scaling_factor = 4 [default = 1];
Implements com.google.ortools.sat.LinearObjectiveOrBuilder.
Definition at line 960 of file LinearObjective.java.
| boolean com.google.ortools.sat.LinearObjective.Builder.hasOffset | ( | ) |
For a given variable assignment, the "real" problem objective value is 'scaling_factor * (minimization_objective + offset)' where 'minimization_objective is the one defined just above. Note that this is not what we minimize, but it is what we display. In particular if scaling_factor is negative, then the "real" problem is a maximization problem, even if the "internal" objective is minimized.
optional double offset = 3 [default = 0];
Implements com.google.ortools.sat.LinearObjectiveOrBuilder.
Definition at line 882 of file LinearObjective.java.
| boolean com.google.ortools.sat.LinearObjective.Builder.hasScalingFactor | ( | ) |
optional double scaling_factor = 4 [default = 1];
Implements com.google.ortools.sat.LinearObjectiveOrBuilder.
Definition at line 952 of file LinearObjective.java.
|
protected |
Definition at line 433 of file LinearObjective.java.
| final boolean com.google.ortools.sat.LinearObjective.Builder.isInitialized | ( | ) |
Definition at line 556 of file LinearObjective.java.
| Builder com.google.ortools.sat.LinearObjective.Builder.mergeFrom | ( | com.google.ortools.sat.LinearObjective | other | ) |
Definition at line 520 of file LinearObjective.java.
| Builder com.google.ortools.sat.LinearObjective.Builder.mergeFrom | ( | com.google.protobuf.CodedInputStream | input, |
| com.google.protobuf.ExtensionRegistryLite | extensionRegistry ) throws java.io.IOException |
Definition at line 561 of file LinearObjective.java.
| Builder com.google.ortools.sat.LinearObjective.Builder.mergeFrom | ( | com.google.protobuf.Message | other | ) |
Definition at line 511 of file LinearObjective.java.
| Builder com.google.ortools.sat.LinearObjective.Builder.setCoefficients | ( | int | index, |
| long | value ) |
repeated int64 coefficients = 2;
| index | The index to set the value at. |
| value | The coefficients to set. |
Definition at line 819 of file LinearObjective.java.
| Builder com.google.ortools.sat.LinearObjective.Builder.setLiterals | ( | int | index, |
| int | value ) |
The goal is always to minimize the linear Boolean formula defined by these two fields: sum_i literal_i * coefficient_i where literal_i is 1 iff literal_i is true in a given assignment. Note that the same variable shouldn't appear twice and that zero coefficients are not allowed.
repeated int32 literals = 1;
| index | The index to set the value at. |
| value | The literals to set. |
Definition at line 708 of file LinearObjective.java.
| Builder com.google.ortools.sat.LinearObjective.Builder.setOffset | ( | double | value | ) |
For a given variable assignment, the "real" problem objective value is 'scaling_factor * (minimization_objective + offset)' where 'minimization_objective is the one defined just above. Note that this is not what we minimize, but it is what we display. In particular if scaling_factor is negative, then the "real" problem is a maximization problem, even if the "internal" objective is minimized.
optional double offset = 3 [default = 0];
| value | The offset to set. |
Definition at line 918 of file LinearObjective.java.
| Builder com.google.ortools.sat.LinearObjective.Builder.setScalingFactor | ( | double | value | ) |
optional double scaling_factor = 4 [default = 1];
| value | The scalingFactor to set. |
Definition at line 968 of file LinearObjective.java.