# 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 |

CDD | CDDLib.jl | GPL | LP |

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, SDPAFamily.jl | GPL | LP, SDP |

SDPNAL | SDPNAL.jl | CC BY-SA | LP, SDP |

SDPT3 | SDPT3.jl | GPL | LP, SOCP, SDP |

SeDuMi | SeDuMi.jl | GPL | LP, SOCP, SDP |

Tulip | Tulip.jl | MPL-2 | LP |

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.

Additionally, you may use GAMS (Julia package: GAMS.jl) to access additional solvers. Among them are AlphaECP, Antigone, BARON, CONOPT, Couenne, LocalSolver, PATHNLP, SHOT, SNOPT, SoPlex. See a complete list here. Note, that GAMS.jl requires an installation of the commercial software GAMS for which a free community license exists.

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(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.

Use `set_optimizer_attributes`

to set solver-specific options. Continuing the example from above,

`set_optimizer_attributes(model, "Presolve" => 0, "Heuristics" => 0.01)`

sets Gurobi's `Presolve`

parameter to zero and `Heuristics`

to 0.01.

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.

### CDD

CDD can solve the problem both using `Float64`

and `Rational{BigInt}`

arithmetics. The arithmetic used the type `T`

given in `CDDLib.Optimizer{T}`

. Only `CDDLib.Optimizer{Float64}`

can be used with JuMP as JuMP inputs the problem in `Float64`

arithmetics. Use MOI directly for `CDDLib.Optimizer{Rational{BigInt}}`

.

### 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(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.

### SDPA

SDPA is a second order solver which comes in several variants. The main version has a C++ interface which SDPA.jl uses for efficiently communicating the problem instance to the solver. The three high-precision variants, SDPA-GMP (arbitrary precision), SDPA-QD ("quad-double" precision) and SDPA-DD ("double-double" precision) do not expose a library interface, but can used via SDPAFamily.jl which writes and reads files to interact with the solver binary.