The MOSEK Python optimizer API manual Version 7.0 (Revision 141)
Optimizer API for Python - Documentation - Mosek Optimizer API for Python - Documentation - Mosek
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.
- Page 587 and 588: D.13. INTEGER INFORMATION ITEMS. 56
- Page 589 and 590: D.13. INTEGER INFORMATION ITEMS. 56
- Page 591 and 592: D.16. INPUT/OUTPUT MODES 569 intpnt
- Page 593 and 594: D.20. CONTINUOUS MIXED-INTEGER SOLU
- Page 595 and 596: D.26. OBJECTIVE SENSE TYPES 573 D.2
- Page 597 and 598: D.31. PRESOLVE METHOD. 575 paramete
- Page 599 and 600: D.35. RESPONSE CODE TYPE 577 D.35 R
- Page 601 and 602: D.42. PROBLEM REFORMULATION. 579 si
- Page 603 and 604: D.46. SOLUTION TYPES 581 solsta.dua
- Page 605 and 606: D.50. STREAM TYPES 583 startpointty
- Page 607 and 608: Appendix E Troubleshooting When cre
- Page 609 and 610: Appendix F Mosek file formats MOSEK
- Page 611 and 612: F.1. THE MPS FILE FORMAT 589 Fields
- Page 613 and 614: F.1. THE MPS FILE FORMAT 591 must b
- Page 615 and 616: F.1. THE MPS FILE FORMAT 593 Constr
- Page 617 and 618: F.1. THE MPS FILE FORMAT 595 v 1 is
- Page 619 and 620: F.1. THE MPS FILE FORMAT 597 Please
- Page 621 and 622: F.2. THE LP FILE FORMAT 599 minimiz
- Page 623 and 624: F.2. THE LP FILE FORMAT 601 st defi
- Page 625 and 626: F.2. THE LP FILE FORMAT 603 bounds
- Page 627 and 628: F.3. THE OPF FORMAT 605 iparam.writ
- Page 629 and 630: F.3. THE OPF FORMAT 607 [tag "value
- Page 631 and 632: F.3. THE OPF FORMAT 609 Note that a
- Page 633 and 634: F.3. THE OPF FORMAT 611 F.3.2.3 Nam
- Page 635 and 636: F.3. THE OPF FORMAT 613 [bounds] [b
- Page 637: F.4. THE TASK FORMAT 615 This can b
- Page 641 and 642: Appendix G Problem analyzer example
- Page 643 and 644: G.2. ARKI001 621 2 476 45.42 48.19
- Page 645 and 646: G.4. PROBLEM WITH BOTH LINEAR AND C
- Page 647 and 648: Bibliography [1] Chvátal, V.. Line
- Page 649 and 650: Index analyzenames (Task method), 2
- Page 651 and 652: INDEX 629 getpcni (Task method), 25
- Page 653 and 654: INDEX 631 putbarablocktriplet (Task
- Page 655 and 656: INDEX 633 rescode.err inv numj, 521
- Page 657 and 658: INDEX 635 rescode.err sen bound inv
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.