DotNet Reference

DotNet Reference

RoutesConstraintProto

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.

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.

Definition at line 2614 of file CpModel.pb.cs.

Public Member Functions

 RoutesConstraintProto ()
 
 RoutesConstraintProto (RoutesConstraintProto other)
 
RoutesConstraintProto Clone ()
 
override bool Equals (object other)
 
bool Equals (RoutesConstraintProto other)
 
override int GetHashCode ()
 
override string ToString ()
 
void WriteTo (pb::CodedOutputStream output)
 
int CalculateSize ()
 
void MergeFrom (RoutesConstraintProto other)
 
void MergeFrom (pb::CodedInputStream input)
 

Static Public Attributes

const int TailsFieldNumber = 1
 Field number for the "tails" field. More...
 
const int HeadsFieldNumber = 2
 Field number for the "heads" field. More...
 
const int LiteralsFieldNumber = 3
 Field number for the "literals" field. More...
 
const int DemandsFieldNumber = 4
 Field number for the "demands" field. More...
 
const int CapacityFieldNumber = 5
 Field number for the "capacity" field. More...
 

Properties

static pb::MessageParser< RoutesConstraintProtoParser [get]
 
static pbr::MessageDescriptor Descriptor [get]
 
pbc::RepeatedField< int > Tails [get]
 
pbc::RepeatedField< int > Heads [get]
 
pbc::RepeatedField< int > Literals [get]
 
pbc::RepeatedField< int > Demands [get]
 Experimental. More...
 
long Capacity [get, set]
 

Constructor & Destructor Documentation

◆ RoutesConstraintProto() [1/2]

Definition at line 2631 of file CpModel.pb.cs.

◆ RoutesConstraintProto() [2/2]

Definition at line 2638 of file CpModel.pb.cs.

Member Function Documentation

◆ CalculateSize()

int CalculateSize ( )
inline

Definition at line 2764 of file CpModel.pb.cs.

◆ Clone()

RoutesConstraintProto Clone ( )
inline

Definition at line 2648 of file CpModel.pb.cs.

◆ Equals() [1/2]

override bool Equals ( object  other)
inline

Definition at line 2709 of file CpModel.pb.cs.

◆ Equals() [2/2]

bool Equals ( RoutesConstraintProto  other)
inline

Definition at line 2714 of file CpModel.pb.cs.

◆ GetHashCode()

override int GetHashCode ( )
inline

Definition at line 2730 of file CpModel.pb.cs.

◆ MergeFrom() [1/2]

void MergeFrom ( pb::CodedInputStream  input)
inline

Definition at line 2795 of file CpModel.pb.cs.

◆ MergeFrom() [2/2]

void MergeFrom ( RoutesConstraintProto  other)
inline

Definition at line 2780 of file CpModel.pb.cs.

◆ ToString()

override string ToString ( )
inline

Definition at line 2744 of file CpModel.pb.cs.

◆ WriteTo()

void WriteTo ( pb::CodedOutputStream  output)
inline

Definition at line 2749 of file CpModel.pb.cs.

Member Data Documentation

◆ CapacityFieldNumber

const int CapacityFieldNumber = 5
static

Field number for the "capacity" field.

Definition at line 2698 of file CpModel.pb.cs.

◆ DemandsFieldNumber

const int DemandsFieldNumber = 4
static

Field number for the "demands" field.

Definition at line 2683 of file CpModel.pb.cs.

◆ HeadsFieldNumber

const int HeadsFieldNumber = 2
static

Field number for the "heads" field.

Definition at line 2663 of file CpModel.pb.cs.

◆ LiteralsFieldNumber

const int LiteralsFieldNumber = 3
static

Field number for the "literals" field.

Definition at line 2673 of file CpModel.pb.cs.

◆ TailsFieldNumber

const int TailsFieldNumber = 1
static

Field number for the "tails" field.

Definition at line 2653 of file CpModel.pb.cs.

Property Documentation

◆ Capacity

long Capacity
getset

Definition at line 2701 of file CpModel.pb.cs.

◆ Demands

pbc.RepeatedField<int> Demands
get

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.

Definition at line 2693 of file CpModel.pb.cs.

◆ Descriptor

pbr.MessageDescriptor Descriptor
staticget

Definition at line 2621 of file CpModel.pb.cs.

◆ Heads

pbc.RepeatedField<int> Heads
get

Definition at line 2668 of file CpModel.pb.cs.

◆ Literals

pbc.RepeatedField<int> Literals
get

Definition at line 2678 of file CpModel.pb.cs.

◆ Parser

pb.MessageParser<RoutesConstraintProto> Parser
staticget

Definition at line 2618 of file CpModel.pb.cs.

◆ Tails

pbc.RepeatedField<int> Tails
get

Definition at line 2658 of file CpModel.pb.cs.


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