6. MOSEK / MATLAB integration


In this chapter we provide some details concerning the integration of MOSEK in MATLAB. The information in this chapter is not strictly necessary for basic use of the MOSEK optimization toolbox for MATLAB. The novice user can safely ok to the next chapter.

6.1. MOSEK replacements for MATLAB functions

MOSEK provides replacements for the MATLAB functions:

The corresponding MATLAB file for each function is located in the toolbox/solvers directory of the MOSEK distribution. To use the MATLAB version of these functions instead of the MOSEK version, delete the MATLAB files provided by MOSEK.

6.2. The license system

By default a license token remains checked out for the duration of the MATLAB session. This can be changed such that the license is returned after each call to MOSEK by setting the parameter MSK_IPAR_CACHE_LICENSE.

param.MSK_IPAR_CACHE_LICENSE = 'MSK_OFF'; %set parameter.
[r,res] = mosekopt('minimize',prob,param); %call mosek.

It should however be noted that there is a small overhead associated with checking out a license token from the license server.

6.2.1. Waiting for a free license

By default an error will be returned if no license token is available. By setting the parameter MSK_IPAR_LICENSE_WAIT MOSEK can be instructed to wait until a license token is available.

param.MSK_IPAR_LICENSE_WAIT = 'MSK_ON'; %set parameter.
[r,res] = mosekopt('minimize',prob,param); %call mosek.
Wed Feb 29 16:16:54 2012