[gecode-users] Encoding of tuples as values
Martin Mann
mmann at informatik.uni-freiburg.de
Mon Feb 20 16:07:43 CET 2012
Hi everybody,
after years I am back to implement a CSP with Gecode and would like to
get your feedback on the best way how to handle the encoding.
My problem has integer tuples (i,j) as values for its variables while i
and j are bound by an interval [1,n], ie. (i,j) \in (n x n), and n
usually < 200.
There has been much change in the Gecode library since I used it. Is
there already a way to directly use tuples as values or do I have to
encode them via integers?
If not, do you see a better/faster way of encoding than doing
v = i*(n+1) + j
such that I get i=(v/(n+1)) and j=(v%(n+1))?
If yes, do you expect a large performance difference between using
tuples or encode/decode integers? I will only need a global "distinct"
constraint, some binary order constraints and some instances of a
selfwritten binary constraint.
Thanks for your feedback!
Yours,
Martin
--
Dr. Martin Mann, PostDoc assistant
Bioinformatics - Inst. of Computer Science
Albert-Ludwigs-University Freiburg
Fax: ++49-761-203-7462
http://www.bioinf.uni-freiburg.de/~mmann/
More information about the users
mailing list