Version 3 (modified by tarun, 15 years ago) (diff)

Add FAQ for ampl build.


What is the CBC code?

It is a branch and cut code designed to work with any OSI capable solver and in particular Clp. It used to be called Sbb (Simple Branch and Bound) but due to people confusing it with GAMS Sbb solver it has been renamed to Cbc.

Is Cbc reliable?

Given that it is at version 0.7 it is reliable.

Is it fast?

It is not very fast out of the box, but is very flexible so it can be very effective with correct use of cut generators and heuristics. For instance, cut generators can be switched off, on every so often or only at root node (which is probably best default). I will be working on improving the stand-alone code to try and make it faster for less experienced users.

Does it use Clp?

It is written using the Osi interface so it can use any code which is supported. Obviously it can use Clp and that is what I am using so I can stress Clp. Going through Osi does make it a bit slower and I am seeing what I can do to reduce the overhead when using Clp.

What are its advantages?

A: It is designed to be less heavyweight than BCP or Symphony. It is very easy to add new cut generators and heuristics and branching methods such as lot-sizing variables. I need to publish some more heuristic methods as I have several I use for my own work which at present are too problem specific.

How should I start to use it?

There is a stand-alone code "cbc" which I need to improve, both for ease of use and for default behavior. There are also drivers in the Samples directory. The sample driver in Samples/sample1.cpp will solve many of the miplib test set as it is. To add a new generator involves adding less than ten lines of code. It is also possible to add heuristics in the same way and to influence the search - sample2.cpp and sample3.cpp expose more of the strategy as user code.

What happened to the SBB code?

SBB stands for Simple Branch and Bound. When COIN-OR LP was being written, the Osi interface demanded an integer solver. An exception could have been thrown but anyone can write a branch and bound code in a day. With Strong Branching it was 460 lines of code, without 300 lines. Somehow the code kept growing and eventually it was moved it to its own project. Now the "Simple" is not as accurate and there was confusion with Gams Sbb code so was frozen as of Halloween 2004. All future development has been on Cbc (COIN-OR Branch and Cut) which is just a renamed version of Sbb.

How do you build the COIN-OR Cbc AMPL interface on Windows using cygwin from the CVS Cbc code base?

You will need to have cygwin installed on the machine. Cygwin can be downloaded and installed from You will also need the ampl glue code which is available from in the file solvers.tar.

Follow these steps:

  • Download COIN source by following the steps in
    cvs login  (use password anonymous)
    cvs checkout COIN
  • Untar the AMPL glue code.
    cd COIN
    tar -xf solvers.tar
  • Edit COIN/solvers/makefile.u and make appropriate changes for cygwin (search for keyword "cygwin").
  • Build amplsolve.a
    cd COIN/solvers
    make -f makefile.u
  • Edit COIN/Makefiles/Makefile.location and uncomment the CoinLibsDefined += COIN_ampl by removing the exclamation point.
  • Search for COIN_ampl in COIN/Makefiles/Makefile.location and set the correct path to point to the AMPL glue code directory (ie: COIN/solvers).
  • Build the Coin Cbc AMPL interface driver. On successful completion, the driver will be created at COIN/Cbc/Test/CYGWIN-G/solve.exe.
    cd COIN/Cbc
    make solve
  • Rename solve.exe to coin_cbc.exe.
    cd COIN/Cbc/Test/CYGWIN-G
    mv solve.exe coin_cbc.exe

To use coin_cbc.exe as the ampl interface, specify "option solver coin_cbc.exe" from the ampl prompt or specify it in the .run file.