[gecode-users] Display the values of a set of variable without duplicates

Christian Schulte cschulte at kth.se
Sun May 12 14:25:32 CEST 2013


Hi,

One way to do it is as follows:
 - You create a space s that only has a brancher for x and y
 - You create a search engine e1 for s and find a solution, say s1
 - You post a brancher in s1 for z and k.
 - You create a search engine e2 for s and find just a single solution!
 - You can then also get more solutions from e1 and repeat the previous two
steps.

That should do the trick

Best
Christian

--
Christian Schulte, www.ict.kth.se/~cschulte/


> -----Original Message-----
> From: users-bounces at gecode.org [mailto:users-bounces at gecode.org] On
> Behalf Of Kemmar Amina
> Sent: Sunday, May 12, 2013 2:28 PM
> To: users at gecode.org
> Subject: [gecode-users] Display the values of a set of variable without
duplicates
> 
> Hello,
> 
> According to the variables defined in our model (x,y,z,k), I obtained the
> following solutions :
> 
> 1,1,2,3
> 1,1,5,6
> 1,1,7,9
> 1.1,8,8
> 
> I am interested to the values of the two variable x and y, so I want to
avoid the
> enumeration of the three last solution in order to display just the first
solution.
> After the enumeration of the first solution, I think that it is necessary
to do a
> backtrack to the the variable x.
> 
> How can I do this?
> 
> 
> Thanks.
> 
> _______________________________________________
> Gecode users mailing list
> users at gecode.org
> https://www.gecode.org/mailman/listinfo/gecode-users




More information about the users mailing list