Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
|
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 () |
Public Member Functions inherited from com.google.ortools.sat.LinearObjectiveOrBuilder |
Static Public Member Functions | |
static final com.google.protobuf.Descriptors.Descriptor | getDescriptor () |
Protected Member Functions | |
com.google.protobuf.GeneratedMessage.FieldAccessorTable | internalGetFieldAccessorTable () |
The objective of an optimization problem.
Protobuf type operations_research.sat.LinearObjective
Definition at line 420 of file LinearObjective.java.
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 844 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 751 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 831 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 729 of file LinearObjective.java.
com.google.ortools.sat.LinearObjective com.google.ortools.sat.LinearObjective.Builder.build | ( | ) |
Definition at line 470 of file LinearObjective.java.
com.google.ortools.sat.LinearObjective com.google.ortools.sat.LinearObjective.Builder.buildPartial | ( | ) |
Definition at line 479 of file LinearObjective.java.
Builder com.google.ortools.sat.LinearObjective.Builder.clear | ( | ) |
Definition at line 448 of file LinearObjective.java.
Builder com.google.ortools.sat.LinearObjective.Builder.clearCoefficients | ( | ) |
repeated int64 coefficients = 2;
Definition at line 857 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 773 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 937 of file LinearObjective.java.
Builder com.google.ortools.sat.LinearObjective.Builder.clearScalingFactor | ( | ) |
optional double scaling_factor = 4 [default = 1];
Definition at line 977 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 808 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 800 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 792 of file LinearObjective.java.
com.google.ortools.sat.LinearObjective com.google.ortools.sat.LinearObjective.Builder.getDefaultInstanceForType | ( | ) |
Definition at line 465 of file LinearObjective.java.
|
static |
Definition at line 425 of file LinearObjective.java.
com.google.protobuf.Descriptors.Descriptor com.google.ortools.sat.LinearObjective.Builder.getDescriptorForType | ( | ) |
Definition at line 460 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 688 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 671 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 654 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 898 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 958 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 880 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 950 of file LinearObjective.java.
|
protected |
Definition at line 431 of file LinearObjective.java.
final boolean com.google.ortools.sat.LinearObjective.Builder.isInitialized | ( | ) |
Definition at line 554 of file LinearObjective.java.
Builder com.google.ortools.sat.LinearObjective.Builder.mergeFrom | ( | com.google.ortools.sat.LinearObjective | other | ) |
Definition at line 518 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 559 of file LinearObjective.java.
Builder com.google.ortools.sat.LinearObjective.Builder.mergeFrom | ( | com.google.protobuf.Message | other | ) |
Definition at line 509 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 817 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 706 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 916 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 966 of file LinearObjective.java.