[gecode-users] Cumulatives for scheduling

Guido Tack tack at gecode.org
Wed Oct 24 00:04:25 CEST 2012


Hi,

glad to hear that it was easy to fix.  DFS finds all solutions, while BAB finds increasingly better solutions, after finding each solution it prunes solutions that are not better (and the overall last solution is guaranteed to be the overall best solution).  So it's expected that BAB finds fewer solutions.

Cheers,
Guido

On 24/10/2012, at 7:23 AM, Baptiste Soyer <baptiste.soyer at opencubeproject.org> wrote:

> Hi,
> 
> Thanks for the bit of code, it worked perfectly fine ! It helped me found my newbie mistake. I was checking if I found any solution by doing :
> 
> if (solutions.next() ==NULL){
>   os<<"No solutions"<<endl;
>         return false;
>         }
> 
> while(RMModel *solution = solutions.next())
>     {   
>         solution->print(os);
> delete solution;}
> 
> In restrospect that was a very stupid way of doing it. So my code did in fact find the right solutions, it just skipped the first one, while checking if it found a solution in the first place.
> 
> Another question loosely related to my initial problem of not finding all solutions : is it usual for the BAB search engine to not give the same number of solutions (I have one less) than the DFS. I modified your file to reproduce this"problem", and attached it to this mail. Maybe this is how it is supposed to work.
> 
> Thanks again for your help,
> 
> Baptiste
> <cumuBAB_DFS.cpp>




More information about the users mailing list