Google OR-Tools v9.14
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
com.google.ortools.sat.RoutesConstraintProto.Builder Class Reference
Inheritance diagram for com.google.ortools.sat.RoutesConstraintProto.Builder:
com.google.ortools.sat.RoutesConstraintProtoOrBuilder

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 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 ()
java.util.List< com.google.ortools.sat.RoutesConstraintProto.NodeExpressionsgetDimensionsList ()
int getDimensionsCount ()
com.google.ortools.sat.RoutesConstraintProto.NodeExpressions getDimensions (int index)
Builder setDimensions (int index, com.google.ortools.sat.RoutesConstraintProto.NodeExpressions value)
Builder setDimensions (int index, com.google.ortools.sat.RoutesConstraintProto.NodeExpressions.Builder builderForValue)
Builder addDimensions (com.google.ortools.sat.RoutesConstraintProto.NodeExpressions value)
Builder addDimensions (int index, com.google.ortools.sat.RoutesConstraintProto.NodeExpressions value)
Builder addDimensions (com.google.ortools.sat.RoutesConstraintProto.NodeExpressions.Builder builderForValue)
Builder addDimensions (int index, com.google.ortools.sat.RoutesConstraintProto.NodeExpressions.Builder builderForValue)
Builder addAllDimensions (java.lang.Iterable<? extends com.google.ortools.sat.RoutesConstraintProto.NodeExpressions > values)
Builder clearDimensions ()
Builder removeDimensions (int index)
com.google.ortools.sat.RoutesConstraintProto.NodeExpressions.Builder getDimensionsBuilder (int index)
com.google.ortools.sat.RoutesConstraintProto.NodeExpressionsOrBuilder getDimensionsOrBuilder (int index)
java.util.List<? extends com.google.ortools.sat.RoutesConstraintProto.NodeExpressionsOrBuildergetDimensionsOrBuilderList ()
com.google.ortools.sat.RoutesConstraintProto.NodeExpressions.Builder addDimensionsBuilder ()
com.google.ortools.sat.RoutesConstraintProto.NodeExpressions.Builder addDimensionsBuilder (int index)
java.util.List< com.google.ortools.sat.RoutesConstraintProto.NodeExpressions.BuildergetDimensionsBuilderList ()

Static Public Member Functions

static final com.google.protobuf.Descriptors.Descriptor getDescriptor ()

Protected Member Functions

com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable ()

Detailed Description

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 expects 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 1512 of file RoutesConstraintProto.java.

Member Function Documentation

◆ addAllDemands()

Builder com.google.ortools.sat.RoutesConstraintProto.Builder.addAllDemands ( java.lang.Iterable<? extends java.lang.Integer > values)
DEPRECATED. These fields are no longer used. The solver ignores them.

repeated int32 demands = 4;

Parameters
valuesThe demands to add.
Returns
This builder for chaining.

Definition at line 2172 of file RoutesConstraintProto.java.

◆ addAllDimensions()

Builder com.google.ortools.sat.RoutesConstraintProto.Builder.addAllDimensions ( java.lang.Iterable<? extends com.google.ortools.sat.RoutesConstraintProto.NodeExpressions > values)
Expressions associated with the nodes of the graph, such as the load of the
vehicle arriving at a node, or the time at which a vehicle arrives at a
node. Expressions with the same "dimension" (such as "load" or "time") must
be listed together.
This field is optional. If it is set, the linear constraints of size 1 or 2
between the variables in these expressions will be used to derive cuts for
this constraint. If it is not set, the solver will try to automatically
derive it, from the linear constraints of size 1 or 2 in the model (this
can fail in complex cases).

repeated .operations_research.sat.RoutesConstraintProto.NodeExpressions dimensions = 6;

Definition at line 2485 of file RoutesConstraintProto.java.

◆ addAllHeads()

