The MOSEK Python optimizer API manual Version 7.0 (Revision 141)

Optimizer API for Python - Documentation - Mosek Optimizer API for Python - Documentation - Mosek

25.11.2015 Views

616 APPENDIX F. MOSEK FILE FORMATS * 1 2 3 4 5 6 *23456789012345678901234567890123456789012345678901234567890 NAME [name] ?? [vname1] [value1] ENDATA Figure F.1: The standard ORD format. The format is based on the TAR (USTar) file format. This means that the individual pieces of data in a .task file can be examined by unpacking it as a TAR file. Please note that the inverse may not work: Creating a file using TAR will most probably not create a valid MOSEK Task file since the order of the entries is important. F.5 The XML (OSiL) format MOSEK can write data in the standard OSiL xml format. For a definition of the OSiL format please see http://www.optimizationservices.org/. Only linear constraints (possibly with integer variables) are supported. By default output files with the extension .xml are written in the OSiL format. The parameter iparam.write xml mode controls if the linear coefficients in the A matrix are written in row or column order. F.6 The ORD file format An ORD formatted file specifies in which order the mixed integer optimizer branches on variables. The format of an ORD file is shown in Figure F.1. In the figure names in capitals are keywords of the ORD format, whereas names in brackets are custom names or values. The ?? is an optional key specifying the preferred branching direction. The possible keys are DN and UP which indicate that down or up is the preferred branching direction respectively. The branching direction key is optional and is left blank the mixed integer optimizer will decide whether to branch up or down. F.6.1 An example A concrete example of a ORD file is presented below: NAME EXAMPLE DN x1 2 UP x2 1 x3 10 ENDATA This implies that the priorities 2, 1, and 10 are assigned to variable x1, x2, and x3 respectively. The higher the priority value assigned to a variable the earlier the mixed integer optimizer will branch on that variable. The key DN implies that the mixed integer optimizer first will branch down on variable whereas the key UP implies that the mixed integer optimizer will first branch up on a variable. If no branch direction is specified for a variable then the mixed integer optimizer will automatically

F.7. THE SOLUTION FILE FORMAT 617 choose the branching direction for that variable. Similarly, if no priority is assigned to a variable then it is automatically assigned the priority of 0. F.7 The solution file format MOSEK provides one or two solution files depending on the problem type and the optimizer used. If a problem is optimized using the interior-point optimizer and no basis identification is required, then a file named probname.sol is provided. probname is the name of the problem and .sol is the file extension. If the problem is optimized using the simplex optimizer or basis identification is performed, then a file named probname.bas is created presenting the optimal basis solution. Finally, if the problem contains integer constrained variables then a file named probname.int is created. It contains the integer solution. F.7.1 The basic and interior solution files In general both the interior-point and the basis solution files have the format: NAME : PROBLEM STATUS : SOLUTION STATUS : OBJECTIVE NAME : PRIMAL OBJECTIVE : DUAL OBJECTIVE : CONSTRAINTS INDEX NAME AT ACTIVITY LOWER LIMIT UPPER LIMIT DUAL LOWER DUAL UPPER ? ?? VARIABLES INDEX NAME AT ACTIVITY LOWER LIMIT UPPER LIMIT DUAL LOWER DUAL UPPER CONIC DUAL ? ?? In the example the fields ? and will be filled with problem and solution specific information. As can be observed a solution report consists of three sections, i.e. HEADER In this section, first the name of the problem is listed and afterwards the problem and solution statuses are shown. In this case the information shows that the problem is primal and dual feasible and the solution is optimal. Next the primal and dual objective values are displayed. CONSTRAINTS Subsequently in the constraint section the following information is listed for each constraint: INDEX A sequential index assigned to the constraint by MOSEK NAME The name of the constraint assigned by the user.

F.7. THE SOLUTION FILE FORMAT 617<br />

choose the branching direction for that variable. Similarly, if no priority is assigned to a variable then<br />

it is automatically assigned the priority of 0.<br />

F.7 <strong>The</strong> solution file format<br />

<strong>MOSEK</strong> provides one or two solution files depending on the problem type and the <strong>optimizer</strong> used.<br />

If a problem is optimized using the interior-point <strong>optimizer</strong> and no basis identification is required,<br />

then a file named probname.sol is provided. probname is the name of the problem and .sol is<br />

the file extension. If the problem is optimized using the simplex <strong>optimizer</strong> or basis identification is<br />

performed, then a file named probname.bas is created presenting the optimal basis solution. Finally,<br />

if the problem contains integer constrained variables then a file named probname.int is created. It<br />

contains the integer solution.<br />

F.7.1<br />

<strong>The</strong> basic and interior solution files<br />

In general both the interior-point and the basis solution files have the format:<br />

NAME<br />

: <br />

PROBLEM STATUS : <br />

SOLUTION STATUS : <br />

OBJECTIVE NAME : <br />

PRIMAL OBJECTIVE : <br />

DUAL OBJECTIVE : <br />

CONSTRAINTS<br />

INDEX NAME AT ACTIVITY LOWER LIMIT UPPER LIMIT DUAL LOWER DUAL UPPER<br />

? ?? <br />

VARIABLES<br />

INDEX NAME AT ACTIVITY LOWER LIMIT UPPER LIMIT DUAL LOWER DUAL UPPER CONIC DUAL<br />

? ?? <br />

In the example the fields ? and will be filled with problem and solution specific information. As<br />

can be observed a solution report consists of three sections, i.e.<br />

HEADER<br />

In this section, first the name of the problem is listed and afterwards the problem and solution<br />

statuses are shown. In this case the information shows that the problem is primal and dual<br />

feasible and the solution is optimal. Next the primal and dual objective values are displayed.<br />

CONSTRAINTS<br />

Subsequently in the constraint section the following information is listed for each constraint:<br />

INDEX<br />

A sequential index assigned to the constraint by <strong>MOSEK</strong><br />

NAME<br />

<strong>The</strong> name of the constraint assigned by the user.

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

Saved successfully!

Ooh no, something went wrong!