[gecode-users] using MaximizeScript to find the optimal solution

Guido Tack tack at gecode.org
Wed Dec 4 21:40:02 CET 2013


There's a bab function that does that.  Otherwise just loop through the solutions and ignore all but the last (that's exactly what the bab function does).

Cheers,
Guido

On 4 Dec 2013, at 2:22 am, naguissa light <naguissa1989 at gmail.com> wrote:

> Thank You very much for your help
> 
> Is there any option to just get directly to the best one without geting all of the solutions ?????
> 
> Naguissa 
> 
> 
> 2013/12/3 Christian Schulte <cschulte at kth.se>
> You really need to read MPG: BAB also returns several solutions (if you use it that way). The one found last is 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 naguissa light
> Sent: Tuesday, December 03, 2013 3:34 PM
> To: Guido Tack
> Cc: users at gecode.org list
> Subject: Re: [gecode-users] using MaximizeScript to find the optimal solution
> 
>  
> 
> Thank you very much for your answer.
> 
> So to find all the feasable solution of a model i just use DFS
> 
> when i want to find the optimal solution of the objectiv function of the model i use BAB
> 
> my question here : is it normal to find more then one optimal solution to the objective function of my model?????
> 
> Thank you very much
> 
> Naguissa
> 
>  
> 
> 2013/12/3 Guido Tack <tack at gecode.org>
> 
> Hi,
> 
>  
> 
> I don't think I understand your question.  Whether you inherit from Space or from MaximizeScript shouldn't make any difference to the number of solutions when using DFS.
> 
> In order to enumerate all optimal solutions, you first have to run a BAB to get the value of the objective, and then run another search for all solutions using DFS, where you post an additional constraint to set the objective to that optimal value.
> 
>  
> 
> Cheers,
> 
> Guido
> 
>  
> 
> -- 
> 
> Guido Tack
> 
> http://www.csse.monash.edu/~guidot/
> 
>  
> 
>  
> 
>  
> 
> On 3 Dec 2013, at 1:40 pm, naguissa light <naguissa1989 at gmail.com> wrote:
> 
>  
> 
> I was wondring about that because when i try to get just one feasable solution for my model i used Space ( the numbre of feasable solutions are 48) so when i try to get the optimal solution for my model i used MaximizeScript and i get 1140 solutions !!!!!!!!!!!! is that normal ????,,
> 
> Did i miss any thing here???
> 
> Thank You for your help
> 
> Naguissa
> 
>  
> 
> 2013/12/3 naguissa light <naguissa1989 at gmail.com>
> 
>  
> 
> hi all!
> 
> i want in my model to find the optimal solution so when i read the MPG i find that i have to use MaximizeScript ( to maximize the objective function) so what i want to know is : is it possible to find more then one optimal solution when using MaximizeScript ????????
> 
> 
> Thank you for your help 
> 
> 
> Naguissa
> 
>  
> 
> _______________________________________________
> Gecode users mailing list
> users at gecode.org
> https://www.gecode.org/mailman/listinfo/gecode-users
> 
>  
> 
>  
> 
> 
> _______________________________________________
> Gecode users mailing list
> users at gecode.org
> https://www.gecode.org/mailman/listinfo/gecode-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.gecode.org/pipermail/users/attachments/20131205/ff0a4d2f/attachment.html>


More information about the users mailing list