<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Hi Matthew,<br>
<br>
To call CbcMain I think that the recommended way is:<br>
<br>
CbcMain0(cbcModel);<br>
CbcMain1( nArgs, args, cbcModel);<br>
<br>
Using this way I got multiple solutions at the end using<br>
<br>
cbcModel.numberSavedSolutions() and contents
cbcModel.savedSolution(i);<br>
<br>
<br>
<br>
<div class="moz-cite-prefix">On 13-02-2015 11:53, Matthew Galati
wrote:<br>
</div>
<blockquote
cite="mid:CAMjmidyAT-jAnYD++ANhyc1pPNR8RUQA6jF68s-oG3i6cBXHaQ@mail.gmail.com"
type="cite">
<div dir="ltr">I switched to CbcMain from
CbcModel.branchAndBound() based on comments about performance.
<div><br>
</div>
<div>I want to get multiple solutions from Cbc.</div>
<div><br>
</div>
<div>I am doing this:</div>
<div><br>
</div>
<div>
<div> const char * argv[20];</div>
<div> int argc = 0;</div>
<div> string cbcExe = "cbc";</div>
<div> string cbcSolve = "-solve";</div>
<div> string cbcQuit = "-quit";</div>
<div> string cbcLog = "-log";</div>
<div> string cbcLogSet= UtilIntToStr(debugLevel);</div>
<div> string cbcMaxSave= "-maxSaved";<br>
</div>
<div> string cbcMaxSaveSet= "100";</div>
<div><br>
</div>
<div> argv[argc++] = cbcExe.c_str();</div>
<div> argv[argc++] = cbcLog.c_str();</div>
<div> argv[argc++] = cbcLogSet.c_str();</div>
<div> argv[argc++] = cbcMaxSave.c_str();</div>
<div> argv[argc++] = cbcMaxSaveSet.c_str();</div>
<div> argv[argc++] = cbcSolve.c_str();</div>
<div> argv[argc++] = cbcQuit.c_str();</div>
<div> CbcModel cbc(*osiClp);</div>
<div><br>
</div>
<div><br>
</div>
<div> CbcMain(argc, argv, cbc);</div>
</div>
<div><br>
</div>
<div><br>
</div>
<div>And from the log, I can tell there are multiple solutions.</div>
<div><br>
</div>
<div>Then, I tried to get them with:</div>
<div>int nSolutions = cbc.numberSavedSolutions();<br>
</div>
<div><br>
</div>
<div>But, it says there is only 1.</div>
<div><br>
</div>
<div>When I was using cbc.branchAndBound(), this access method
worked fine.</div>
<div><br>
</div>
<div>How do I get the multiple solutions back when using
CbcMain?</div>
<div><br>
</div>
<div><br>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Cbc mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Cbc@list.coin-or.org">Cbc@list.coin-or.org</a>
<a class="moz-txt-link-freetext" href="http://list.coin-or.org/mailman/listinfo/cbc">http://list.coin-or.org/mailman/listinfo/cbc</a>
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
==================================================
Haroldo Gambini Santos
D.Sc, Computer Science
Universidade Federal de Ouro Preto
<a class="moz-txt-link-freetext" href="http://www.decom.ufop.br/haroldo/">http://www.decom.ufop.br/haroldo/</a></pre>
</body>
</html>