[gecode-users] A problem for restart
Zhu Zichen's cse
zzhu at cse.cuhk.edu.hk
Tue Dec 16 15:43:07 CET 2014
Dear all,
I met a problem when using restart in Gecode.
I simply use restart to find all solutions for 4-Queens while use the same
heuristic after each restart:
./nqueen_rbs -restart geometric -restart-scale 2 -restart-base 10 -nogoods
1 -nogoods-limit 128 4
But I got into an infinite loop which keeps printing the first solution.
According to the newest version of document "MPG" (page 160), the master()
function posts no-goods when the a solution is found. This means the same
solution will not be found again.
I rewrite the master() function by changing the last line "return true"
into "return false", now all solutions are generated without trapped into a
loop.
I am wondering why the infinite loop happens and whether Gecode has truly
recorded previous solutions as nogoods as the document says.
Thanks for help.
Zichen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.gecode.org/pipermail/users/attachments/20141216/6bd5839f/attachment.html>
More information about the users
mailing list