Builder com.google.ortools.sat.RoutesConstraintProto.Builder.addAllHeads ( java.lang.Iterable<? extends java.lang.Integer > values)

repeated int32 heads = 2;

Parameters
valuesThe heads to add.
Returns
This builder for chaining.

Definition at line 1980 of file RoutesConstraintProto.java.

◆ addAllLiterals()

Builder com.google.ortools.sat.RoutesConstraintProto.Builder.addAllLiterals ( java.lang.Iterable<? extends java.lang.Integer > values)

repeated int32 literals = 3;

Parameters
valuesThe literals to add.
Returns
This builder for chaining.

Definition at line 2064 of file RoutesConstraintProto.java.

◆ addAllTails()

Builder com.google.ortools.sat.RoutesConstraintProto.Builder.addAllTails ( java.lang.Iterable<? extends java.lang.Integer > values)

repeated int32 tails = 1;

Parameters
valuesThe tails to add.
Returns
This builder for chaining.

Definition at line 1896 of file RoutesConstraintProto.java.

◆ addDemands()

Builder com.google.ortools.sat.RoutesConstraintProto.Builder.addDemands ( int value)
DEPRECATED. These fields are no longer used. The solver ignores them.

repeated int32 demands = 4;

Parameters
valueThe demands to add.
Returns
This builder for chaining.

Definition at line 2155 of file RoutesConstraintProto.java.

◆ addDimensions() [1/4]

Builder com.google.ortools.sat.RoutesConstraintProto.Builder.addDimensions ( com.google.ortools.sat.RoutesConstraintProto.NodeExpressions value)
Expressions associated with the nodes of the graph, such as the load of the
vehicle arriving at a node, or the time at which a vehicle arrives at a
node. Expressions with the same "dimension" (such as "load" or "time") must
be listed together.
This field is optional. If it is set, the linear constraints of size 1 or 2
between the variables in these expressions will be used to derive cuts for
this constraint. If it is not set, the solver will try to automatically
derive it, from the linear constraints of size 1 or 2 in the model (this
can fail in complex cases).

repeated .operations_research.sat.RoutesConstraintProto.NodeExpressions dimensions = 6;

Definition at line 2376 of file RoutesConstraintProto.java.

◆ addDimensions() [2/4]

Builder com.google.ortools.sat.RoutesConstraintProto.Builder.addDimensions ( com.google.ortools.sat.RoutesConstraintProto.NodeExpressions.Builder builderForValue)
Expressions associated with the nodes of the graph, such as the load of the
vehicle arriving at a node, or the time at which a vehicle arrives at a
node. Expressions with the same "dimension" (such as "load" or "time") must
be listed together.
This field is optional. If it is set, the linear constraints of size 1 or 2
between the variables in these expressions will be used to derive cuts for
this constraint. If it is not set, the solver will try to automatically
derive it, from the linear constraints of size 1 or 2 in the model (this
can fail in complex cases).

repeated .operations_research.sat.RoutesConstraintProto.NodeExpressions dimensions = 6;

Definition at line 2433 of file RoutesConstraintProto.java.

◆ addDimensions() [3/4]

Builder com.google.ortools.sat.RoutesConstraintProto.Builder.addDimensions ( int index,
com.google.ortools.sat.RoutesConstraintProto.NodeExpressions value )
Expressions associated with the nodes of the graph, such as the load of the
vehicle arriving at a node, or the time at which a vehicle arrives at a
node. Expressions with the same "dimension" (such as "load" or "time") must
be listed together.
This field is optional. If it is set, the linear constraints of size 1 or 2
between the variables in these expressions will be used to derive cuts for
this constraint. If it is not set, the solver will try to automatically
derive it, from the linear constraints of size 1 or 2 in the model (this
can fail in complex cases).

repeated .operations_research.sat.RoutesConstraintProto.NodeExpressions dimensions = 6;

Definition at line 2404 of file RoutesConstraintProto.java.

