Installation Guide
JuMP is a package for Julia. To use JuMP, first download and install Julia or open up a remote notebook at JuliaBox or similar services.
This version of JuMP is compatible with Julia 1.0 and later.
From Julia, JuMP is installed by using the built-in package manager:
import Pkg
Pkg.add("JuMP")
Getting Solvers
JuMP depends on solvers to solve optimization problems. Most solvers are not written in Julia, and some require commercial licenses to use, so installation is often more complex. We list below the currently available solvers.
This list is open for new contributions. See also Interacting with solvers and the MathOptInterface docs for more details on how JuMP interacts with solvers. Please get in touch with any questions about connecting new solvers with JuMP.
Solver | Julia Package | License | Supports |
---|---|---|---|
Artelys Knitro | KNITRO.jl | Comm. | LP, MILP, SOCP, MISOCP, NLP, MINLP |
Cbc | Cbc.jl | EPL | MILP |
CDCS | CDCS.jl | GPL | LP, SOCP, SDP |
Clp | Clp.jl | EPL | LP |
COSMO | COSMO.jl | Apache | LP, QP, SOCP, SDP |
CPLEX | CPLEX.jl | Comm. | LP, MILP, SOCP, MISOCP |
CSDP | CSDP.jl | EPL | LP, SDP |
ECOS | ECOS.jl | GPL | LP, SOCP |
FICO Xpress | Xpress.jl | Comm. | LP, MILP, SOCP, MISOCP |
GLPK | GLPK.jl | GPL | LP, MILP |
Gurobi | Gurobi.jl | Comm. | LP, MILP, SOCP, MISOCP |
Ipopt | Ipopt.jl | EPL | LP, QP, NLP |
Juniper | Juniper.jl | MIT | MISOCP, MINLP |
MOSEK | MosekTools.jl | Comm. | LP, MILP, SOCP, MISOCP, SDP |
OSQP | OSQP.jl | Apache | LP, QP |
ProxSDP | ProxSDP.jl | MIT | LP, SOCP, SDP |
SCIP | SCIP.jl | ZIB | MILP, MINLP |
SCS | SCS.jl | MIT | LP, SOCP, SDP |
SDPA | SDPA.jl | GPL | LP, SDP |
SeDuMi | SeDuMi.jl | GPL | LP, SOCP, SDP |
Where:
- LP = Linear programming
- QP = Quadratic 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
- MISDP = Mixed-integer semidefinite programming
You may also use AmplNLWriter to access solvers that support the nl format. Such solvers include Bonmin and Couenne. See a more complete list here.
To install Gurobi, for example, and use it with a JuMP model model
, run:
import Pkg
Pkg.add("Gurobi")
using JuMP
using Gurobi
model = Model(with_optimizer(Gurobi.Optimizer))
Most packages follow the ModuleName.Optimizer
naming convention, but exceptions may exist. See the corresponding Julia package README for more details on how to use the solver.
The following solvers were compatible with JuMP up to release 0.18 but are not yet compatible with the latest version because they do not implement the new MathOptInterface API:
Solver-specific notes follow below.
Artelys Knitro
Requires a license.
BARON
Requires a license. A trial version is available for small problem instances.
COIN-OR Cbc
Cbc supports "SOS" constraints.
COSMO
COSMO can solve LPs, QPs, SOCPs and SDPs. It can handle SDPs with quadratic objective functions and supports chordal decomposition of large structured PSD constraints. COSMO is a first order method that performs well on large problems but has a low accuracy by default ($10^{โ4}$). See the COSMO.jl documentation for more information.
CPLEX
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 Mac OS. CPLEX supports "SOS" constraints.
ECOS
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 the SecondOrderCone
set.
Gurobi
Requires a working installation of Gurobi with an activated license (free for academic use). Gurobi supports "SOS" constraints.
FICO Xpress
Requires a working installation of Xpress with an active license (it is possible to get a license for academic use, see FICO Academic Partner Program). Supports SOCP and "SOS" constraints.
MOSEK
Requires a license (free for academic use). The Mosek interface is maintained by the Mosek team. (Thanks!) Note that even if the package implementing MathOptInterface is MosekTools
, for consistency the MOI optimizer is called Mosek.Optimizer
so do the following to create a model with the Mosek solver:
julia> using MosekTools
julia> model = Model(with_optimizer(Mosek.Optimizer))
ProxSDP
ProxSDP solves general SDP problems by means of a first order proximal algorithm based on the primal-dual hybrid gradient, also known as Chambolle-Pock method. The main advantage of ProxSDP over other state-of-the-art solvers is the ability to exploit the low-rank property inherent to several SDP problems. ProxSDP is a first order solver and has low accuracy. See the ProxSDP.jl documentation for more information.
SCS
SCS can be used by JuMP to solve LPs and SOCPs, and SDPs. SCS is a first order solver and has low accuracy ($10^{โ4}$) by default; see the SCS.jl documentation for more information.