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
12 CHAPTER 3. MOSEK AND AMPL Value Message 0 the solution is optimal. 100 suboptimal primal solution. 101 superoptimal (dual feasible) solution. 150 the solution is near optimal. 200 primal infeasible problem. 300 dual infeasible problem. 400 too many iterations. 500 solution status is unknown. 501 ill-posed problem, solution status is unknown. ≥ 501 The value - 501 is a MOSEK response code. See Appendix 10 for all MOSEK response codes. Figure 3.1: Interpretation of solve result num. when the AMPL shell has started type the commands: ampl: model diet.mod; ampl: data diet.dat; ampl: option solver mosek; ampl: solve; The resulting output is: MOSEK finished. Problem status - PRIMAL AND DUAL FEASIBLE Solution status - OPTIMAL Primal objective - 14.8557377 Dual objective - 14.8557377 Objective = Total Cost 3.4 Determining the outcome of an optimization The AMPL parameter solve result num is used to indicate the outcome of the optimization process. It is used as follows ampl: display solve result num Please refer to table 3.1 for possible values of this parameter. 3.5 Optimizer options 3.5.1 The MOSEK parameter database The MOSEK optimizer has options and parameters controlling such things as the termination criterion and which optimizer is used. These parameters can be modified within AMPL as shown in the example
3.6. CONSTRAINT AND VARIABLE NAMES 13 below: ampl: model diet.mod; ampl: data diet.dat; ampl: option solver mosek; ampl: option mosek options ampl? ’msk ipar optimizer = msk optimizer primal simplex \ ampl? msk ipar sim max iterations = 100000’; ampl: solve; In the example above a string called mosek options is created which contains the parameter settings. Each parameter setting has the format parameter name = value where ”parameter name” can be any valid MOSEK parameter name. See Appendix 9 for a description of all valid MOSEK parameters. An alternative way of specifying the options is ampl: option mosek options ampl? ’msk ipar optimizer = msk optimizer primal simplex’ ampl? ’ msk ipar sim max iterations = 100000’; New options can also be appended to an existing option string as shown below ampl: option mosek options $mosek options ampl? ’ msk ipar sim print freq = 0 msk ipar sim max iterations = 1000’; The expression $mosek options expands to the current value of the option. Line two in the example appends an additional value msk ipar sim max iterations to the option string. 3.5.2 Options 3.5.2.1 outlev MOSEK also recognizes the outlev option which controls the amount of printed output. 0 means no printed output and a higher value means more printed output. An example of setting outlev is as follows: ampl: option mosek options ’outlev=2’; 3.5.2.2 wantsol MOSEK recognize the option wantsol. We refer the reader to the AMPL manual [1] for details about this option. 3.6 Constraint and variable names AMPL assigns meaningfull names to all the constraints and variables. Since MOSEK uses item names in error and log messages, it may be useful to pass the AMPL names to MOSEK. Using the command
- Page 1 and 2: The MOSEK command line tool. Versio
- Page 3 and 4: Contents 1 Changes and new features
- Page 5 and 6: CONTENTS v 6.5 Termination criterio
- Page 7 and 8: CONTENTS vii 9.1.56 MSK DPAR NONCON
- Page 9 and 10: CONTENTS ix 9.2.79 MSK IPAR MIO FEA
- Page 11 and 12: CONTENTS xi 9.2.171 MSK IPAR SOL RE
- Page 13 and 14: CONTENTS xiii 11.29 Ordering strate
- Page 15 and 16: CONTENTS xv 18.2 arki001 . . . . .
- Page 17 and 18: Contact information Phone +45 3917
- Page 19 and 20: License agreement Before using the
- Page 21 and 22: Chapter 1 Changes and new features
- Page 23 and 24: 1.4. OPTIMIZATION TOOLBOX FOR MATLA
- Page 25 and 26: Chapter 2 What is MOSEK MOSEK is a
- Page 27: Chapter 3 MOSEK and AMPL AMPL is a
- Page 31 and 32: 3.8. HOT-START 15 Linear dependency
- Page 33 and 34: 3.10. SENSITIVITY ANALYSIS 17 • .
- Page 35 and 36: Chapter 4 Problem formulation and s
- Page 37 and 38: 4.1. LINEAR OPTIMIZATION 21 be a pr
- Page 39 and 40: 4.2. CONIC QUADRATIC OPTIMIZATION 2
- Page 41 and 42: 4.2. CONIC QUADRATIC OPTIMIZATION 2
- Page 43 and 44: 4.3. SEMIDEFINITE OPTIMIZATION 27 4
- Page 45 and 46: 4.5. GENERAL CONVEX OPTIMIZATION 29
- Page 47 and 48: 4.5. GENERAL CONVEX OPTIMIZATION 31
- Page 49 and 50: Chapter 5 The optimizers for contin
- Page 51 and 52: 5.1. HOW AN OPTIMIZER WORKS 35 5.1.
- Page 53 and 54: 5.2. LINEAR OPTIMIZATION 37 5.2.2 T
- Page 55 and 56: 5.2. LINEAR OPTIMIZATION 39 Wheneve
- Page 57 and 58: 5.2. LINEAR OPTIMIZATION 41 5.2.2.3
- Page 59 and 60: 5.2. LINEAR OPTIMIZATION 43 • Rai
- Page 61 and 62: 5.5. NONLINEAR CONVEX OPTIMIZATION
- Page 63 and 64: 5.6. SOLVING PROBLEMS IN PARALLEL 4
- Page 65 and 66: Chapter 6 The optimizers for mixed-
- Page 67 and 68: 6.3. THE MIXED-INTEGER CONIC OPTIMI
- Page 69 and 70: 6.5. TERMINATION CRITERION 53 The f
- Page 71 and 72: 6.7. UNDERSTANDING SOLUTION QUALITY
- Page 73 and 74: Chapter 7 The analyzers 7.1 The pro
- Page 75 and 76: 7.1. THE PROBLEM ANALYZER 59 Constr
- Page 77 and 78: 7.2. ANALYZING INFEASIBLE PROBLEMS
3.6. CONSTRAINT AND VARIABLE NAMES 13<br />
below:<br />
ampl: model diet.mod;<br />
ampl: data diet.dat;<br />
ampl: option solver mosek;<br />
ampl: option mosek options<br />
ampl? ’msk ipar optimizer = msk optimizer primal simplex \<br />
ampl? msk ipar sim max iterations = 100000’;<br />
ampl: solve;<br />
In the example above a string called mosek options is created which contains the parameter settings.<br />
Each parameter setting has the format<br />
parameter name = value<br />
where ”parameter name” can be any valid <strong>MOSEK</strong> parameter name. See Appendix 9 for a description<br />
of all valid <strong>MOSEK</strong> parameters.<br />
An alternative way of specifying the options is<br />
ampl: option mosek options<br />
ampl? ’msk ipar optimizer = msk optimizer primal simplex’<br />
ampl? ’ msk ipar sim max iterations = 100000’;<br />
New options can also be appended to an existing option string as shown below<br />
ampl: option mosek options $mosek options<br />
ampl? ’ msk ipar sim print freq = 0 msk ipar sim max iterations = 1000’;<br />
<strong>The</strong> expression $mosek options expands to the current value of the option. Line two in the example<br />
appends an additional value msk ipar sim max iterations to the option string.<br />
3.5.2 Options<br />
3.5.2.1 outlev<br />
<strong>MOSEK</strong> also recognizes the outlev option which controls the amount of printed output. 0 means no<br />
printed output and a higher value means more printed output. An example of setting outlev is as<br />
follows:<br />
ampl: option mosek options ’outlev=2’;<br />
3.5.2.2 wantsol<br />
<strong>MOSEK</strong> recognize the option wantsol. We refer the reader to the AMPL manual [1] for details about<br />
this option.<br />
3.6 Constraint and variable names<br />
AMPL assigns meaningfull names to all the constraints and variables. Since <strong>MOSEK</strong> uses item names<br />
in error and log messages, it may be useful to pass the AMPL names to <strong>MOSEK</strong>.<br />
Using the <strong>command</strong>