◆ addDimensions() [4/4]

Builder com.google.ortools.sat.RoutesConstraintProto.Builder.addDimensions ( int index,
com.google.ortools.sat.RoutesConstraintProto.NodeExpressions.Builder builderForValue )
Expressions associated with the nodes of the graph, such as the load of the
vehicle arriving at a node, or the time at which a vehicle arrives at a
node. Expressions with the same "dimension" (such as "load" or "time") must
be listed together.
This field is optional. If it is set, the linear constraints of size 1 or 2
between the variables in these expressions will be used to derive cuts for
this constraint. If it is not set, the solver will try to automatically
derive it, from the linear constraints of size 1 or 2 in the model (this
can fail in complex cases).

repeated .operations_research.sat.RoutesConstraintProto.NodeExpressions dimensions = 6;

Definition at line 2459 of file RoutesConstraintProto.java.

◆ addDimensionsBuilder() [1/2]

com.google.ortools.sat.RoutesConstraintProto.NodeExpressions.Builder com.google.ortools.sat.RoutesConstraintProto.Builder.addDimensionsBuilder ( )
Expressions associated with the nodes of the graph, such as the load of the
vehicle arriving at a node, or the time at which a vehicle arrives at a
node. Expressions with the same "dimension" (such as "load" or "time") must
be listed together.
This field is optional. If it is set, the linear constraints of size 1 or 2
between the variables in these expressions will be used to derive cuts for
this constraint. If it is not set, the solver will try to automatically
derive it, from the linear constraints of size 1 or 2 in the model (this
can fail in complex cases).

repeated .operations_research.sat.RoutesConstraintProto.NodeExpressions dimensions = 6;

Definition at line 2626 of file RoutesConstraintProto.java.

◆ addDimensionsBuilder() [2/2]

com.google.ortools.sat.RoutesConstraintProto.NodeExpressions.Builder com.google.ortools.sat.RoutesConstraintProto.Builder.addDimensionsBuilder ( int index)
Expressions associated with the nodes of the graph, such as the load of the
vehicle arriving at a node, or the time at which a vehicle arrives at a
node. Expressions with the same "dimension" (such as "load" or "time") must
be listed together.
This field is optional. If it is set, the linear constraints of size 1 or 2
between the variables in these expressions will be used to derive cuts for
this constraint. If it is not set, the solver will try to automatically
derive it, from the linear constraints of size 1 or 2 in the model (this
can fail in complex cases).

repeated .operations_research.sat.RoutesConstraintProto.NodeExpressions dimensions = 6;

Definition at line 2645 of file RoutesConstraintProto.java.

◆ addHeads()

Builder com.google.ortools.sat.RoutesConstraintProto.Builder.addHeads ( int value)

repeated int32 heads = 2;

Parameters
valueThe heads to add.
Returns
This builder for chaining.

Definition at line 1967 of file RoutesConstraintProto.java.

◆ addLiterals()

Builder com.google.ortools.sat.RoutesConstraintProto.Builder.addLiterals ( int value)

repeated int32 literals = 3;

Parameters
valueThe literals to add.
Returns
This builder for chaining.

Definition at line 2051 of file RoutesConstraintProto.java.

◆ addTails()

Builder com.google.ortools.sat.RoutesConstraintProto.Builder.addTails ( int value)

repeated int32 tails = 1;

Parameters
valueThe tails to add.
Returns
This builder for chaining.

Definition at line 1883 of file RoutesConstraintProto.java.

◆ build()

com.google.ortools.sat.RoutesConstraintProto com.google.ortools.sat.RoutesConstraintProto.Builder.build ( )

Definition at line 1570 of file RoutesConstraintProto.java.

◆ buildPartial()

com.google.ortools.sat.RoutesConstraintProto com.google.ortools.sat.RoutesConstraintProto.Builder.buildPartial ( )

Definition at line 1579 of file RoutesConstraintProto.java.

