Skip to content
Interface to the Coin-OR Linear Programming solver (CLP)
Branch: master
Clone or download
matbesancon and mlubin remove 0.6-dependent code, invalid 1.0 (#60)
* remove 0.6-dependent code, invalid 1.0

* return empty

* added 8c test

* un-skip test 8

* added breaking test

* complete test

* Tidy unit test
Latest commit 15da23f Apr 12, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
deps Fix BinaryBuilder static linking in Linux (#52) Feb 14, 2019
src remove 0.6-dependent code, invalid 1.0 (#60) Apr 12, 2019
test remove 0.6-dependent code, invalid 1.0 (#60) Apr 12, 2019
.gitignore remove 0.6-dependent code, invalid 1.0 (#60) Apr 12, 2019
.travis.yml Update License Jan 24, 2013 Multi-GCC BinaryBuilder Binary Dependencies for Julia v1.0 (#48) Jan 4, 2019
REQUIRE Add get basis status for constraints and variables (#54) Mar 29, 2019
appveyor.yml Multi-GCC BinaryBuilder Binary Dependencies for Julia v1.0 (#48) Jan 4, 2019

COIN-OR Linear Programming Interface (Clp.jl)

Clp.jl is an interface to the COIN-OR Linear Programming solver. It provides a complete interface to the low-level C API, as well as an implementation of the solver-independent MathProgBase and MathOptInterface API's.

Note: This wrapper is maintained by the JuliaOpt community and is not a COIN-OR project.

Build Status codecov


The package is registered in METADATA.jl and so can be installed with Pkg.add.

julia> import Pkg; Pkg.add("Clp")

Clp.jl will use BinaryProvider.jl to automatically install the Clp binaries. This should work for both the official Julia binaries from and source-builds.

Custom Installation

To install custom built Clp binaries set the environmental variable JULIA_CLP_LIBRARY_PATH and call import Pkg;"Clp"). For instance, if the libraries are installed in /opt/lib, then call

import Pkg;"Clp")

If you do not want BinaryProvider to download the default binaries on install, set JULIA_CLP_LIBRARY_PATH before calling import Pkg; Pkg.add("Clp").

To switch back to the default binaries clear JULIA_CLP_LIBRARY_PATH and call import Pkg;"Clp").

Using with MathProgBase

Clp provides a solver object that can be passed to linprog in MathProgBase (and used to create instances of the solver-independent AbstractMathProgModel type):

using Clp
using MathProgBase
linprog(..., ClpSolver(Option1=value1,Option2=value2,...))

see the MathProgBase documentation for further information.

Options are solver-dependent. The following options are the most useful (and well documented):

  • PrimalTolerance - primal feasibility tolerance (default 1e-7)

  • DualTolerance - dual feasibility tolerance (default 1e-7)

  • DualObjectiveLimit - when using dual simplex (where the objective is monotonically changing), terminate when the objective exceeds this limit

  • MaximumIterations - terminate after performing this number of simplex iterations

  • MaximumSeconds - terminate after this many seconds have passed

  • LogLevel - set to 1, 2, 3, or 4 for increasing output (default 0)

  • PresolveType - set to 1 to disable presolve

  • SolveType - choose the solution method:

    • 0 - dual simplex
    • 1 - primal simplex
    • 3 - barrier with crossover to optimal basis
    • 4 - barrier without crossover to optimal basis
    • 5 - automatic
  • InfeasibleReturn - set to 1 to return as soon as the problem is found to be infeasible (by default, an infeasibility proof is computed as well)

Using the C interface

The low-level C interface is available in the ClpCInterface submodule:

using Clp.ClpCInterface

Using this interface is only recommended for advanced users. The Julia API is essentially a thin wrapper around the interface exported by Clp/src/Clp_C_Interface.h, which is documented in-line.

You can’t perform that action at this time.