![]() |
Google OR-Tools v9.12
a fast and portable software suite for combinatorial optimization
|
Classes | |
class | Builder |
enum | Type |
Public Member Functions | |
boolean | hasType () |
com.google.ortools.linearsolver.MPSosConstraint.Type | getType () |
java.util.List< java.lang.Integer > | getVarIndexList () |
int | getVarIndexCount () |
int | getVarIndex (int index) |
java.util.List< java.lang.Double > | getWeightList () |
int | getWeightCount () |
double | getWeight (int index) |
final boolean | isInitialized () |
void | writeTo (com.google.protobuf.CodedOutputStream output) throws java.io.IOException |
int | getSerializedSize () |
boolean | equals (final java.lang.Object obj) |
int | hashCode () |
Builder | newBuilderForType () |
Builder | toBuilder () |
com.google.protobuf.Parser< MPSosConstraint > | getParserForType () |
com.google.ortools.linearsolver.MPSosConstraint | getDefaultInstanceForType () |
Static Public Member Functions | |
static final com.google.protobuf.Descriptors.Descriptor | getDescriptor () |
static com.google.ortools.linearsolver.MPSosConstraint | parseFrom (java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException |
static com.google.ortools.linearsolver.MPSosConstraint | parseFrom (java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException |
static com.google.ortools.linearsolver.MPSosConstraint | parseFrom (com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException |
static com.google.ortools.linearsolver.MPSosConstraint | parseFrom (com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException |
static com.google.ortools.linearsolver.MPSosConstraint | parseFrom (byte[] data) throws com.google.protobuf.InvalidProtocolBufferException |
static com.google.ortools.linearsolver.MPSosConstraint | parseFrom (byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException |
static com.google.ortools.linearsolver.MPSosConstraint | parseFrom (java.io.InputStream input) throws java.io.IOException |
static com.google.ortools.linearsolver.MPSosConstraint | parseFrom (java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException |
static com.google.ortools.linearsolver.MPSosConstraint | parseDelimitedFrom (java.io.InputStream input) throws java.io.IOException |
static com.google.ortools.linearsolver.MPSosConstraint | parseDelimitedFrom (java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException |
static com.google.ortools.linearsolver.MPSosConstraint | parseFrom (com.google.protobuf.CodedInputStream input) throws java.io.IOException |
static com.google.ortools.linearsolver.MPSosConstraint | parseFrom (com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException |
static Builder | newBuilder () |
static Builder | newBuilder (com.google.ortools.linearsolver.MPSosConstraint prototype) |
static com.google.ortools.linearsolver.MPSosConstraint | getDefaultInstance () |
static com.google.protobuf.Parser< MPSosConstraint > | parser () |
Static Public Attributes | |
static final int | TYPE_FIELD_NUMBER = 1 |
static final int | VAR_INDEX_FIELD_NUMBER = 2 |
static final int | WEIGHT_FIELD_NUMBER = 3 |
Protected Member Functions | |
com.google.protobuf.GeneratedMessage.FieldAccessorTable | internalGetFieldAccessorTable () |
Builder | newBuilderForType (com.google.protobuf.GeneratedMessage.BuilderParent parent) |
Special Ordered Set (SOS) constraints of type 1 or 2. See https://en.wikipedia.org/wiki/Special_ordered_set As of 2019/04, only SCIP and Gurobi support this constraint type.
Protobuf type operations_research.MPSosConstraint
Definition at line 17 of file MPSosConstraint.java.
boolean com.google.ortools.linearsolver.MPSosConstraint.equals | ( | final java.lang.Object | obj | ) |
Definition at line 367 of file MPSosConstraint.java.
|
static |
Definition at line 1072 of file MPSosConstraint.java.
com.google.ortools.linearsolver.MPSosConstraint com.google.ortools.linearsolver.MPSosConstraint.getDefaultInstanceForType | ( | ) |
Definition at line 1108 of file MPSosConstraint.java.
|
static |
Definition at line 42 of file MPSosConstraint.java.
com.google.protobuf.Parser< MPSosConstraint > com.google.ortools.linearsolver.MPSosConstraint.getParserForType | ( | ) |
Definition at line 1103 of file MPSosConstraint.java.
int com.google.ortools.linearsolver.MPSosConstraint.getSerializedSize | ( | ) |
Definition at line 337 of file MPSosConstraint.java.
com.google.ortools.linearsolver.MPSosConstraint.Type com.google.ortools.linearsolver.MPSosConstraint.getType | ( | ) |
optional .operations_research.MPSosConstraint.Type type = 1 [default = SOS1_DEFAULT];
Implements com.google.ortools.linearsolver.MPSosConstraintOrBuilder.
Definition at line 193 of file MPSosConstraint.java.
int com.google.ortools.linearsolver.MPSosConstraint.getVarIndex | ( | int | index | ) |
Variable index (w.r.t. the "variable" field of MPModelProto) of the variables in the SOS.
repeated int32 var_index = 2;
index | The index of the element to return. |
Implements com.google.ortools.linearsolver.MPSosConstraintOrBuilder.
Definition at line 238 of file MPSosConstraint.java.
int com.google.ortools.linearsolver.MPSosConstraint.getVarIndexCount | ( | ) |
Variable index (w.r.t. the "variable" field of MPModelProto) of the variables in the SOS.
repeated int32 var_index = 2;
Implements com.google.ortools.linearsolver.MPSosConstraintOrBuilder.
Definition at line 225 of file MPSosConstraint.java.
java.util.List< java.lang.Integer > com.google.ortools.linearsolver.MPSosConstraint.getVarIndexList | ( | ) |
Variable index (w.r.t. the "variable" field of MPModelProto) of the variables in the SOS.
repeated int32 var_index = 2;
Implements com.google.ortools.linearsolver.MPSosConstraintOrBuilder.
Definition at line 213 of file MPSosConstraint.java.
double com.google.ortools.linearsolver.MPSosConstraint.getWeight | ( | int | index | ) |
Optional: SOS weights. If non-empty, must be of the same size as "var_index", and strictly increasing. If empty and required by the underlying solver, the 1..n sequence will be given as weights. SUBTLE: The weights can help the solver make branch-and-bound decisions that fit the underlying optimization model: after each LP relaxation, it will compute the "average weight" of the SOS variables, weighted by value (this is confusing: here we're using the values as weights), and the binary branch decision will be: is the non-zero variable above or below that? (weights are strictly monotonous, so the "cutoff" average weight corresponds to a "cutoff" index in the var_index sequence).
repeated double weight = 3;
index | The index of the element to return. |
Implements com.google.ortools.linearsolver.MPSosConstraintOrBuilder.
Definition at line 306 of file MPSosConstraint.java.
int com.google.ortools.linearsolver.MPSosConstraint.getWeightCount | ( | ) |
Optional: SOS weights. If non-empty, must be of the same size as "var_index", and strictly increasing. If empty and required by the underlying solver, the 1..n sequence will be given as weights. SUBTLE: The weights can help the solver make branch-and-bound decisions that fit the underlying optimization model: after each LP relaxation, it will compute the "average weight" of the SOS variables, weighted by value (this is confusing: here we're using the values as weights), and the binary branch decision will be: is the non-zero variable above or below that? (weights are strictly monotonous, so the "cutoff" average weight corresponds to a "cutoff" index in the var_index sequence).
repeated double weight = 3;
Implements com.google.ortools.linearsolver.MPSosConstraintOrBuilder.
Definition at line 285 of file MPSosConstraint.java.
java.util.List< java.lang.Double > com.google.ortools.linearsolver.MPSosConstraint.getWeightList | ( | ) |
Optional: SOS weights. If non-empty, must be of the same size as "var_index", and strictly increasing. If empty and required by the underlying solver, the 1..n sequence will be given as weights. SUBTLE: The weights can help the solver make branch-and-bound decisions that fit the underlying optimization model: after each LP relaxation, it will compute the "average weight" of the SOS variables, weighted by value (this is confusing: here we're using the values as weights), and the binary branch decision will be: is the non-zero variable above or below that? (weights are strictly monotonous, so the "cutoff" average weight corresponds to a "cutoff" index in the var_index sequence).
repeated double weight = 3;
Implements com.google.ortools.linearsolver.MPSosConstraintOrBuilder.
Definition at line 265 of file MPSosConstraint.java.
int com.google.ortools.linearsolver.MPSosConstraint.hashCode | ( | ) |
Definition at line 389 of file MPSosConstraint.java.
boolean com.google.ortools.linearsolver.MPSosConstraint.hasType | ( | ) |
optional .operations_research.MPSosConstraint.Type type = 1 [default = SOS1_DEFAULT];
Implements com.google.ortools.linearsolver.MPSosConstraintOrBuilder.
Definition at line 186 of file MPSosConstraint.java.
|
protected |
Definition at line 48 of file MPSosConstraint.java.
final boolean com.google.ortools.linearsolver.MPSosConstraint.isInitialized | ( | ) |
Definition at line 312 of file MPSosConstraint.java.
|
static |
Definition at line 486 of file MPSosConstraint.java.
|
static |
Definition at line 489 of file MPSosConstraint.java.
Builder com.google.ortools.linearsolver.MPSosConstraint.newBuilderForType | ( | ) |
Definition at line 485 of file MPSosConstraint.java.
|
protected |
Definition at line 499 of file MPSosConstraint.java.
|
static |
Definition at line 457 of file MPSosConstraint.java.
|
static |
Definition at line 463 of file MPSosConstraint.java.
|
static |
Definition at line 434 of file MPSosConstraint.java.
|
static |
Definition at line 438 of file MPSosConstraint.java.
|
static |
Definition at line 423 of file MPSosConstraint.java.
|
static |
Definition at line 428 of file MPSosConstraint.java.
|
static |
Definition at line 470 of file MPSosConstraint.java.
|
static |
Definition at line 476 of file MPSosConstraint.java.
|
static |
Definition at line 444 of file MPSosConstraint.java.
|
static |
Definition at line 449 of file MPSosConstraint.java.
|
static |
Definition at line 412 of file MPSosConstraint.java.
|
static |
Definition at line 417 of file MPSosConstraint.java.
|
static |
Definition at line 1098 of file MPSosConstraint.java.
Builder com.google.ortools.linearsolver.MPSosConstraint.toBuilder | ( | ) |
Definition at line 493 of file MPSosConstraint.java.
void com.google.ortools.linearsolver.MPSosConstraint.writeTo | ( | com.google.protobuf.CodedOutputStream | output | ) | throws java.io.IOException |
Definition at line 322 of file MPSosConstraint.java.
|
static |
Definition at line 180 of file MPSosConstraint.java.
|
static |
Definition at line 198 of file MPSosConstraint.java.
|
static |
Definition at line 242 of file MPSosConstraint.java.