◆ clear()

Builder com.google.ortools.sat.RoutesConstraintProto.Builder.clear ( )

Definition at line 1540 of file RoutesConstraintProto.java.

◆ clearCapacity()

Builder com.google.ortools.sat.RoutesConstraintProto.Builder.clearCapacity ( )

int64 capacity = 5;

Returns
This builder for chaining.

Definition at line 2221 of file RoutesConstraintProto.java.

◆ clearDemands()

Builder com.google.ortools.sat.RoutesConstraintProto.Builder.clearDemands ( )
DEPRECATED. These fields are no longer used. The solver ignores them.

repeated int32 demands = 4;

Returns
This builder for chaining.

Definition at line 2189 of file RoutesConstraintProto.java.

◆ clearDimensions()

Builder com.google.ortools.sat.RoutesConstraintProto.Builder.clearDimensions ( )
Expressions associated with the nodes of the graph, such as the load of the
vehicle arriving at a node, or the time at which a vehicle arrives at a
node. Expressions with the same "dimension" (such as "load" or "time") must
be listed together.
This field is optional. If it is set, the linear constraints of size 1 or 2
between the variables in these expressions will be used to derive cuts for
this constraint. If it is not set, the solver will try to automatically
derive it, from the linear constraints of size 1 or 2 in the model (this
can fail in complex cases).

repeated .operations_research.sat.RoutesConstraintProto.NodeExpressions dimensions = 6;

Definition at line 2512 of file RoutesConstraintProto.java.

◆ clearHeads()

Builder com.google.ortools.sat.RoutesConstraintProto.Builder.clearHeads ( )

repeated int32 heads = 2;

Returns
This builder for chaining.

Definition at line 1993 of file RoutesConstraintProto.java.

◆ clearLiterals()

Builder com.google.ortools.sat.RoutesConstraintProto.Builder.clearLiterals ( )

repeated int32 literals = 3;

Returns
This builder for chaining.

Definition at line 2077 of file RoutesConstraintProto.java.

◆ clearTails()

Builder com.google.ortools.sat.RoutesConstraintProto.Builder.clearTails ( )

repeated int32 tails = 1;

Returns
This builder for chaining.

Definition at line 1909 of file RoutesConstraintProto.java.

◆ getCapacity()

long com.google.ortools.sat.RoutesConstraintProto.Builder.getCapacity ( )

int64 capacity = 5;

Returns
The capacity.

Implements com.google.ortools.sat.RoutesConstraintProtoOrBuilder.

Definition at line 2202 of file RoutesConstraintProto.java.

◆ getDefaultInstanceForType()

com.google.ortools.sat.RoutesConstraintProto com.google.ortools.sat.RoutesConstraintProto.Builder.getDefaultInstanceForType ( )

Definition at line 1565 of file RoutesConstraintProto.java.

◆ getDemands()

int com.google.ortools.sat.RoutesConstraintProto.Builder.getDemands ( int index)
DEPRECATED. These fields are no longer used. The solver ignores them.

repeated int32 demands = 4;

Parameters
indexThe index of the element to return.
Returns
The demands at the given index.

Implements com.google.ortools.sat.RoutesConstraintProtoOrBuilder.

Definition at line 2124 of file RoutesConstraintProto.java.

◆ getDemandsCount()

int com.google.ortools.sat.RoutesConstraintProto.Builder.getDemandsCount ( )
DEPRECATED. These fields are no longer used. The solver ignores them.

repeated int32 demands = 4;

Returns
The count of demands.

Implements com.google.ortools.sat.RoutesConstraintProtoOrBuilder.

Definition at line 2112 of file RoutesConstraintProto.java.

◆ getDemandsList()

java.util.List< java.lang.Integer > com.google.ortools.sat.RoutesConstraintProto.Builder.getDemandsList ( )
DEPRECATED. These fields are no longer used. The solver ignores them.

