Home

Awesome

Cbc

A COIN-OR Project

Projects such as this one are maintained by a small group of volunteers under the auspices of the non-profit COIN-OR Foundation and we need your help! Please consider sponsoring our activities or volunteering to help!

Latest Release

This file is auto-generated from config.yml using the generate_readme script. To make changes, please edit config.yml or the generation scripts here and here.

Cbc (Coin-or branch and cut) is an open-source mixed integer linear programming solver written in C++. It can be used as a callable library or using a stand-alone executable. It can be used in a wide variety of ways through various modeling systems, packages, etc.

Cbc is developed by John Forrest, now retired from IBM Research, and others. The project is currently managed by John Forrest, Ted Ralphs, Stefan Vigerske, Haroldo Gambini Santos, and the rest of the Cbc team.

Cbc is written in C++ and is released as open source under the Eclipse Public License 2.0.

It is distributed under the auspices of the COIN-OR Foundation.

The Cbc development site is https://github.com/coin-or/Cbc.

CITE

Code: DOI

CURRENT BUILD STATUS

Windows Builds

Linux and MacOS Builds

DOWNLOAD

What follows is a quick start guide for obtaining or building Cbc on common platforms. More detailed information is available here.

Docker image

There is a Docker image that provides Cbc, as well as other projects in the COIN-OR Optimization Suite here

Binaries

For newer releases, binaries will be made available as assets attached to releases in Github here. Older binaries are archived as part of Cbc here.

Due to license incompatibilities, pre-compiled binaries lack some functionality. If binaries are not available for your platform for the latest version and you would like to request them to be built and posted, feel free to let us know on the mailing list.

Source

Source code can be obtained either by

Dependencies

Cbc has a number of dependencies, which are detailed in config.yml. Dependencies on other COIN-OR projects are automatically downloaded when obtaining the source with coinbrew. For some of the remaining third-party dependencies, automatic download scripts and build wrappers are provided (and will also be automatically run for required and recommended dependencies), while other libraries that are aeasy to obtain must be installed using an appropriate package manager (or may come with your OS by default).

BUILDING from source

These quick start instructions assume you are in a bash shell.

Using coinbrew

To download and build Cbc from source, execute the following on the command line.

wget https://raw.githubusercontent.com/coin-or/coinbrew/master/coinbrew
chmod u+x coinbrew
./coinbrew fetch Cbc@master
./coinbrew build Cbc

For more detailed instructions on coinbrew, see https://coin-or.github.io/coinbrew. The coinbrew script will fetch the additional projects specified in the Dependencies section of config.yml.

Without coinbrew (Expert users)

./configure -C
make
make test
make install

With Microsoft Visual Studio

For Microsoft Visual C++ users, there are project files for version 10 available in the MSVisualStudio directory. First, obtain the source code using either a Windows git client or download a snapshot. In MSVC++ Version 10, open the solution file (this should be converted to whatever version of MSVC+ you are using) and build the Cbc project. The code should build out of the box with default settings.

It is also possible to build Cbc with the Visual Studio compiler from the command line using the procedure for Unix-like environments, using the Msys2 shell or CYGWIN. This is the recommended and best-supported way of building Cbc in Windows from source. To do so, make sure the cl compiler is in your path and add --enable-msvc to build command of coinbrew`.

If you want to build a parallel version of CBC using Visual Studio you can following instructions: (thanks to Tobias Stengel and Alexis Guigue).

Assumptions:

Steps (based on VS 2013):

  1. for each of the lib* projects do: add CBC_THREAD under Properties -> Configuration Properties -> C/C++ -> Preprocessor -> Preprocessor Definitions (a subset of the lib* projects may be sufficient, but it doesn't hurt to do it for all)

  2. Link against a pthreads library. PThreadsWin32 works (even in 64 bits systems) and is distributed under the LGPL. If you decide to use the precompiled binaries: both pthreadVC2 and pthreadVS2 seem to work. Otherwise: third party VS project files for pthreads4win can be found on github.

    Note: If you use C++/Cli, make sure that no callback (eventHandlers, custom cut generators, custom heuristics, ...) contains managed code. Otherwise your code will crash at runtime with AssembyNotFoundExceptions inside the native threads created by Cbc. Even if not, problems with the GC are likely.

  3. If you link statically against pthreads4win, you have to define PTW32_STATIC_LIB when building your program/Cbc (e.g. via Properties -> C/C++/Preprocessor -> Preprocessor Definitions) AND - only if you build pthreads yourself - when building pthreads. Linking pthreads dynamically works without additional preprocessor definitions.

  4. pass -threads yourNumber to CbcMain1

Doxygen Documentation

If you have Doxygen available, you can build a HTML documentation by typing

make doxydoc

in the build directory. If Cbc was built via coinbrew, then the build directory will be ./build/Cbc/master by default. The doxygen documentation main file is found at <build-dir>/doxydoc/html/index.html.

If you don't have doxygen installed locally, you can use also find the documentation here.

DOCUMENTATION

Project Links

CHANGELOG