Succ and Pred are list of N elements, representing a digraph of N nodes, where the i'th element of Succ and Pred represents the successor and predecessor of the node i respectively. The constraint enforces each node in the digraph to have one successor and one predessor node, and that if node y is the successor of node x, then node x is the predecessor of node y.
This is currently a prototype -- the constraint has not been tested very extensively and little effort has been spent to optimise performance. We welcome any feedback on using this constraint.
This constraint is known as inverse in the global constraint catalog, but with implicit node index based on the position in the list.