repeated int32 demands = 4;

Returns
A list containing the demands.

Implements com.google.ortools.sat.RoutesConstraintProtoOrBuilder.

Definition at line 2100 of file RoutesConstraintProto.java.

◆ getDescriptor()

final com.google.protobuf.Descriptors.Descriptor com.google.ortools.sat.RoutesConstraintProto.Builder.getDescriptor ( )
static

Definition at line 1517 of file RoutesConstraintProto.java.

◆ getDescriptorForType()

com.google.protobuf.Descriptors.Descriptor com.google.ortools.sat.RoutesConstraintProto.Builder.getDescriptorForType ( )

Definition at line 1560 of file RoutesConstraintProto.java.

◆ getDimensions()

com.google.ortools.sat.RoutesConstraintProto.NodeExpressions com.google.ortools.sat.RoutesConstraintProto.Builder.getDimensions ( int index)
Expressions associated with the nodes of the graph, such as the load of the
vehicle arriving at a node, or the time at which a vehicle arrives at a
node. Expressions with the same "dimension" (such as "load" or "time") must
be listed together.
This field is optional. If it is set, the linear constraints of size 1 or 2
between the variables in these expressions will be used to derive cuts for
this constraint. If it is not set, the solver will try to automatically
derive it, from the linear constraints of size 1 or 2 in the model (this
can fail in complex cases).

repeated .operations_research.sat.RoutesConstraintProto.NodeExpressions dimensions = 6;

Implements com.google.ortools.sat.RoutesConstraintProtoOrBuilder.

Definition at line 2299 of file RoutesConstraintProto.java.

◆ getDimensionsBuilder()

com.google.ortools.sat.RoutesConstraintProto.NodeExpressions.Builder com.google.ortools.sat.RoutesConstraintProto.Builder.getDimensionsBuilder ( int index)
Expressions associated with the nodes of the graph, such as the load of the
vehicle arriving at a node, or the time at which a vehicle arrives at a
node. Expressions with the same "dimension" (such as "load" or "time") must
be listed together.
This field is optional. If it is set, the linear constraints of size 1 or 2
between the variables in these expressions will be used to derive cuts for
this constraint. If it is not set, the solver will try to automatically
derive it, from the linear constraints of size 1 or 2 in the model (this
can fail in complex cases).

repeated .operations_research.sat.RoutesConstraintProto.NodeExpressions dimensions = 6;

Definition at line 2562 of file RoutesConstraintProto.java.

◆ getDimensionsBuilderList()

java.util.List< com.google.ortools.sat.RoutesConstraintProto.NodeExpressions.Builder > com.google.ortools.sat.RoutesConstraintProto.Builder.getDimensionsBuilderList ( )
Expressions associated with the nodes of the graph, such as the load of the
vehicle arriving at a node, or the time at which a vehicle arrives at a
node. Expressions with the same "dimension" (such as "load" or "time") must
be listed together.
This field is optional. If it is set, the linear constraints of size 1 or 2
between the variables in these expressions will be used to derive cuts for
this constraint. If it is not set, the solver will try to automatically
derive it, from the linear constraints of size 1 or 2 in the model (this
can fail in complex cases).

repeated .operations_research.sat.RoutesConstraintProto.NodeExpressions dimensions = 6;

Definition at line 2666 of file RoutesConstraintProto.java.

◆ getDimensionsCount()

int com.google.ortools.sat.RoutesConstraintProto.Builder.getDimensionsCount ( )
Expressions associated with the nodes of the graph, such as the load of the
vehicle arriving at a node, or the time at which a vehicle arrives at a
node. Expressions with the same "dimension" (such as "load" or "time") must
be listed together.
This field is optional. If it is set, the linear constraints of size 1 or 2
between the variables in these expressions will be used to derive cuts for
this constraint. If it is not set, the solver will try to automatically
derive it, from the linear constraints of size 1 or 2 in the model (this
can fail in complex cases).

