Google OR-Tools v9.9
a fast and portable software suite for combinatorial optimization
|
Public Member Functions | |
Builder | clear () |
com.google.protobuf.Descriptors.Descriptor | getDescriptorForType () |
com.google.ortools.sat.RoutesConstraintProto | getDefaultInstanceForType () |
com.google.ortools.sat.RoutesConstraintProto | build () |
com.google.ortools.sat.RoutesConstraintProto | buildPartial () |
Builder | clone () |
Builder | setField (com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) |
Builder | clearField (com.google.protobuf.Descriptors.FieldDescriptor field) |
Builder | clearOneof (com.google.protobuf.Descriptors.OneofDescriptor oneof) |
Builder | setRepeatedField (com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) |
Builder | addRepeatedField (com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) |
Builder | mergeFrom (com.google.protobuf.Message other) |
Builder | mergeFrom (com.google.ortools.sat.RoutesConstraintProto 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 > | getTailsList () |
int | getTailsCount () |
int | getTails (int index) |
Builder | setTails (int index, int value) |
Builder | addTails (int value) |
Builder | addAllTails (java.lang.Iterable<? extends java.lang.Integer > values) |
Builder | clearTails () |
java.util.List< java.lang.Integer > | getHeadsList () |
int | getHeadsCount () |
int | getHeads (int index) |
Builder | setHeads (int index, int value) |
Builder | addHeads (int value) |
Builder | addAllHeads (java.lang.Iterable<? extends java.lang.Integer > values) |
Builder | clearHeads () |
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.Integer > | getDemandsList () |
int | getDemandsCount () |
int | getDemands (int index) |
Builder | setDemands (int index, int value) |
Builder | addDemands (int value) |
Builder | addAllDemands (java.lang.Iterable<? extends java.lang.Integer > values) |
Builder | clearDemands () |
long | getCapacity () |
Builder | setCapacity (long value) |
Builder | clearCapacity () |
final Builder | setUnknownFields (final com.google.protobuf.UnknownFieldSet unknownFields) |
final Builder | mergeUnknownFields (final com.google.protobuf.UnknownFieldSet unknownFields) |
Static Public Member Functions | |
static final com.google.protobuf.Descriptors.Descriptor | getDescriptor () |
Protected Member Functions | |
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable | internalGetFieldAccessorTable () |
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 529 of file RoutesConstraintProto.java.
Builder com.google.ortools.sat.RoutesConstraintProto.Builder.addAllDemands | ( | java.lang.Iterable<? extends java.lang.Integer > | values | ) |
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;
values | The demands to add. |
Definition at line 1210 of file RoutesConstraintProto.java.
Builder com.google.ortools.sat.RoutesConstraintProto.Builder.addAllHeads | ( | java.lang.Iterable<? extends java.lang.Integer > | values | ) |
repeated int32 heads = 2;
values | The heads to add. |
Definition at line 970 of file RoutesConstraintProto.java.
Builder com.google.ortools.sat.RoutesConstraintProto.Builder.addAllLiterals | ( | java.lang.Iterable<? extends java.lang.Integer > | values | ) |
repeated int32 literals = 3;
values | The literals to add. |
Definition at line 1054 of file RoutesConstraintProto.java.
Builder com.google.ortools.sat.RoutesConstraintProto.Builder.addAllTails | ( | java.lang.Iterable<? extends java.lang.Integer > | values | ) |
repeated int32 tails = 1;
values | The tails to add. |
Definition at line 886 of file RoutesConstraintProto.java.
Builder com.google.ortools.sat.RoutesConstraintProto.Builder.addDemands | ( | int | value | ) |
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;
value | The demands to add. |
Definition at line 1185 of file RoutesConstraintProto.java.
Builder com.google.ortools.sat.RoutesConstraintProto.Builder.addHeads | ( | int | value | ) |
repeated int32 heads = 2;
value | The heads to add. |
Definition at line 957 of file RoutesConstraintProto.java.
Builder com.google.ortools.sat.RoutesConstraintProto.Builder.addLiterals | ( | int | value | ) |
repeated int32 literals = 3;
value | The literals to add. |
Definition at line 1041 of file RoutesConstraintProto.java.
Builder com.google.ortools.sat.RoutesConstraintProto.Builder.addRepeatedField | ( | com.google.protobuf.Descriptors.FieldDescriptor | field, |
java.lang.Object | value ) |
Definition at line 646 of file RoutesConstraintProto.java.
Builder com.google.ortools.sat.RoutesConstraintProto.Builder.addTails | ( | int | value | ) |
repeated int32 tails = 1;
value | The tails to add. |
Definition at line 873 of file RoutesConstraintProto.java.
com.google.ortools.sat.RoutesConstraintProto com.google.ortools.sat.RoutesConstraintProto.Builder.build | ( | ) |
Definition at line 580 of file RoutesConstraintProto.java.
com.google.ortools.sat.RoutesConstraintProto com.google.ortools.sat.RoutesConstraintProto.Builder.buildPartial | ( | ) |
Definition at line 589 of file RoutesConstraintProto.java.
Builder com.google.ortools.sat.RoutesConstraintProto.Builder.clear | ( | ) |
Definition at line 557 of file RoutesConstraintProto.java.
Builder com.google.ortools.sat.RoutesConstraintProto.Builder.clearCapacity | ( | ) |
int64 capacity = 5;
Definition at line 1267 of file RoutesConstraintProto.java.
Builder com.google.ortools.sat.RoutesConstraintProto.Builder.clearDemands | ( | ) |
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;
Definition at line 1235 of file RoutesConstraintProto.java.
Builder com.google.ortools.sat.RoutesConstraintProto.Builder.clearField | ( | com.google.protobuf.Descriptors.FieldDescriptor | field | ) |
Definition at line 630 of file RoutesConstraintProto.java.
Builder com.google.ortools.sat.RoutesConstraintProto.Builder.clearHeads | ( | ) |
repeated int32 heads = 2;
Definition at line 983 of file RoutesConstraintProto.java.
Builder com.google.ortools.sat.RoutesConstraintProto.Builder.clearLiterals | ( | ) |
repeated int32 literals = 3;
Definition at line 1067 of file RoutesConstraintProto.java.
Builder com.google.ortools.sat.RoutesConstraintProto.Builder.clearOneof | ( | com.google.protobuf.Descriptors.OneofDescriptor | oneof | ) |
Definition at line 635 of file RoutesConstraintProto.java.
Builder com.google.ortools.sat.RoutesConstraintProto.Builder.clearTails | ( | ) |
repeated int32 tails = 1;
Definition at line 899 of file RoutesConstraintProto.java.
Builder com.google.ortools.sat.RoutesConstraintProto.Builder.clone | ( | ) |
Definition at line 620 of file RoutesConstraintProto.java.
long com.google.ortools.sat.RoutesConstraintProto.Builder.getCapacity | ( | ) |
int64 capacity = 5;
Implements com.google.ortools.sat.RoutesConstraintProtoOrBuilder.
Definition at line 1248 of file RoutesConstraintProto.java.
com.google.ortools.sat.RoutesConstraintProto com.google.ortools.sat.RoutesConstraintProto.Builder.getDefaultInstanceForType | ( | ) |
Definition at line 575 of file RoutesConstraintProto.java.
int com.google.ortools.sat.RoutesConstraintProto.Builder.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 1138 of file RoutesConstraintProto.java.
int com.google.ortools.sat.RoutesConstraintProto.Builder.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 1118 of file RoutesConstraintProto.java.
java.util.List< java.lang.Integer > com.google.ortools.sat.RoutesConstraintProto.Builder.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 1098 of file RoutesConstraintProto.java.
|
static |
Definition at line 534 of file RoutesConstraintProto.java.
com.google.protobuf.Descriptors.Descriptor com.google.ortools.sat.RoutesConstraintProto.Builder.getDescriptorForType | ( | ) |
Definition at line 570 of file RoutesConstraintProto.java.
int com.google.ortools.sat.RoutesConstraintProto.Builder.getHeads | ( | int | index | ) |
repeated int32 heads = 2;
index | The index of the element to return. |
Implements com.google.ortools.sat.RoutesConstraintProtoOrBuilder.
Definition at line 934 of file RoutesConstraintProto.java.
int com.google.ortools.sat.RoutesConstraintProto.Builder.getHeadsCount | ( | ) |
repeated int32 heads = 2;
Implements com.google.ortools.sat.RoutesConstraintProtoOrBuilder.
Definition at line 926 of file RoutesConstraintProto.java.
java.util.List< java.lang.Integer > com.google.ortools.sat.RoutesConstraintProto.Builder.getHeadsList | ( | ) |
repeated int32 heads = 2;
Implements com.google.ortools.sat.RoutesConstraintProtoOrBuilder.
Definition at line 918 of file RoutesConstraintProto.java.
int com.google.ortools.sat.RoutesConstraintProto.Builder.getLiterals | ( | int | index | ) |
repeated int32 literals = 3;
index | The index of the element to return. |
Implements com.google.ortools.sat.RoutesConstraintProtoOrBuilder.
Definition at line 1018 of file RoutesConstraintProto.java.
int com.google.ortools.sat.RoutesConstraintProto.Builder.getLiteralsCount | ( | ) |
repeated int32 literals = 3;
Implements com.google.ortools.sat.RoutesConstraintProtoOrBuilder.
Definition at line 1010 of file RoutesConstraintProto.java.
java.util.List< java.lang.Integer > com.google.ortools.sat.RoutesConstraintProto.Builder.getLiteralsList | ( | ) |
repeated int32 literals = 3;
Implements com.google.ortools.sat.RoutesConstraintProtoOrBuilder.
Definition at line 1002 of file RoutesConstraintProto.java.
int com.google.ortools.sat.RoutesConstraintProto.Builder.getTails | ( | int | index | ) |
repeated int32 tails = 1;
index | The index of the element to return. |
Implements com.google.ortools.sat.RoutesConstraintProtoOrBuilder.
Definition at line 850 of file RoutesConstraintProto.java.
int com.google.ortools.sat.RoutesConstraintProto.Builder.getTailsCount | ( | ) |
repeated int32 tails = 1;
Implements com.google.ortools.sat.RoutesConstraintProtoOrBuilder.
Definition at line 842 of file RoutesConstraintProto.java.
java.util.List< java.lang.Integer > com.google.ortools.sat.RoutesConstraintProto.Builder.getTailsList | ( | ) |
repeated int32 tails = 1;
Implements com.google.ortools.sat.RoutesConstraintProtoOrBuilder.
Definition at line 834 of file RoutesConstraintProto.java.
|
protected |
Definition at line 540 of file RoutesConstraintProto.java.
final boolean com.google.ortools.sat.RoutesConstraintProto.Builder.isInitialized | ( | ) |
Definition at line 716 of file RoutesConstraintProto.java.
Builder com.google.ortools.sat.RoutesConstraintProto.Builder.mergeFrom | ( | com.google.ortools.sat.RoutesConstraintProto | other | ) |
Definition at line 661 of file RoutesConstraintProto.java.
Builder com.google.ortools.sat.RoutesConstraintProto.Builder.mergeFrom | ( | com.google.protobuf.CodedInputStream | input, |
com.google.protobuf.ExtensionRegistryLite | extensionRegistry ) throws java.io.IOException |
Definition at line 721 of file RoutesConstraintProto.java.
Builder com.google.ortools.sat.RoutesConstraintProto.Builder.mergeFrom | ( | com.google.protobuf.Message | other | ) |
Definition at line 652 of file RoutesConstraintProto.java.
final Builder com.google.ortools.sat.RoutesConstraintProto.Builder.mergeUnknownFields | ( | final com.google.protobuf.UnknownFieldSet | unknownFields | ) |
Definition at line 1280 of file RoutesConstraintProto.java.
Builder com.google.ortools.sat.RoutesConstraintProto.Builder.setCapacity | ( | long | value | ) |
int64 capacity = 5;
value | The capacity to set. |
Definition at line 1256 of file RoutesConstraintProto.java.
Builder com.google.ortools.sat.RoutesConstraintProto.Builder.setDemands | ( | int | index, |
int | value ) |
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 to set the value at. |
value | The demands to set. |
Definition at line 1159 of file RoutesConstraintProto.java.
Builder com.google.ortools.sat.RoutesConstraintProto.Builder.setField | ( | com.google.protobuf.Descriptors.FieldDescriptor | field, |
java.lang.Object | value ) |
Definition at line 624 of file RoutesConstraintProto.java.
Builder com.google.ortools.sat.RoutesConstraintProto.Builder.setHeads | ( | int | index, |
int | value ) |
repeated int32 heads = 2;
index | The index to set the value at. |
value | The heads to set. |
Definition at line 943 of file RoutesConstraintProto.java.
Builder com.google.ortools.sat.RoutesConstraintProto.Builder.setLiterals | ( | int | index, |
int | value ) |
repeated int32 literals = 3;
index | The index to set the value at. |
value | The literals to set. |
Definition at line 1027 of file RoutesConstraintProto.java.
Builder com.google.ortools.sat.RoutesConstraintProto.Builder.setRepeatedField | ( | com.google.protobuf.Descriptors.FieldDescriptor | field, |
int | index, | ||
java.lang.Object | value ) |
Definition at line 640 of file RoutesConstraintProto.java.
Builder com.google.ortools.sat.RoutesConstraintProto.Builder.setTails | ( | int | index, |
int | value ) |
repeated int32 tails = 1;
index | The index to set the value at. |
value | The tails to set. |
Definition at line 859 of file RoutesConstraintProto.java.
final Builder com.google.ortools.sat.RoutesConstraintProto.Builder.setUnknownFields | ( | final com.google.protobuf.UnknownFieldSet | unknownFields | ) |
Definition at line 1274 of file RoutesConstraintProto.java.