25.11.2015 Views

The MOSEK command line tool Version 7.0 (Revision 141)

The MOSEK command line tool. Version 7.0 ... - Documentation

The MOSEK command line tool. Version 7.0 ... - Documentation

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

18 CHAPTER 3. <strong>MOSEK</strong> AND AMPL<br />

3.11 Using the <strong>command</strong> <strong>line</strong> version of the AMPL interface<br />

AMPL can generate a data file containing all the optimization problem and all relevant information<br />

which can then be read and solved by the <strong>MOSEK</strong> <strong>command</strong> <strong>line</strong> <strong>tool</strong>.<br />

When the problem has been loaded into AMPL, the <strong>command</strong>s<br />

ampl: option auxfiles rc;<br />

ampl: write bprob;<br />

will make AMPL write the appropriate data files, i.e.<br />

prob.nl<br />

prob.col<br />

prob.row<br />

<strong>The</strong>n the problem can be solved using the <strong>command</strong> <strong>line</strong> version of <strong>MOSEK</strong> as follows<br />

mosek prob.nl outlev=10 -a<br />

<strong>The</strong> -a <strong>command</strong> <strong>line</strong> option indicates that <strong>MOSEK</strong> is invoked in AMPL mode. When <strong>MOSEK</strong> is<br />

invoked in AMPL mode the normal <strong>MOSEK</strong> <strong>command</strong> <strong>line</strong> options should appear after the -a option<br />

except for the file name which should be the first argument. As the above example demonstrates<br />

<strong>MOSEK</strong> accepts <strong>command</strong> <strong>line</strong> options as specified by the AMPL ”convention”. Which <strong>command</strong> <strong>line</strong><br />

arguments <strong>MOSEK</strong> accepts in AMPL mode can be viewed by executing<br />

mosek -= -a<br />

For <strong>line</strong>ar, quadratic and quadratic constrained problems a text file representation of the problem can<br />

be obtained using one of the <strong>command</strong>s<br />

mosek prob.nl -a -x -out prob.mps<br />

mosek prob.nl -a -x -out prob.opf<br />

mosek prob.nl -a -x -out prob.lp

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!