Code Monkey home page Code Monkey logo

cbc.jl's Introduction

COIN-OR Branch and Cut Interface (Cbc.jl)

Cbc.jl is an interface to the COIN-OR Branch and Cut 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

Installation

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

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

Cbc.jl will use BinaryProvider.jl to automatically install the Cbc binaries. This should work for both the official Julia binaries from https://julialang.org/downloads/ and source-builds.

Custom Installation

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

ENV["JULIA_CBC_LIBRARY_PATH"] = "/opt/lib"
import Pkg; Pkg.build("Cbc")

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

To switch back to the default binaries clear JULIA_CBC_LIBRARY_PATH and call import Pkg; Pkg.build("Cbc").

Using with JuMP

Use Cbc.Optimizer to use Cbc with JuMP:

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

Options are solver-dependent, and unfortunately not well documented.

The following options are likely to be the most useful:

  • seconds -- Solution timeout limit. (Must be a Float64)
  • logLevel -- Set to 1 to enable solution output.
  • maxSolutions -- Terminate after this many feasible solutions have been found.
  • maxNodes -- Terminate after this many branch-and-bound nodes have been evaluated.
  • allowableGap -- Terminate after optimality gap is less than this value (on an absolute scale).
  • ratioGap -- Terminate after optimality gap is smaller than this relative fraction.
  • threads -- Set 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.

Using the C interface

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

using Cbc.CbcCInterface

Using this interface is not recommended.

cbc.jl's People

Contributors

abelsiqueira avatar ararslan avatar blegat avatar carlobaldassi avatar doorisajar avatar femtocleaner[bot] avatar gunnarfarneback avatar iainnz avatar issamt avatar joehuchette avatar juan-pablo-vielma avatar kristofferc avatar matbesancon avatar mlubin avatar ndinsmore avatar odow avatar philipithomas avatar ranjanan avatar tkelman avatar tkoolen avatar vitornesello avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.