CBC

Introduction

CBC is a high-performance open source mixed integer programming solver. It implements branch-and-cut algorithm, supports reading and writing LP and MPS standard format model files, reading and solving NL format model files, and also provides C and C++ and other high-level language programming interfaces.

The main developer of CBC is John j. Forrest, whose development language is C++ and is released as open source under the Eclipse Public License 2.0. Currently, it is mainly maintained by John J. Forrest, Ted Ralphs and others.

Parameters

Termination condition

Parameter Description
allow(ableGap) Stop when gap between best possible and best less than this
ratio(Gap) Stop when gap between best possible and best known is less than this fraction of larger of two
integerT(olerance) For a feasible solution no integer variable may be more than this away from an integer value
sec(onds) Maximum seconds
maxIt(erations) Maximum number of iterations before stopping
maxN(odes) Maximum number of nodes to do
Parameter Description
log(Level) Level of detail in Solver output

Algorithm

Parameter Description
presolve Whether to presolve problem
preprocess Whether to use integer preprocessing
cuts(OnOff) Switches all cut generators on or off
heur(isticsOnOff) Switches most primal heuristics on or off
node(Strategy) What strategy to use to select the next node from the branch and cut tree
threads Number of threads to try and use

Input and output results

  • mips(tart) Reads an initial feasible solution from file
  • solu(tion) Prints solution to file
Parameter Description
mips(tart) Reads an initial feasible solution from file
solu(tion) Prints solution to file

For details about the parameters, see: https://github.com/coin-or/Cbc (opens new window)

Examples of Usage

Solve LP/MPS files

Assuming that the test example is test.mps, the Cbc command line is used to solve the problem, the time limit is 60 seconds, the number of threads is 2, and the output result file is test.sol, then the calling command is:

cbc test.mps sec=60 threads 2 solve solution test.sol
1

Solve NL files

Assuming that the test example is test.nl, the time limit is 60 seconds, and the log is enabled, then the calling command is:

cbc test.nl -AMPL "log=1 sec=60"
1
Last Updated: 05/16/2022