Interface to the Mosek solver in Julia.
Mosek.jl is a more or less complete mapping of the MOSEK functionality:
LinprogSolverinterface and other interfaces for
MOSEK can solve LP (linear), SOCP (second order conic), SDP (semi-definite), QP (quadratic objective, quadratic constraints), GECO (general convex) and MIP (mixed-integer problems). These can be mixed as follows:
MOSEK is commercial software, but free licenses are available for academic use. See here for details.
Use the Julia package manager to install Mosek.jl:
Mosek.jl package requires the MOSEK distribution binaries run. Upon
installation it will attempt to either local an installed MOSEK or download and
install from the MOSEK website (www.mosek.com):
MOSEKBINDIRis defined, the installer will assume that this directory contains the necessary libraries. If it does not, the installer will fail.
MOSEK.ljinstallation uses a user-defined MOSEK and this is a valid version, this will be used.
Pkg.build("Mosek")will update the MOSEK distro if possible.
If the MOSEK distro installation directory is moved it is necessary to rebuild the package using
If you have previously installed
Mosek.jl using a pre-installed
MOSEK distro, setting the
MOSEKJL_FORCE_DOWNLOAD=YES will force the
installer to download MOSEK from the web instead of using the old
Note that environment variables can be set temporarily from Julia as
ENV["MOSEKBINDIR"] = "/home/myname/lib"
Furthermore, a license file is required to use MOSEK (these are
free for academic use). MOSEK will look first for the enironment
MOSEKLM_LICENSE_FILE which, if defined, must point to the relevant
license file. If this is not defined, MOSEK will look for a file
mosek.lic in the default install path, e.g.
If the MOSEK distro was installed manually, it can be updated simply
by installing a newer distro in the same place. Otherwise, doing
Pkg.build("Mosek") will check the latest MOSEK distro and update if
You can see if the MOSEK distro was installed internally this way:
is_internal = open(joinpath(Pkg.dir("Mosek"),"deps","inst_method"),"r") do f readstring(f) == "internal" end
If you experience problems installing (in particular on Windows or OS X), you can try to pull the latest revision and see if that works
If this also fails, please post an issue in Github.
All functions and constants in the Mosek.jl are briefly documented here.
For a more complete description of functions, please refer to the MOSEK C API documentation.
The General Convex interface is not documented at all, but the example
nlo1.jl show the general idea.
The MathProgBase for MOSEK is a separate package called
The MathOptInterface for MOSEK is a separate package called
29 days ago