[gecode-users] Sets difference

Guido Tack tack at ps.uni-sb.de
Sat Mar 1 14:44:26 CET 2008


Mauricio Toro wrote:

> I get all the solutions (1,2,..5), (1,2,3...5), (1...5),  
> (1,2,3,4,5), but
> I just want the solutions without "..", in this case (1,2,3,4,5).

Let me ask again, please:  Does the solver really output these  
different representations of the same set??  I mean, do you just call  
Gecode's output function that writes a SetVar to an ostream, and that  
outputs sometimes (1,2,...,5) and sometimes (1,2,3,4,5)??

> is there a way to say that?
> If I use iterators, then I will get (1,2,3,4,5) many times.

Well, that is a problem in your constraint model then.  If your model  
allows many different solutions where that particular set has the same  
value, then that's what the solver will return.  As I don't know your  
model, it's hard to tell what's wrong with it.

Guido

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2436 bytes
Desc: not available
URL: <http://www.ps.uni-sb.de/pipermail/users/attachments/20080301/86c40912/attachment.bin>


More information about the gecode-users mailing list