Hello,<br>I've been investigating the use of LP solvers other than CLP with CBC, and I've hit a bit of a snag.<br>In CbcConfig, there are 2 lines:<br><br><font class="Apple-style-span" face="'courier new', monospace">/* Define to 1 if the Clp package is used */<br>
#define COIN_HAS_CLP 1</font><br><br>As I am compiling the "minimum.cpp" example with an LP solver that isn't CLP (i.e. <font class="Apple-style-span" face="'courier new', monospace">#include "OsiXYZSolverInterface.hpp"</font>), I figured I should set this to zero<br>
<br><font class="Apple-style-span" face="'courier new', monospace">#define COIN_HAS_CLP 0</font><br><br>I re-compiled, and I happened to being stepping through when I noticed code that (I think) shouldn't of been compiled, was compiled!<br>
<br>As an example, right near the start of void CbcModel::branchAndBound():<br><br><font class="Apple-style-span" face="'courier new', monospace">...<br>...<br>#ifdef COIN_HAS_CLP<br> {<br> OsiClpSolverInterface * clpSolver = dynamic_cast<OsiClpSolverInterface *> (solver_);<br>
if (clpSolver) {<br> // pass in disaster handler<br> CbcDisasterHandler handler(this);<br>...<br>...</font><br><br><br>Because COIN_HAS_CLP is still defined, the code still compiles. I can't help but feel this is _not_ the intended behaviour...<br>
Should it not be:<br><font class="Apple-style-span" face="'courier new', monospace">#if COIN_HAS_CLP == 1</font><br>or maybe just<br><font class="Apple-style-span" face="'courier new', monospace">#if COIN_HAS_CLP</font><br>
?<div><br></div><div>Cheers,</div><div>Iain Dunning</div><div>University of Auckland</div>