repeated .operations_research.sat.RoutesConstraintProto.NodeExpressions dimensions = 6;

Implements com.google.ortools.sat.RoutesConstraintProtoOrBuilder.

Definition at line 2277 of file RoutesConstraintProto.java.

◆ getDimensionsList()

java.util.List< com.google.ortools.sat.RoutesConstraintProto.NodeExpressions > com.google.ortools.sat.RoutesConstraintProto.Builder.getDimensionsList ( )
Expressions associated with the nodes of the graph, such as the load of the
vehicle arriving at a node, or the time at which a vehicle arrives at a
node. Expressions with the same "dimension" (such as "load" or "time") must
be listed together.
This field is optional. If it is set, the linear constraints of size 1 or 2
between the variables in these expressions will be used to derive cuts for
this constraint. If it is not set, the solver will try to automatically
derive it, from the linear constraints of size 1 or 2 in the model (this
can fail in complex cases).

repeated .operations_research.sat.RoutesConstraintProto.NodeExpressions dimensions = 6;

Implements com.google.ortools.sat.RoutesConstraintProtoOrBuilder.

Definition at line 2255 of file RoutesConstraintProto.java.

◆ getDimensionsOrBuilder()

com.google.ortools.sat.RoutesConstraintProto.NodeExpressionsOrBuilder com.google.ortools.sat.RoutesConstraintProto.Builder.getDimensionsOrBuilder ( int index)
Expressions associated with the nodes of the graph, such as the load of the
vehicle arriving at a node, or the time at which a vehicle arrives at a
node. Expressions with the same "dimension" (such as "load" or "time") must
be listed together.
This field is optional. If it is set, the linear constraints of size 1 or 2
between the variables in these expressions will be used to derive cuts for
this constraint. If it is not set, the solver will try to automatically
derive it, from the linear constraints of size 1 or 2 in the model (this
can fail in complex cases).

repeated .operations_research.sat.RoutesConstraintProto.NodeExpressions dimensions = 6;

Implements com.google.ortools.sat.RoutesConstraintProtoOrBuilder.

Definition at line 2581 of file RoutesConstraintProto.java.

◆ getDimensionsOrBuilderList()

java.util.List<? extends com.google.ortools.sat.RoutesConstraintProto.NodeExpressionsOrBuilder > com.google.ortools.sat.RoutesConstraintProto.Builder.getDimensionsOrBuilderList ( )
Expressions associated with the nodes of the graph, such as the load of the
vehicle arriving at a node, or the time at which a vehicle arrives at a
node. Expressions with the same "dimension" (such as "load" or "time") must
be listed together.
This field is optional. If it is set, the linear constraints of size 1 or 2
between the variables in these expressions will be used to derive cuts for
this constraint. If it is not set, the solver will try to automatically
derive it, from the linear constraints of size 1 or 2 in the model (this
can fail in complex cases).

repeated .operations_research.sat.RoutesConstraintProto.NodeExpressions dimensions = 6;

Implements com.google.ortools.sat.RoutesConstraintProtoOrBuilder.

Definition at line 2604 of file RoutesConstraintProto.java.

◆ getHeads()

int com.google.ortools.sat.RoutesConstraintProto.Builder.getHeads ( int index)

repeated int32 heads = 2;

Parameters
indexThe index of the element to return.
Returns
The heads at the given index.

Implements com.google.ortools.sat.RoutesConstraintProtoOrBuilder.

Definition at line 1944 of file RoutesConstraintProto.java.

◆ getHeadsCount()

int com.google.ortools.sat.RoutesConstraintProto.Builder.getHeadsCount ( )

repeated int32 heads = 2;

Returns
The count of heads.

Implements com.google.ortools.sat.RoutesConstraintProtoOrBuilder.

Definition at line 1936 of file RoutesConstraintProto.java.

