[Next]
[Up]
[Previous]
[Contents]
[Index]
Next: Labeling and variable ordering
Up: CLP(FD)
Previous: Arithmetic constraints
  Contents
  Index
- alldifferent(Vars):
- all_different(Vars):
The elements in Vars are mutually different, where Vars is
a list of terms.
- alldistinct(Vars):
- all_distinct(Vars):
This is equivalent to alldifferent(Vars), but it uses a
stronger consistency checking algorithm to exclude inconsistent values
from domains of variables. See the next chapter for the implementation
of this constraint.
- fd_element(I,L,V):
- element(I,L,V):
Succeeds if the Ith element of L is V, where I must be an integer or an integer domain variable, V a term, and L a list of terms.
- fd_atmost(N,L,V):
- atmost(N,L,V):
Succeeds if there are at most N elements in L that are
equal to V, where N must be an integer or an integer domain variable, V a term, and L a list of terms.
- fd_atleast(N,L,V):
- atleast(N,L,V):
Succeeds if there are at least N elements in L that are
equal to V, where N must be an integer or an integer domain variable, V a term, and L a list of terms.
- fd_exactly(N,L,V):
- exactly(N,L,V):
Succeeds if there are exactly N elements in L that are
equal to V, where N must be an integer or an integer domain variable, V a term, and L a list of terms.
- global_cardinality(L,Vals):
Let L be a list of integers or domain variables [X1,...,Xd] and Vals be a list of pairs [K1-V1,...,Kn-Vn] where each key Ki is a unique integer and Vi is a domain variable or an integer. The constraint is true if every element of L is equal to some key and for each pair Ki-Vi, exactly Vi elements of L are equal to Ki. This constraint is a generalization of the fd_exactly constraint.
- cumulative(Starts,Durations,Resources,Limit):
This constraint is useful for describing and solving scheduling problems. The arguments Starts, Durations, and Resources are lists of integer domain variables of the same length and Limit is an integer domain variable. Let Starts be [S1,S2,...,Sn], Durations be [D1,D2,...,Dn] and Resources be [R1,R2,...,Rn]. For each job i, Si represents the start time, Di the duration, and Ri the units of resources needed. Limit is the units of resources available at any time.
- diffn(L):
This constraint ensures that no two rectangles in L overlap with each other. A rectangle in an n-dimensional space is represented by a list of 2 x n elements [X1,X2,...,Xn,S1,S2,...,Sn] where Xi is the starting coordinate of the edge in the ith dimension and Si is the size of the edge.
- count(Val,List,RelOp,N):
Let Count be the number of elements in List that are equal to Val. Then the constraint is equivalent to
Count RelOp N. RelOp can be any arithmetic constraint symbol.
- circuit(L):
Let L be a list of variables [X1,X2,...,Xn] where each Xi has the domain 1..n. A valuation satisfies the constraint if 1->X1,2->X2,...,n->Xn forms a Hamilton cycle. To be more specific, each variable has a different value and no sub-cycles can be formed. For example, for the constraint circuit([X1,X2,X3,X4]), [3,4,2,1] is a solution, but [2,1,4,3] is not because it contains sub-cycles.
[Next]
[Up]
[Previous]
[Contents]
[Index]
Next: Labeling and variable ordering
Up: CLP(FD)
Previous: Arithmetic constraints
  Contents
  Index
Neng-Fa Zhou ()
2007-06-05