[gecode-users] Cumulatives for scheduling

Baptiste Soyer baptiste.soyer at opencubeproject.org
Tue Oct 23 22:23:10 CEST 2012


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.gecode.org/pipermail/users/attachments/20121023/96a55994/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cumuBAB_DFS.cpp
Type: text/x-c++src
Size: 2296 bytes
Desc: not available
URL: <http://www.gecode.org/pipermail/users/attachments/20121023/96a55994/attachment.cpp>


More information about the users mailing list