◆ getHeadsList()

java.util.List< java.lang.Integer > com.google.ortools.sat.RoutesConstraintProto.Builder.getHeadsList ( )

repeated int32 heads = 2;

Returns
A list containing the heads.

Implements com.google.ortools.sat.RoutesConstraintProtoOrBuilder.

Definition at line 1928 of file RoutesConstraintProto.java.

◆ getLiterals()

int com.google.ortools.sat.RoutesConstraintProto.Builder.getLiterals ( int index)

repeated int32 literals = 3;

Parameters
indexThe index of the element to return.
Returns
The literals at the given index.

Implements com.google.ortools.sat.RoutesConstraintProtoOrBuilder.

Definition at line 2028 of file RoutesConstraintProto.java.

◆ getLiteralsCount()

int com.google.ortools.sat.RoutesConstraintProto.Builder.getLiteralsCount ( )

repeated int32 literals = 3;

Returns
The count of literals.

Implements com.google.ortools.sat.RoutesConstraintProtoOrBuilder.

Definition at line 2020 of file RoutesConstraintProto.java.

◆ getLiteralsList()

java.util.List< java.lang.Integer > com.google.ortools.sat.RoutesConstraintProto.Builder.getLiteralsList ( )

repeated int32 literals = 3;

Returns
A list containing the literals.

Implements com.google.ortools.sat.RoutesConstraintProtoOrBuilder.

Definition at line 2012 of file RoutesConstraintProto.java.

◆ getTails()

int com.google.ortools.sat.RoutesConstraintProto.Builder.getTails ( int index)

repeated int32 tails = 1;

Parameters
indexThe index of the element to return.
Returns
The tails at the given index.

Implements com.google.ortools.sat.RoutesConstraintProtoOrBuilder.

Definition at line 1860 of file RoutesConstraintProto.java.

◆ getTailsCount()

int com.google.ortools.sat.RoutesConstraintProto.Builder.getTailsCount ( )

repeated int32 tails = 1;

Returns
The count of tails.

Implements com.google.ortools.sat.RoutesConstraintProtoOrBuilder.

Definition at line 1852 of file RoutesConstraintProto.java.

◆ getTailsList()

java.util.List< java.lang.Integer > com.google.ortools.sat.RoutesConstraintProto.Builder.getTailsList ( )

repeated int32 tails = 1;

Returns
A list containing the tails.

Implements com.google.ortools.sat.RoutesConstraintProtoOrBuilder.

Definition at line 1844 of file RoutesConstraintProto.java.

◆ internalGetFieldAccessorTable()

com.google.protobuf.GeneratedMessage.FieldAccessorTable com.google.ortools.sat.RoutesConstraintProto.Builder.internalGetFieldAccessorTable ( )
protected

Definition at line 1523 of file RoutesConstraintProto.java.

◆ isInitialized()

final boolean com.google.ortools.sat.RoutesConstraintProto.Builder.isInitialized ( )

Definition at line 1713 of file RoutesConstraintProto.java.

◆ mergeFrom() [1/3]

Builder com.google.ortools.sat.RoutesConstraintProto.Builder.mergeFrom ( com.google.ortools.sat.RoutesConstraintProto other)

Definition at line 1632 of file RoutesConstraintProto.java.

◆ mergeFrom() [2/3]

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 1718 of file RoutesConstraintProto.java.

◆ mergeFrom() [3/3]

Builder com.google.ortools.sat.RoutesConstraintProto.Builder.mergeFrom ( com.google.protobuf.Message other)

Definition at line 1623 of file RoutesConstraintProto.java.

◆ removeDimensions()

