The MOSEK Python optimizer API manual Version 7.0 (Revision 141)
Optimizer API for Python - Documentation - Mosek Optimizer API for Python - Documentation - Mosek
600 APPENDIX F. MOSEK FILE FORMATS F.2.1.1 The objective The first section beginning with one of the keywords max maximum maximize min minimum minimize defines the objective sense and the objective function, i.e. The objective may be given a name by writing myname: c T x + 1 2 xT Q o x. before the expressions. If no name is given, then the objective is named obj. The objective function contains linear and quadratic terms. The linear terms are written as 4 x1 + x2 - 0.1 x3 and so forth. The quadratic terms are written in square brackets ([]) and are either squared or multiplied as in the examples x1^2 and x1 * x2 There may be zero or more pairs of brackets containing quadratic expressions. An example of an objective section is: minimize myobj: 4 x1 + x2 - 0.1 x3 + [ x1^2 + 2.1 x1 * x2 ]/2 Please note that the quadratic expressions are multiplied with 1 2 , so that the above expression means minimize 4x 1 + x 2 − 0.1 · x 3 + 1 2 (x2 1 + 2.1 · x 1 · x 2 ) If the same variable occurs more than once in the linear part, the coefficients are added, so that 4 x1 + 2 x1 is equivalent to 6 x1. In the quadratic expressions x1 * x2 is equivalent to x2 * x1 and as in the linear part , if the same variables multiplied or squared occur several times their coefficients are added. F.2.1.2 The constraints The second section beginning with one of the keywords subj to subject to s.t.
F.2. THE LP FILE FORMAT 601 st defines the linear constraint matrix (A ) and the quadratic matrices (Q i ). A constraint contains a name (optional), expressions adhering to the same rules as in the objective and a bound: subject to con1: x1 + x2 + [ x3^2 ]/2
- Page 571 and 572: D.5. PROGRESS CALL-BACK CODES 549 c
- Page 573 and 574: D.5. PROGRESS CALL-BACK CODES 551 c
- Page 575 and 576: D.5. PROGRESS CALL-BACK CODES 553 c
- Page 577 and 578: D.6. TYPES OF CONVEXITY CHECKS. 555
- Page 579 and 580: D.10. DOUBLE INFORMATION ITEMS 557
- Page 581 and 582: D.10. DOUBLE INFORMATION ITEMS 559
- Page 583 and 584: D.11. FEASIBILITY REPAIR TYPES 561
- Page 585 and 586: D.13. INTEGER INFORMATION ITEMS. 56
- 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: F.2. THE LP FILE FORMAT 599 minimiz
- 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 and 638: F.4. THE TASK FORMAT 615 This can b
- Page 639 and 640: F.7. THE SOLUTION FILE FORMAT 617 c
- 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
600 APPENDIX F. <strong>MOSEK</strong> FILE FORMATS<br />
F.2.1.1<br />
<strong>The</strong> objective<br />
<strong>The</strong> first section beginning with one of the keywords<br />
max<br />
maximum<br />
maximize<br />
min<br />
minimum<br />
minimize<br />
defines the objective sense and the objective function, i.e.<br />
<strong>The</strong> objective may be given a name by writing<br />
myname:<br />
c T x + 1 2 xT Q o x.<br />
before the expressions. If no name is given, then the objective is named obj.<br />
<strong>The</strong> objective function contains linear and quadratic terms. <strong>The</strong> linear terms are written as<br />
4 x1 + x2 - 0.1 x3<br />
and so forth. <strong>The</strong> quadratic terms are written in square brackets ([]) and are either squared or<br />
multiplied as in the examples<br />
x1^2<br />
and<br />
x1 * x2<br />
<strong>The</strong>re may be zero or more pairs of brackets containing quadratic expressions.<br />
An example of an objective section is:<br />
minimize<br />
myobj: 4 x1 + x2 - 0.1 x3 + [ x1^2 + 2.1 x1 * x2 ]/2<br />
Please note that the quadratic expressions are multiplied with 1 2<br />
, so that the above expression means<br />
minimize 4x 1 + x 2 − 0.1 · x 3 + 1 2 (x2 1 + 2.1 · x 1 · x 2 )<br />
If the same variable occurs more than once in the linear part, the coefficients are added, so that 4 x1<br />
+ 2 x1 is equivalent to 6 x1. In the quadratic expressions x1 * x2 is equivalent to x2 * x1 and as<br />
in the linear part , if the same variables multiplied or squared occur several times their coefficients are<br />
added.<br />
F.2.1.2<br />
<strong>The</strong> constraints<br />
<strong>The</strong> second section beginning with one of the keywords<br />
subj to<br />
subject to<br />
s.t.