Hmmm, that's bizarre. The efficiency should not depend on the size of the numbers but just of the numbers of tuples in a tuple set! Maybe this is actually a bug.
Mikael: could you comment, please! [Mikael is the guy who did the extensional stuff] Christian -----Original Message----- From: Pedro Salgueiro [mailto:pedro.salgue...@gmail.com] On Behalf Of Pedro Salgueiro Sent: Wednesday, May 20, 2009 6:59 PM To: us...@gecode.org; Christian Schulte Cc: p...@di.uevora.pt Subject: RE: [gecode-users] Symbolic Constraints - fd_relation contraint in Gecode? Hi! I already managed to use the "extensional" constraints with tuples and they are great, but I have some problems modeling my problem with these constraints. In my problem, each valid tuples are composed by 16 values, and some of those values can have very large values, such as 800000 or 900000. The table I used to test has 125 of those tuples. I have tested it with Gecode 2.x, and with values that big it gave segmentation fault. Then I updated it to Gecode 3.0.2 and it worked, but its performance is really bad. Then I replaced the large values of the tuples in the table with smaller ones, and the performance got lot better. When I started to increment some of the values, the performance of starts to get much worse... Is this the expected behavior of Gecode when handling with large integers, or am I doing something wrong? Thank you, Pedro Salgueiro On Tue, 2009-05-19 at 21:37 +0200, Christian Schulte wrote: > Yes, these constraints are called "extensional" (or user-defined > constraints). Gecode has quite some support for that: you can specify the > relation by a set of tuples (that's implemented as lists of lists in Prolog) > or by a regular expression or DFA. Please check "Modeling with Gecode", it > elaborates on extensional constraints. > > Christian > > -----Original Message----- > From: users-boun...@gecode.org [mailto:users-boun...@gecode.org] On Behalf > Of Pedro Salgueiro > Sent: Tuesday, May 19, 2009 5:40 PM > To: us...@gecode.org > Subject: [gecode-users] Symbolic Constraints - fd_relation contraint in > Gecode? > > 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 > > > > > > > > _______________________________________________ > Gecode users mailing list > us...@gecode.org > https://www.gecode.org/mailman/listinfo/gecode-users > _______________________________________________ Gecode users mailing list us...@gecode.org https://www.gecode.org/mailman/listinfo/gecode-users