Google OR-Tools v9.9
a fast and portable software suite for combinatorial optimization
|
Classes | |
class | Builder |
Public Member Functions | |
java.util.List< java.lang.Integer > | getTailsList () |
int | getTailsCount () |
int | getTails (int index) |
java.util.List< java.lang.Integer > | getHeadsList () |
int | getHeadsCount () |
int | getHeads (int index) |
java.util.List< java.lang.Integer > | getLiteralsList () |
int | getLiteralsCount () |
int | getLiterals (int index) |
java.util.List< java.lang.Integer > | getDemandsList () |
int | getDemandsCount () |
int | getDemands (int index) |
long | getCapacity () |
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< RoutesConstraintProto > | getParserForType () |
com.google.ortools.sat.RoutesConstraintProto | getDefaultInstanceForType () |
Static Public Member Functions | |
static final com.google.protobuf.Descriptors.Descriptor | getDescriptor () |
static com.google.ortools.sat.RoutesConstraintProto | parseFrom (java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException |
static com.google.ortools.sat.RoutesConstraintProto | parseFrom (java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException |
static com.google.ortools.sat.RoutesConstraintProto | parseFrom (com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException |
static com.google.ortools.sat.RoutesConstraintProto | parseFrom (com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException |
static com.google.ortools.sat.RoutesConstraintProto | parseFrom (byte[] data) throws com.google.protobuf.InvalidProtocolBufferException |
static com.google.ortools.sat.RoutesConstraintProto | parseFrom (byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException |
static com.google.ortools.sat.RoutesConstraintProto | parseFrom (java.io.InputStream input) throws java.io.IOException |
static com.google.ortools.sat.RoutesConstraintProto | parseFrom (java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException |
static com.google.ortools.sat.RoutesConstraintProto | parseDelimitedFrom (java.io.InputStream input) throws java.io.IOException |
static com.google.ortools.sat.RoutesConstraintProto | parseDelimitedFrom (java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException |
static com.google.ortools.sat.RoutesConstraintProto | parseFrom (com.google.protobuf.CodedInputStream input) throws java.io.IOException |
static com.google.ortools.sat.RoutesConstraintProto | 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.RoutesConstraintProto prototype) |
static com.google.ortools.sat.RoutesConstraintProto | getDefaultInstance () |
static com.google.protobuf.Parser< RoutesConstraintProto > | parser () |
Static Public Attributes | |
static final int | TAILS_FIELD_NUMBER = 1 |
static final int | HEADS_FIELD_NUMBER = 2 |
static final int | LITERALS_FIELD_NUMBER = 3 |
static final int | DEMANDS_FIELD_NUMBER = 4 |
static final int | CAPACITY_FIELD_NUMBER = 5 |
Protected Member Functions | |
java.lang.Object | newInstance (UnusedPrivateParameter unused) |
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable | internalGetFieldAccessorTable () |
Builder | newBuilderForType (com.google.protobuf.GeneratedMessageV3.BuilderParent parent) |
The "VRP" (Vehicle Routing Problem) constraint. The direct graph where arc #i (from tails[i] to head[i]) is present iff literals[i] is true must satisfy this set of properties: - #incoming arcs == 1 except for node 0. - #outgoing arcs == 1 except for node 0. - for node zero, #incoming arcs == #outgoing arcs. - There are no duplicate arcs. - Self-arcs are allowed except for node 0. - There is no cycle in this graph, except through node 0. Note: Currently this constraint expect all the nodes in [0, num_nodes) to have at least one incident arc. The model will be considered invalid if it is not the case. You can add self-arc fixed to one to ignore some nodes if needed. TODO(user): It is probably possible to generalize this constraint to a no-cycle in a general graph, or a no-cycle with sum incoming <= 1 and sum outgoing <= 1 (more efficient implementation). On the other hand, having this specific constraint allow us to add specific "cuts" to a VRP problem.
Protobuf type operations_research.sat.RoutesConstraintProto
Definition at line 33 of file RoutesConstraintProto.java.
boolean com.google.ortools.sat.RoutesConstraintProto.equals | ( | final java.lang.Object | obj | ) |
Definition at line 357 of file RoutesConstraintProto.java.
long com.google.ortools.sat.RoutesConstraintProto.getCapacity | ( | ) |
int64 capacity = 5;
Implements com.google.ortools.sat.RoutesConstraintProtoOrBuilder.
Definition at line 232 of file RoutesConstraintProto.java.
|
static |
Definition at line 1295 of file RoutesConstraintProto.java.
com.google.ortools.sat.RoutesConstraintProto com.google.ortools.sat.RoutesConstraintProto.getDefaultInstanceForType | ( | ) |
Definition at line 1331 of file RoutesConstraintProto.java.
int com.google.ortools.sat.RoutesConstraintProto.getDemands | ( | int | index | ) |
EXPERIMENTAL. The demands for each node, and the maximum capacity for each route. Note that this is currently only used for the LP relaxation and one need to add the corresponding constraint to enforce this outside of the LP. TODO(user): Ideally, we should be able to extract any dimension like these (i.e. capacity, route_length, etc..) automatically from the encoding. The classical way to encode that is to have "current_capacity" variables along the route and linear equations of the form: arc_literal => (current_capacity_tail + demand <= current_capacity_head)
repeated int32 demands = 4;
index | The index of the element to return. |
Implements com.google.ortools.sat.RoutesConstraintProtoOrBuilder.
Definition at line 220 of file RoutesConstraintProto.java.
int com.google.ortools.sat.RoutesConstraintProto.getDemandsCount | ( | ) |
EXPERIMENTAL. The demands for each node, and the maximum capacity for each route. Note that this is currently only used for the LP relaxation and one need to add the corresponding constraint to enforce this outside of the LP. TODO(user): Ideally, we should be able to extract any dimension like these (i.e. capacity, route_length, etc..) automatically from the encoding. The classical way to encode that is to have "current_capacity" variables along the route and linear equations of the form: arc_literal => (current_capacity_tail + demand <= current_capacity_head)
repeated int32 demands = 4;
Implements com.google.ortools.sat.RoutesConstraintProtoOrBuilder.
Definition at line 200 of file RoutesConstraintProto.java.
java.util.List< java.lang.Integer > com.google.ortools.sat.RoutesConstraintProto.getDemandsList | ( | ) |
EXPERIMENTAL. The demands for each node, and the maximum capacity for each route. Note that this is currently only used for the LP relaxation and one need to add the corresponding constraint to enforce this outside of the LP. TODO(user): Ideally, we should be able to extract any dimension like these (i.e. capacity, route_length, etc..) automatically from the encoding. The classical way to encode that is to have "current_capacity" variables along the route and linear equations of the form: arc_literal => (current_capacity_tail + demand <= current_capacity_head)
repeated int32 demands = 4;
Implements com.google.ortools.sat.RoutesConstraintProtoOrBuilder.
Definition at line 181 of file RoutesConstraintProto.java.
|
static |
Definition at line 57 of file RoutesConstraintProto.java.
int com.google.ortools.sat.RoutesConstraintProto.getHeads | ( | int | index | ) |
repeated int32 heads = 2;
index | The index of the element to return. |
Implements com.google.ortools.sat.RoutesConstraintProtoOrBuilder.
Definition at line 124 of file RoutesConstraintProto.java.
int com.google.ortools.sat.RoutesConstraintProto.getHeadsCount | ( | ) |
repeated int32 heads = 2;
Implements com.google.ortools.sat.RoutesConstraintProtoOrBuilder.
Definition at line 116 of file RoutesConstraintProto.java.
java.util.List< java.lang.Integer > com.google.ortools.sat.RoutesConstraintProto.getHeadsList | ( | ) |
repeated int32 heads = 2;
Implements com.google.ortools.sat.RoutesConstraintProtoOrBuilder.
Definition at line 109 of file RoutesConstraintProto.java.
int com.google.ortools.sat.RoutesConstraintProto.getLiterals | ( | int | index | ) |
repeated int32 literals = 3;
index | The index of the element to return. |
Implements com.google.ortools.sat.RoutesConstraintProtoOrBuilder.
Definition at line 154 of file RoutesConstraintProto.java.
int com.google.ortools.sat.RoutesConstraintProto.getLiteralsCount | ( | ) |
repeated int32 literals = 3;
Implements com.google.ortools.sat.RoutesConstraintProtoOrBuilder.
Definition at line 146 of file RoutesConstraintProto.java.
java.util.List< java.lang.Integer > com.google.ortools.sat.RoutesConstraintProto.getLiteralsList | ( | ) |
repeated int32 literals = 3;
Implements com.google.ortools.sat.RoutesConstraintProtoOrBuilder.
Definition at line 139 of file RoutesConstraintProto.java.
com.google.protobuf.Parser< RoutesConstraintProto > com.google.ortools.sat.RoutesConstraintProto.getParserForType | ( | ) |
Definition at line 1326 of file RoutesConstraintProto.java.
int com.google.ortools.sat.RoutesConstraintProto.getSerializedSize | ( | ) |
Definition at line 286 of file RoutesConstraintProto.java.
int com.google.ortools.sat.RoutesConstraintProto.getTails | ( | int | index | ) |
repeated int32 tails = 1;
index | The index of the element to return. |
Implements com.google.ortools.sat.RoutesConstraintProtoOrBuilder.
Definition at line 94 of file RoutesConstraintProto.java.
int com.google.ortools.sat.RoutesConstraintProto.getTailsCount | ( | ) |
repeated int32 tails = 1;
Implements com.google.ortools.sat.RoutesConstraintProtoOrBuilder.
Definition at line 86 of file RoutesConstraintProto.java.
java.util.List< java.lang.Integer > com.google.ortools.sat.RoutesConstraintProto.getTailsList | ( | ) |
repeated int32 tails = 1;
Implements com.google.ortools.sat.RoutesConstraintProtoOrBuilder.
Definition at line 79 of file RoutesConstraintProto.java.
int com.google.ortools.sat.RoutesConstraintProto.hashCode | ( | ) |
Definition at line 381 of file RoutesConstraintProto.java.
|
protected |
Definition at line 63 of file RoutesConstraintProto.java.
final boolean com.google.ortools.sat.RoutesConstraintProto.isInitialized | ( | ) |
Definition at line 238 of file RoutesConstraintProto.java.
|
static |
Definition at line 485 of file RoutesConstraintProto.java.
|
static |
Definition at line 488 of file RoutesConstraintProto.java.
Builder com.google.ortools.sat.RoutesConstraintProto.newBuilderForType | ( | ) |
Definition at line 484 of file RoutesConstraintProto.java.
|
protected |
Definition at line 498 of file RoutesConstraintProto.java.
|
protected |
Definition at line 51 of file RoutesConstraintProto.java.
|
static |
Definition at line 456 of file RoutesConstraintProto.java.
|
static |
Definition at line 462 of file RoutesConstraintProto.java.
|
static |
Definition at line 433 of file RoutesConstraintProto.java.
|
static |
Definition at line 437 of file RoutesConstraintProto.java.
|
static |
Definition at line 422 of file RoutesConstraintProto.java.
|
static |
Definition at line 427 of file RoutesConstraintProto.java.
|
static |
Definition at line 469 of file RoutesConstraintProto.java.
|
static |
Definition at line 475 of file RoutesConstraintProto.java.
|
static |
Definition at line 443 of file RoutesConstraintProto.java.
|
static |
Definition at line 448 of file RoutesConstraintProto.java.
|
static |
Definition at line 411 of file RoutesConstraintProto.java.
|
static |
Definition at line 416 of file RoutesConstraintProto.java.
|
static |
Definition at line 1321 of file RoutesConstraintProto.java.
Builder com.google.ortools.sat.RoutesConstraintProto.toBuilder | ( | ) |
Definition at line 492 of file RoutesConstraintProto.java.
void com.google.ortools.sat.RoutesConstraintProto.writeTo | ( | com.google.protobuf.CodedOutputStream | output | ) | throws java.io.IOException |
Definition at line 248 of file RoutesConstraintProto.java.
|
static |
Definition at line 225 of file RoutesConstraintProto.java.
|
static |
Definition at line 159 of file RoutesConstraintProto.java.
|
static |
Definition at line 99 of file RoutesConstraintProto.java.
|
static |
Definition at line 129 of file RoutesConstraintProto.java.
|
static |
Definition at line 69 of file RoutesConstraintProto.java.