Google OR-Tools v9.11
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 () |
Public Member Functions inherited from com.google.ortools.linearsolver.MPSosConstraintOrBuilder |
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 16 of file MPSosConstraint.java.
boolean com.google.ortools.linearsolver.MPSosConstraint.equals | ( | final java.lang.Object | obj | ) |
Definition at line 366 of file MPSosConstraint.java.
|
static |
Definition at line 1071 of file MPSosConstraint.java.
com.google.ortools.linearsolver.MPSosConstraint com.google.ortools.linearsolver.MPSosConstraint.getDefaultInstanceForType | ( | ) |
Definition at line 1107 of file MPSosConstraint.java.
|
static |
Definition at line 41 of file MPSosConstraint.java.
com.google.protobuf.Parser< MPSosConstraint > com.google.ortools.linearsolver.MPSosConstraint.getParserForType | ( | ) |
Definition at line 1102 of file MPSosConstraint.java.
int com.google.ortools.linearsolver.MPSosConstraint.getSerializedSize | ( | ) |
Definition at line 336 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 192 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 237 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 224 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 212 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 305 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 284 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 264 of file MPSosConstraint.java.
int com.google.ortools.linearsolver.MPSosConstraint.hashCode | ( | ) |
Definition at line 388 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 185 of file MPSosConstraint.java.
|
protected |
Definition at line 47 of file MPSosConstraint.java.
final boolean com.google.ortools.linearsolver.MPSosConstraint.isInitialized | ( | ) |
Definition at line 311 of file MPSosConstraint.java.
|
static |
Definition at line 485 of file MPSosConstraint.java.
|
static |
Definition at line 488 of file MPSosConstraint.java.
Builder com.google.ortools.linearsolver.MPSosConstraint.newBuilderForType | ( | ) |
Definition at line 484 of file MPSosConstraint.java.
|
protected |
Definition at line 498 of file MPSosConstraint.java.
|
static |
Definition at line 456 of file MPSosConstraint.java.
|
static |
Definition at line 462 of file MPSosConstraint.java.
|
static |
Definition at line 433 of file MPSosConstraint.java.
|
static |
Definition at line 437 of file MPSosConstraint.java.
|
static |
Definition at line 422 of file MPSosConstraint.java.
|
static |
Definition at line 427 of file MPSosConstraint.java.
|
static |
Definition at line 469 of file MPSosConstraint.java.
|
static |
Definition at line 475 of file MPSosConstraint.java.
|
static |
Definition at line 443 of file MPSosConstraint.java.
|
static |
Definition at line 448 of file MPSosConstraint.java.
|
static |
Definition at line 411 of file MPSosConstraint.java.
|
static |
Definition at line 416 of file MPSosConstraint.java.
|
static |
Definition at line 1097 of file MPSosConstraint.java.
Builder com.google.ortools.linearsolver.MPSosConstraint.toBuilder | ( | ) |
Definition at line 492 of file MPSosConstraint.java.
void com.google.ortools.linearsolver.MPSosConstraint.writeTo | ( | com.google.protobuf.CodedOutputStream | output | ) | throws java.io.IOException |
Definition at line 321 of file MPSosConstraint.java.
|
static |
Definition at line 179 of file MPSosConstraint.java.
|
static |
Definition at line 197 of file MPSosConstraint.java.
|
static |
Definition at line 241 of file MPSosConstraint.java.