[Cbc] cbc.setMaximumSavedSolutions

John Forrest john.forrest at fastercoin.com
Tue Feb 28 11:08:19 EST 2017


Matt,

It is a "feature" which could be fixed by a slight change in code or 
slight change in name.  The best solution is saved separately and it is 
a counting issue.

It is really setMaximumExtraSavedSolutions! - numberSavedSolutions() 
adds back in the best one in its counts so that you can use it for 
savedSolution(which).

John

On 25/02/17 20:13, Matthew Galati wrote:
> It seems like setMaximumSavedSolutions is not honored. I set this to 1 
> and I still got cbc.numberSavedSolutions=2.
>
> I'm using CBC 2.9.4
>
> Bug or feature?
>
>   const char * argv[20];
>    int   argc      = 0;
>    string cbcExe   = "cbc";
>    string cbcSolve = "-solve";
>    string cbcQuit  = "-quit";
>    string cbcLog   = "-log";
>    string cbcLogSet= UtilIntToStr(debugLevelSolver);
>    argv[argc++] = cbcExe.c_str();
>    argv[argc++] = cbcLog.c_str();
>    argv[argc++] = cbcLogSet.c_str();
>    argv[argc++] = "-cuts";
>    argv[argc++] = "off";
>    argv[argc++] = "-heur";
>    argv[argc++] = "off";
>    argv[argc++] = cbcSolve.c_str();
>    argv[argc++] = cbcQuit.c_str();
>    CbcModel cbc(*osiClp);
>    CbcMain0(cbc);
>    //TODO: ask CBC list - this doesn't seem to be working
>    cbc.setMaximumSavedSolutions(maxSavedSolutions);
>    CbcMain1(argc, argv, cbc);
>
>
>
> _______________________________________________
> Cbc mailing list
> Cbc at list.coin-or.org
> http://list.coin-or.org/mailman/listinfo/cbc


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/cbc/attachments/20170228/db0a5815/attachment.html>


More information about the Cbc mailing list