Then why not compute all solutions with a while loop and continue until you find a solution for which sum(canBeTaken) >= 4.
Best Christian -- Christian Schulte, Professor of Computer Science, KTH, www.ict.kth.se/~cschulte/ From: users-boun...@gecode.org [mailto:users-boun...@gecode.org] On Behalf Of christine bouzant Sent: Monday, April 08, 2013 4:46 PM To: cschu...@kth.se Cc: users@gecode.org Subject: Re: [gecode-users] Stop search Hi Christian, Actually, i'd like to accept any solution, even if sum(CanBeTaken)<4. But if sum(CanBeTaken)>=4, i 'd like to stop search because i am not interested by other solutions. Cheers, Christine 2013/4/7 Christian Schulte <cschu...@kth.se> Hi Christine, Hmm, no you can't use stop objects for that. Why would adding the condition sum(CanBeTaken) >= 4 to the script as a constraint not work? Then you would know that any solution would satisfy this property? Best Christian -- Christian Schulte, www.ict.kth.se/~cschulte/ From: users-boun...@gecode.org [mailto:users-boun...@gecode.org] On Behalf Of christine bouzant Sent: Saturday, April 06, 2013 10:01 AM To: users@gecode.org Subject: [gecode-users] Stop search Dear all, I am new to gecode and constraint programming, so sorry by advance for my questions. I'd like to stop search when in my model i have the condition sum(CanBeTaken) >=4 where CanBeTaken is a BoolVarArray. I have read about stop objects but as i understand, a stop object cannot take a model as argument since everything is copied in Gecode, right ? Would you have a solution to stop search, depending of the current state of the model ? Cheers, Christine.
_______________________________________________ Gecode users mailing list users@gecode.org https://www.gecode.org/mailman/listinfo/gecode-users