[Osi] Problem building examples with OSI/CLP

Craig Schmidt craig at craigschmidt.com
Thu Jun 30 20:45:16 EDT 2011

Hi There,

Thanks to Ted Ralphs for answering my question last week about choosing a package for my project.  I'm going to try using OSI and CLP.  I have some very basic questions about getting set up.  i haven't been able to find this information after looking around the mail lists.

1.) There is an Osi subdirectory when I install Clp.  Is that all I need, or do I also need to install the Osi project?  If I do install and build the Osi project there isn't mention of Clp.  For example, the solver directories are:

Osi OsiCommonTest OsiCpx OsiGlpk OsiGrb  OsiMsk OsiSpx OsiXpr

so I'm guessing I just use what is installed by Clp.

2.) I can't get the examples in coin-Clp/Osi/examples to build.  The README seems out of date.  Could someone detail how I would build build.cpp, for example? (I'm using Mac OSX.) The file build.cpp starts out:

// ________________________________________

#include <iostream>
#include OSIXXXhpp
#include "CoinPackedMatrix.hpp"
#include "CoinPackedVector.hpp"

   // Create a problem pointer.  We use the base class here.
   OsiSolverInterface *si;

   // When we instantiate the object, we need a specific derived class.
   si = new OSIXXX;

// ________________________________________

I'm not sure what to substitute for XXX.  There is no file that I can find fitting OSIXXX.hpp   There isn't a OsiClp.hpp either, which I might have guessed it would be.  What class to I instantiate with the new statement? 

3).  Does using OSI and CLP together provide any benefits if I don't plan on using any other solvers?  I realize the idea is to provide a layer of solver independence.  If I'm not too worried about that, does it provide extra functionality over raw CLP?  Is there any CLP functionality that is missing from OSI+CLP?

4).  Are there any examples beyond coin-Clp/Osi/examples?  It would be nice to have an example more like coin-Clp/Clp/examples/addRows.cpp that gives more detail on building a problem from scratch. 

Thanks very much,
Craig Schmidt

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/osi/attachments/20110630/b85c3674/attachment.html>

More information about the Osi mailing list