Cbc.jl

Build Status codecov

Cbc.jl is a wrapper for the COIN-OR Branch and Cut (Cbc) solver.

The wrapper has two components:

Affiliation

This wrapper is maintained by the JuMP community and is not a COIN-OR project.

License

Cbc.jl is licensed under the MIT License.

The underlying solver, coin-or/Cbc, is licensed under the Eclipse public license.

Installation

Install Cbc using Pkg.add:

import Pkg
Pkg.add("Cbc")

In addition to installing the Cbc.jl package, this will also download and install the Cbc binaries. You do not need to install Cbc separately.

To use a custom binary, read the Custom solver binaries section of the JuMP documentation.

Use with JuMP

To use Cbc with JuMP, use Cbc.Optimizer:

using JuMP, Cbc
model = Model(Cbc.Optimizer)
set_attribute(model, "logLevel", 1)

MathOptInterface API

The COIN Branch-and-Cut (Cbc) optimizer supports the following constraints and attributes.

List of supported objective functions:

List of supported variable types:

List of supported constraint types:

List of supported model attributes:

List of supported optimizer attributes:

List of supported variable attributes:

List of supported constraint attributes:

Options

Options are, unfortunately, not well documented.

The following options are likely to be the most useful:

ParameterExampleExplanation
seconds60.0Solution timeout limit
logLevel2Set to 0 to disable solution output
maxSolutions1Terminate after this many feasible solutions have been found
maxNodes1Terminate after this many branch-and-bound nodes have been evaluated
allowableGap0.05Terminate after optimality gap is less than this value (on an absolute scale)
ratioGap0.05Terminate after optimality gap is smaller than this relative fraction
threads1Set the number of threads to use for parallel branch & bound

The complete list of parameters can be found by running the cbc executable and typing ? at the prompt.

Start the cbc executable from Julia as follows:

using Cbc_jll
Cbc_jll.cbc() do exe
    run(`$(exe)`)
end