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:
- From the AMPL modeling language,
- From Julia/JuMP interface,
- From the GAMS modeling language,
- 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.
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:
- The Optimizer API uses a linear indexing space for variables and constraints, and hence bidimensional tables must be flatten accordingly.
- The Fusion API handles bidimensional matrices, but you must convert string ids to integer indexes.
More information is available on the MOSEK web site.