This guide will briefly guide you through installing Julia, JuMP and[a] solver[s] of your choice.
At the time of writing this documentation the latest release of Julia is version
0.5, which is the version required by JuMP. You can easily build from source on OS X and Linux, but the binaries will work well for most people.
Download links and more detailed instructions are available on the Julia website.
Once you've installed Julia, installing JuMP is simple. Julia has a git-based package system. To use it, open Julia in interactive mode (i.e.
julia at the command line) and use the package manager:
This command checks METADATA.jl to determine what the most recent version of JuMP is and then downloads it from its repository on GitHub.
To start using JuMP (after installing a solver), it should be imported into the local scope:
julia> using JuMP
Solver support in Julia is currently provided by writing a solver-specific package that provides a very thin wrapper around the solver's C interface and providing a standard interface that JuMP can call. If you are interested in providing an interface to your solver, please get in touch. The table below lists the currently supported solvers and their capabilities.
LP = Linear programming
SOCP = Second-order conic programming (including problems with convex quadratic constraints and/or objective)
MILP = Mixed-integer linear programming
NLP = Nonlinear programming
MINLP = Mixed-integer nonlinear programming
SDP = Semidefinite programming
* requires CoinOptServices installed, see below.
To install Gurobi, for example, and use it with a JuMP model
Pkg.add("Gurobi") using JuMP using Gurobi m = Model(solver=GurobiSolver())
Setting solver options is discussed in the Model <ref-model> section.
Solver-specific notes follow below.
Requires a license. The KNITRO.jl interface currently supports only nonlinear problems.
Requires a license. A trial version is available for small problem instances.
COIN-OR Clp and Cbc
Binaries for Clp and Cbc are provided on OS X and Windows (32- and 64-bit) by default. On Linux, they will be compiled from source (be sure to have a C++ compiler installed). Cbc supports "SOS" constraints but does not support MIP callbacks.
Requires a working installation of CPLEX with a license (free for faculty members and graduate teaching assistants). The interface requires using CPLEX as a shared library, which is unsupported by the CPLEX developers. Special installation steps are required on OS X. CPLEX supports MIP callbacks and "SOS" constraints.
ECOS can be used by JuMP to solve LPs and SOCPs. ECOS does not support general quadratic objectives or constraints, only second-order conic constraints specified by using
norm or the quadratic form
x'x <= y^2.
Requires a working installation of Xpress with an active license (it is possible to get license for academic use, see FICO Academic Partner Program). Supports SOCP and "SOS" constraints. The interface is experimental, but it does pass all JuMP and MathProgBase tests. Callbacks are not yet supported.
If you are using 64-bit Xpress, you must use 64-bit Julia (and similarly with 32-bit Xpress).