A. MOSEK command line tool reference


A.1. Introduction

The MOSEK command line tool is used to solve optimization problems from the operating system command line. It is invoked as follows

mosek [options] [filename]

where both [options] and [filename] are optional arguments. [filename] is a file describing the optimization problems and is either a MPS file or AMPL nl file. [options] consists of command line arguments that modifies the behavior of MOSEK.

A.2. Command line arguments

The following list shows the possible command-line arguments for MOSEK:

-a
MOSEK runs in AMPL mode.
-AMPL
The input file is an AMPL nl file.
-basi name
Input basis solution file name.
-baso name
Output basis solution file name.
-brni name
name is the filename of a variable branch order file to be read.
-brno name
name is the filename of a variable branch order file to be written.
-d name val
Assigns the value val to the parameter named name.
-dbgmem name
Name of memory debug file. Write memory debug information to file name.
-f
Complete license information is printed.
-h
Prints out help information for MOSEK.
-inti name
Input integer solution file name.
-into name
Output integer solution file name.
-itri name
Input interior point solution file name.
-itro name
Output interior point solution file name.
-info name
Infeasible subproblem output file name.
-infrepo name
Feasibility reparation output file
-pari name
Input parameter file name. Equivalent to -p.
-paro name
Output parameter file name.
-L name
name of the license file.
-l name
name of the license file.
-max
Forces MOSEK to maximize the objective.
-min
Forces MOSEK to minimize the objective.
-n
Ignore errors in subsequent paramter settings.
-p name
New parameter settings are read from a file named name.
-q name
Name of a optional log file.
-r
If the option is present, the program returns -1 if an error ocurred otherwise 0.
-rout name
If the option is present, the program writes the return code to file 'name'.
-sen file
Perform sensitivity analysis based on file.
-silent
As little information as possible is send to the terminal.
-v
The MOSEK version number is printed and no optimization is performed.
-w
If this options is included, then MOSEK will wait for a license.
-=
Lists the parameter database.
-?
Same as the -h option.

A.3. The parameter file

Occasionally system or algorithmic parameters in MOSEK should be changed be the user. One way of the changing parameters is to use a so-called parameter file which is a plain text file. It can for example can have the format

BEGIN MOSEK
% This is a comment.
% The subsequent line tells MOSEK that an optimal
% basis should be computed by the interior-point optimizer.
MSK_IPAR_INTPNT_BASIS       MSK_BI_ALWAYS
MSK_DPAR_INTPNT_TOL_PFEAS   1.0e-9
END MOSEK

Note that the file begins with an BEGIN MOSEK and is terminated with an END MOSEK, this is required. Moreover, everything that appears after an % is considered to be a comment and is ignored. Similarly, empty lines are ignored. The important lines are those which begins with a valid MOSEK parameter name such as MSK_IPAR_INTPNT_BASIS. Immediately after parameter name follows the new value for the parameter. All the MOSEK parameter names are listed in Appendix H.

A.3.1. Using the parameter file

The parameter file can be given any name, but let us assume it has the name mosek.par. If MOSEK should use the parameter settings in that file, then -p mosek.par should be on the command line when MOSEK is invoked. An example of such a command line is

mosek -p mosek.par afiro.mps
Wed Feb 29 16:20:50 2012