[gecode-users] Stop search

christine bouzant christine.bouzant at gmail.com
Mon Apr 8 16:45:45 CEST 2013


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/6e9d521d/attachment.html>


More information about the users mailing list