Hello,

I already asked for the following problem:

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.

I got the following response:

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.

Thank you for the solution, it works very well, but I have an other problem
which is the enumeration order of the variables x, y, z and k. I must begin
the branching from the variables  z and k, then x, y (In this way, Gecode
enumerates quickly the solutions but for the first order "x,y,z,k", it takes
about 30 minutes to enumerate the first solution).
Is there an other solution?

Thank you.
-----
Amina


_______________________________________________
Gecode users mailing list
users@gecode.org
https://www.gecode.org/mailman/listinfo/gecode-users

Reply via email to