[gecode-users] Stop search
Christian Schulte
cschulte at kth.se
Mon Apr 8 18:05:17 CEST 2013
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-bounces at gecode.org [mailto:users-bounces at gecode.org] On Behalf
Of christine bouzant
Sent: Monday, April 08, 2013 4:46 PM
To: cschulte at kth.se
Cc: users at 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 <cschulte at 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-bounces at gecode.org [mailto:users-bounces at gecode.org] On Behalf
Of christine bouzant
Sent: Saturday, April 06, 2013 10:01 AM
To: users at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.gecode.org/pipermail/users/attachments/20130408/c847aa4b/attachment.html>
More information about the users
mailing list