Builder com.google.ortools.sat.RoutesConstraintProto.Builder.removeDimensions ( int index)
Expressions associated with the nodes of the graph, such as the load of the
vehicle arriving at a node, or the time at which a vehicle arrives at a
node. Expressions with the same "dimension" (such as "load" or "time") must
be listed together.
This field is optional. If it is set, the linear constraints of size 1 or 2
between the variables in these expressions will be used to derive cuts for
this constraint. If it is not set, the solver will try to automatically
derive it, from the linear constraints of size 1 or 2 in the model (this
can fail in complex cases).

repeated .operations_research.sat.RoutesConstraintProto.NodeExpressions dimensions = 6;

Definition at line 2537 of file RoutesConstraintProto.java.

◆ setCapacity()

Builder com.google.ortools.sat.RoutesConstraintProto.Builder.setCapacity ( long value)

int64 capacity = 5;

Parameters
valueThe capacity to set.
Returns
This builder for chaining.

Definition at line 2210 of file RoutesConstraintProto.java.

◆ setDemands()

Builder com.google.ortools.sat.RoutesConstraintProto.Builder.setDemands ( int index,
int value )
DEPRECATED. These fields are no longer used. The solver ignores them.

repeated int32 demands = 4;

Parameters
indexThe index to set the value at.
valueThe demands to set.
Returns
This builder for chaining.

Definition at line 2137 of file RoutesConstraintProto.java.

◆ setDimensions() [1/2]

Builder com.google.ortools.sat.RoutesConstraintProto.Builder.setDimensions ( int index,
com.google.ortools.sat.RoutesConstraintProto.NodeExpressions value )
Expressions associated with the nodes of the graph, such as the load of the
vehicle arriving at a node, or the time at which a vehicle arrives at a
node. Expressions with the same "dimension" (such as "load" or "time") must
be listed together.
This field is optional. If it is set, the linear constraints of size 1 or 2
between the variables in these expressions will be used to derive cuts for
this constraint. If it is not set, the solver will try to automatically
derive it, from the linear constraints of size 1 or 2 in the model (this
can fail in complex cases).

repeated .operations_research.sat.RoutesConstraintProto.NodeExpressions dimensions = 6;

Definition at line 2321 of file RoutesConstraintProto.java.

◆ setDimensions() [2/2]

Builder com.google.ortools.sat.RoutesConstraintProto.Builder.setDimensions ( int index,
com.google.ortools.sat.RoutesConstraintProto.NodeExpressions.Builder builderForValue )
Expressions associated with the nodes of the graph, such as the load of the
vehicle arriving at a node, or the time at which a vehicle arrives at a
node. Expressions with the same "dimension" (such as "load" or "time") must
be listed together.
This field is optional. If it is set, the linear constraints of size 1 or 2
between the variables in these expressions will be used to derive cuts for
this constraint. If it is not set, the solver will try to automatically
derive it, from the linear constraints of size 1 or 2 in the model (this
can fail in complex cases).

repeated .operations_research.sat.RoutesConstraintProto.NodeExpressions dimensions = 6;

Definition at line 2350 of file RoutesConstraintProto.java.

◆ setHeads()

Builder com.google.ortools.sat.RoutesConstraintProto.Builder.setHeads ( int index,
int value )

repeated int32 heads = 2;

Parameters
indexThe index to set the value at.
valueThe heads to set.
Returns
This builder for chaining.

Definition at line 1953 of file RoutesConstraintProto.java.

◆ setLiterals()

Builder com.google.ortools.sat.RoutesConstraintProto.Builder.setLiterals ( int index,
int value )

repeated int32 literals = 3;

Parameters
indexThe index to set the value at.
valueThe literals to set.
Returns
This builder for chaining.

Definition at line 2037 of file RoutesConstraintProto.java.

◆ setTails()

Builder com.google.ortools.sat.RoutesConstraintProto.Builder.setTails ( int index,
int value )

repeated int32 tails = 1;

Parameters
indexThe index to set the value at.
valueThe tails to set.
Returns
This builder for chaining.

Definition at line 1869 of file RoutesConstraintProto.java.


The documentation for this class was generated from the following file: