The MOSEK Python optimizer API manual Version 7.0 (Revision 141)
Optimizer API for Python - Documentation - Mosek Optimizer API for Python - Documentation - Mosek
84 CHAPTER 6. NONLINEAR API TUTORIAL Constants used to define : Entropy function, fxln(x) Exponential function,fe gx+h Logarithm, fln(gx + h) Power function, f(x + h) g
Chapter 7 Advanced API tutorial This chapter provides information about additional problem classes and functionality provided in the Python API. 7.1 The progress call-back Some of the API function calls, notably Task.optimize, may take a long time to complete. Therefore, during the optimization a call-back function is called frequently, to provide information on the progress of the call. From the call-back function it is possible • to obtain information on the solution process, • to report of the optimizer’s progress, and • to ask MOSEK to terminate, if desired. 7.1.1 Source code example The following source code example documents how the progress call-back function can be used. 1 ## [ callback.py ] 2 # Copyright: Copyright (c) MOSEK ApS, Denmark. All rights reserved. 3 # 4 # File: callback.py 5 # 6 # Purpose: To demonstrate how to use the progress 7 # callback. 8 # 9 # Use this script as follows: 10 # callback.py psim 25fv47.mps 11 # callback.py dsim 25fv47.mps 12 # callback.py intpnt 25fv47.mps 85
- Page 55 and 56: 5.2. LINEAR OPTIMIZATION 33 51 mose
- Page 57 and 58: 5.3. CONIC QUADRATIC OPTIMIZATION 3
- Page 59 and 60: 5.3. CONIC QUADRATIC OPTIMIZATION 3
- Page 61 and 62: 5.4. SEMIDEFINITE OPTIMIZATION 39 m
- Page 63 and 64: 5.4. SEMIDEFINITE OPTIMIZATION 41 4
- Page 65 and 66: 5.4. SEMIDEFINITE OPTIMIZATION 43 1
- Page 67 and 68: 5.5. QUADRATIC OPTIMIZATION 45 with
- Page 69 and 70: 5.5. QUADRATIC OPTIMIZATION 47 68 #
- Page 71 and 72: 5.5. QUADRATIC OPTIMIZATION 49 5.5.
- Page 73 and 74: 5.5. QUADRATIC OPTIMIZATION 51 81 a
- Page 75 and 76: 5.6. THE SOLUTION SUMMARY 53 • Th
- Page 77 and 78: 5.7. INTEGER OPTIMIZATION 55 21 # f
- Page 79 and 80: 5.7. INTEGER OPTIMIZATION 57 137 sy
- Page 81 and 82: 5.8. THE SOLUTION SUMMARY FOR MIXED
- Page 83 and 84: 5.9. RESPONSE HANDLING 61 Note that
- Page 85 and 86: 5.10. PROBLEM MODIFICATION AND REOP
- Page 87 and 88: 5.10. PROBLEM MODIFICATION AND REOP
- Page 89 and 90: 5.11. SOLUTION ANALYSIS 67 151 # Pu
- Page 91 and 92: 5.13. CONVENTIONS EMPLOYED IN THE A
- Page 93 and 94: 5.13. CONVENTIONS EMPLOYED IN THE A
- Page 95 and 96: 5.13. CONVENTIONS EMPLOYED IN THE A
- Page 97 and 98: 5.13. CONVENTIONS EMPLOYED IN THE A
- Page 99 and 100: Chapter 6 Nonlinear API tutorial Th
- Page 101 and 102: 6.1. SEPARABLE CONVEX (SCOPT) INTER
- Page 103 and 104: 6.1. SEPARABLE CONVEX (SCOPT) INTER
- Page 105: 6.1. SEPARABLE CONVEX (SCOPT) INTER
- Page 109 and 110: 7.1. THE PROGRESS CALL-BACK 87 71 p
- Page 111 and 112: 7.2. SOLVING LINEAR SYSTEMS INVOLVI
- Page 113 and 114: 7.2. SOLVING LINEAR SYSTEMS INVOLVI
- Page 115 and 116: 7.2. SOLVING LINEAR SYSTEMS INVOLVI
- Page 117 and 118: 7.2. SOLVING LINEAR SYSTEMS INVOLVI
- Page 119 and 120: Chapter 8 A case study 8.1 Portfoli
- Page 121 and 122: 8.1. PORTFOLIO OPTIMIZATION 99 e T
- Page 123 and 124: 8.1. PORTFOLIO OPTIMIZATION 101 is
- Page 125 and 126: 8.1. PORTFOLIO OPTIMIZATION 103 15
- Page 127 and 128: 8.1. PORTFOLIO OPTIMIZATION 105 63
- Page 129 and 130: 8.1. PORTFOLIO OPTIMIZATION 107 8.1
- Page 131 and 132: 8.1. PORTFOLIO OPTIMIZATION 109 110
- Page 133 and 134: 8.1. PORTFOLIO OPTIMIZATION 111 z j
- Page 135 and 136: 8.1. PORTFOLIO OPTIMIZATION 113 Var
- Page 137 and 138: 8.1. PORTFOLIO OPTIMIZATION 115 56
- Page 139 and 140: 8.1. PORTFOLIO OPTIMIZATION 117 172
- Page 141 and 142: Chapter 9 Usage guidelines The purp
- Page 143 and 144: 9.3. WRITING TASK DATA TO A FILE 12
- Page 145 and 146: Chapter 10 Problem formulation and
- Page 147 and 148: 10.1. LINEAR OPTIMIZATION 125 be a
- Page 149 and 150: 10.2. CONIC QUADRATIC OPTIMIZATION
- Page 151 and 152: 10.2. CONIC QUADRATIC OPTIMIZATION
- Page 153 and 154: 10.3. SEMIDEFINITE OPTIMIZATION 131
- Page 155 and 156: 10.4. QUADRATIC AND QUADRATICALLY C
Chapter 7<br />
Advanced <strong>API</strong> tutorial<br />
This chapter provides information about additional problem classes and functionality provided in the<br />
<strong>Python</strong> <strong>API</strong>.<br />
7.1 <strong>The</strong> progress call-back<br />
Some of the <strong>API</strong> function calls, notably Task.optimize, may take a long time to complete. <strong>The</strong>refore,<br />
during the optimization a call-back function is called frequently, to provide information on the progress<br />
of the call. From the call-back function it is possible<br />
• to obtain information on the solution process,<br />
• to report of the <strong>optimizer</strong>’s progress, and<br />
• to ask <strong>MOSEK</strong> to terminate, if desired.<br />
7.1.1 Source code example<br />
<strong>The</strong> following source code example documents how the progress call-back function can be used.<br />
1 ##<br />
[ callback.py ]<br />
2 # Copyright: Copyright (c) <strong>MOSEK</strong> ApS, Denmark. All rights reserved.<br />
3 #<br />
4 # File: callback.py<br />
5 #<br />
6 # Purpose: To demonstrate how to use the progress<br />
7 # callback.<br />
8 #<br />
9 # Use this script as follows:<br />
10 # callback.py psim 25fv47.mps<br />
11 # callback.py dsim 25fv47.mps<br />
12 # callback.py intpnt 25fv47.mps<br />
85