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.

15.4. WRITING OPF FILES FROM <strong>MOSEK</strong> 303<br />

[p MSK IPAR OPF WRITE PARAMETERS] MSK ON [/p]<br />

[p MSK DPAR DATA TOL BOUND INF] 1.0e18 [/p]<br />

[/parameters]<br />

[/vendor]<br />

15.4 Writing OPF files from <strong>MOSEK</strong><br />

To write an OPF file set the parameter MSK IPAR WRITE DATA FORMAT to MSK DATA FORMAT OP as this<br />

ensures that OPF format is used. <strong>The</strong>n modify the following parameters to define what the file should<br />

contain:<br />

• MSK IPAR OPF WRITE HEADER, include a small header with comments.<br />

• MSK IPAR OPF WRITE HINTS, include hints about the size of the problem.<br />

• MSK IPAR OPF WRITE PROBLEM, include the problem itself — objective, constraints and bounds.<br />

• MSK IPAR OPF WRITE SOLUTIONS, include solutions if they are defined. If this is off, no solutions<br />

are included.<br />

• MSK IPAR OPF WRITE SOL BAS, include basic solution, if defined.<br />

• MSK IPAR OPF WRITE SOL ITG, include integer solution, if defined.<br />

• MSK IPAR OPF WRITE SOL ITR, include interior solution, if defined.<br />

• MSK IPAR OPF WRITE PARAMETERS, include all parameter settings.<br />

15.5 Examples<br />

This section contains a set of small examples written in OPF and describing how to formulate <strong>line</strong>ar,<br />

quadratic and conic problems.<br />

15.5.1 Linear example lo1.opf<br />

Consider the example:<br />

having the bounds<br />

maximize 3x 0 + 1x 1 + 5x 2 + 1x 3<br />

subject to 3x 0 + 1x 1 + 2x 2 = 30,<br />

2x 0 + 1x 1 + 3x 2 + 1x 3 ≥ 15,<br />

2x 1 + 3x 3 ≤ 25,

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

Saved successfully!

Ooh no, something went wrong!