[Cbc] cbc / glpk / gmpl / windows

Lou Hafer lou at cs.sfu.ca
Tue Feb 8 11:31:44 EST 2011


Raganath,

	In regard to using the cbc api on windows:

  * The v8 build files are not really maintained; they may get the occasional
    fix if someone contributes one.  I'm somewhat surprised they work at all.
    You'll want to upgrade to VS2008 and the v9 or v9alt builds.  The v9 build
    is easier for the casual user.  Coin development will likely shift to VS2010
    in the near future, but VS2008 will be maintained for a while, I expect.

  * You cannot (yet) build the cbc libraries as dlls.  The build files do not
    support it.  If you need a DLL, try CoinMP.  If you're knowledgeable about
    building DLLs with Visual Studio and know how to automatically construct a
    .def file for C++ without littering the code with __declspec(), I want to
    talk to you.

  * The cbc API is documented with doxygen.  It should be possible to build it
    on Windows (doxygen for windows is available).  You can access a prebuilt
    version from the link on the cbc project page.
    (https://projects.coin-or.org/Cbc)

  * The example code in the examples directory is as good as it gets in terms of
    documentation for how to use cbc.  There is some additional (rather dated)
    documentation available from the cbc project page.  To my knowledge, there
    is no cookbook that will allow you to use the cbc api without actually
    understanding something about cbc.  Someday, maybe.  So far this hasn't
    risen to the top of anyone's priority list.

  * You are correct that you do not need glpk's solver capabilities to use gmpl.
    Gmpl and glpk come in a bundle.  You'll need to separate them yourself if
    that's necessary for your application.

  * Check the archives of the glpk mailing list (start from the glpk web page
    http://www.gnu.org/software/glpk/).  There are prebuilt glpk binaries for
    most Windows systems.  For that matter, if you were to look in the glpk
    distribution, you would find that there are VS project files there.
    Otherwise, just make a VS project for glpk, as you would any other Windows
    project.  Then add the resulting library to the link libraries for
    CoinUtils, which is where the gmpl parsing capability resides.  You'll
    likely need to define the symbol (COIN_HAS_GLPK) that indicates glpk is
    present. Modify libCoinUtils.vcproj as needed.

By now you should be getting the picture that automated support for third-party
software through Visual Studio is nonexistant.  That'd be correct.  It most
certainly can be made to work.  We are primarily Linux developers and
desperately need help from someone who understands the automated configuration
capabilities of Visual Studio.  To get the advantages of the linux build
automation while still building native windows libraries, try msys / mingw.

  * The Coin third-party project for glpk will currently pull down glpk 4.45.
    Glpk 4.34 will probably also work, provided there are no incompatible
    changes in glpk between 4.34 and 4.45.  (It's a good bet that there will be
    no problems.)

Let me close with a somewhat radical suggestion:  Why not just use glpk?  It can
solve 0-1 IPs, it surely supports gmpl much better than coin does, and there are
people on the glpk mailing list actively interested in integration with windows
components.  As another alternative, cbc has quite good integration with ampl.

							Lou



More information about the Cbc mailing list