SolverStudio & MOSEK

MOSEK is a commercial state-of-the-art solver (with free trial and academic licenses) for conic optimization, that includes: LP, QCQP, SOCP and SDP. It can be easily used from Excel thanks to the SolverStudio plugin that provides an easy access to the data stored in the spreadsheet. There are four ways to run MOSEK from SolverStudio:

  1. From the AMPL modeling language,
  2. From Julia/JuMP interface,
  3. From the GAMS modeling language,
  4. Directly from MOSEK Python APIs.

For the first three cases users should refer to the corresponding AMPL/JuMP/GAMS documentation. If you decide to access MOSEK directly via one of the Python APIs, you can find complete examples in the “MOSEK Examples” spreadsheet in the SolverStudio download.

Notice that you need to install the solver from the MOSEK web site. and then obtain a valid license. MOSEK provides free trial and academic licenses. For commercial use, please check the sales page.


You can use both CPython or IronPython. CPython is recommended and all the examples we provide use it. MOSEK provide two different Python APIs:

The Fusion API
It is an object oriented API that allows for compact and simple code. It fits particularly well with SolverStudio and it is our recommended API.
The Optimizer API
It is a low level API that provides access to all MOSEK functionalities. It is hard to use and the resulting code is typically much longer than the one you develop using the Fusion API.

Spreadsheet data are mapped by SolverStudio (using SolverStudio Data Items editor) as Python lists and dictionaries. That means some care must be taken to input values into the solver. First of all the solver does not accept dictionaries, and more importantly:

  1. The Optimizer API uses a linear indexing space for variables and constraints, and hence bidimensional tables must be flatten accordingly.
  2. The Fusion API handles bidimensional matrices, but you must convert string ids to integer indexes.

More information is available on the MOSEK web site.

Leave a Reply

Your email address will not be published. Required fields are marked *