[gecode-users] Symbolic Constraints - fd_relation contraint in Gecode?

Pedro Salgueiro pds at di.uevora.pt
Tue May 19 17:39:54 CEST 2009


Hi!

GNU Prolog has a Symbolic Constraint called fd_relation that constraints
a tuple of variables to be equal to one tuple of a list of relations.

Here is its description: 

fd_relation(Relation, Vars) constraints the tuple of variables Vars to
be equal to one tuple of the list Relation. A tuple is represented by a
list.

Using this predicate as follows:

fd_relation([[0,0,0],[0,1,0]], [X,Y,Z]).

the tuple [X,Y,Z] only could take the values specified in the tuple list
[[0,0,0],[0,1,0]].

Here is its documentation:
http://www.gprolog.org/manual/html_node/gprolog062.html#toc274

Is there any simple way to do this in Gecode? Maybe a constraint that
limits the domain values of a tuple defined by an IntVarArray to any of
the elements of an array, where each element of such array is an array
composed by Integer values, defining a tuple.

Any help will be appreciated :)

Thanks
Pedro Salgueiro










More information about the gecode-users mailing list