The COIN Branch and Cut solver (CBC) is an open-source mixed-integer program (MIP) solver written in C++. The framework used by the driver supports automatic reformulation for many expression types; the modeling guide can be found here.

[Read More] [Modeling guide] [Options] [Changes] [Download CBC]

How to use it

ampl: option solver cbc; # change the solver
ampl: option cbc_options 'option1=value1 option2=value2'; # specify options
ampl: solve; # solve the problem


Solver options

Full list of solver options:

More details on solver options: Features guide.

Retrieving solutions

The outcome of the last optimization is stored in the AMPL parameter solve_result_num and the relative message in solve_result.

display solve_result_num, solve_result;

CBC solve result codes can be obtained by running cbc -! or ampl: shell "cbc -!";:

          0- 99 solved: optimal for an optimization problem, feasible for a satisfaction problem
        100-199 solved? solution candidate returned but error likely
            150 solved? MP solution check failed (option sol:chk:fail)
        200-299 infeasible
        300-349 unbounded, feasible solution returned
        350-399 unbounded, no feasible solution returned
        400-449 limit, feasible: stopped, e.g., on iterations or Ctrl-C
        450-469 limit, problem is either infeasible or unbounded
        470-499 limit, no solution returned
        500-999 failure, no solution returned
            550 failure: numeric issue, no feasible solution

For general information, see MP result codes guide.