The MOSEK Python optimizer API manual Version 7.0 (Revision 141)
Optimizer API for Python - Documentation - Mosek Optimizer API for Python - Documentation - Mosek
160 CHAPTER 12. THE OPTIMIZERS FOR MIXED-INTEGER PROBLEMS Tolerance δ 1 δ 2 δ 3 δ 4 δ 5 δ 6 Parameter name dparam.mio tol abs relax int dparam.mio tol rel relax int dparam.mio tol abs gap dparam.mio tol rel gap dparam.mio near tol abs gap dparam.mio near tol rel gap Table 12.2: Integer optimizer tolerances. Parameter name Delayed Explanation iparam.mio max num branches Yes Maximum number of branches allowed. iparam.mio max num relaxs Yes Maximum number of realizations allowed. iparam.mio max num solutions Yes Maximum number of feasible integer solutions allowed. Table 12.3: Parameters affecting the termination of the integer optimizer. is satisfied. If it is satisfied, the optimizer will report that the candidate solution is near optimal and then terminate. Please note that since this criteria depends on timing, the optimizer will not be run to run deterministic. 12.5.2 Important parameters All δ tolerances can be adjusted using suitable parameters — see Table 12.2. In Table 12.3 some other parameters affecting the integer optimizer termination criterion are shown. Please note that if the effect of a parameter is delayed, the associated termination criterion is applied only after some time, specified by the dparam.mio disable term time parameter. 12.6 How to speed up the solution process As mentioned previously, in many cases it is not possible to find an optimal solution to an integer optimization problem in a reasonable amount of time. Some suggestions to reduce the solution time are: • Relax the termination criterion: In case the run time is not acceptable, the first thing to do is to relax the termination criterion — see Section 12.5 for details. • Specify a good initial solution: In many cases a good feasible solution is either known or easily computed using problem specific knowledge. If a good feasible solution is known, it is usually worthwhile to use this as a starting point for the integer optimizer. • Improve the formulation: A mixed-integer optimization problem may be impossible to solve in one form and quite easy in another form. However, it is beyond the scope of this manual
12.7. UNDERSTANDING SOLUTION QUALITY 161 to discuss good formulations for mixed-integer problems. For discussions on this topic see for example [16]. 12.7 Understanding solution quality To determine the quality of the solution one should check the following: • The solution status key returned by MOSEK. • The optimality gap: A measure for how much the located solution can deviate from the optimal solution to the problem. • Feasibility. How much the solution violates the constraints of the problem. The optimality gap is a measure for how close the solution is to the optimal solution. The optimality gap is given by ɛ = |(objective value of feasible solution) − (objective bound)|. The objective value of the solution is guarantied to be within ɛ of the optimal solution. The optimality gap can be retrieved through the solution item dinfitem.mio obj abs gap. Often it is more meaningful to look at the optimality gap normalized with the magnitude of the solution. The relative optimality gap is available in dinfitem.mio obj rel gap.
- 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
- Page 157 and 158: Chapter 11 The optimizers for conti
- Page 159 and 160: 11.1. HOW AN OPTIMIZER WORKS 137 11
- Page 161 and 162: 11.2. LINEAR OPTIMIZATION 139 11.2.
- Page 163 and 164: 11.2. LINEAR OPTIMIZATION 141 Whene
- Page 165 and 166: 11.2. LINEAR OPTIMIZATION 143 11.2.
- Page 167 and 168: 11.2. LINEAR OPTIMIZATION 145 • R
- Page 169 and 170: 11.5. NONLINEAR CONVEX OPTIMIZATION
- Page 171 and 172: 11.6. SOLVING PROBLEMS IN PARALLEL
- Page 173 and 174: 11.6. SOLVING PROBLEMS IN PARALLEL
- Page 175 and 176: 11.6. SOLVING PROBLEMS IN PARALLEL
- Page 177 and 178: Chapter 12 The optimizers for mixed
- Page 179 and 180: 12.3. THE MIXED-INTEGER CONIC OPTIM
- Page 181: 12.5. TERMINATION CRITERION 159 •
- Page 185 and 186: Chapter 13 The analyzers 13.1 The p
- Page 187 and 188: 13.1. THE PROBLEM ANALYZER 165 Cons
- Page 189 and 190: 13.2. ANALYZING INFEASIBLE PROBLEMS
- Page 191 and 192: 13.2. ANALYZING INFEASIBLE PROBLEMS
- Page 193 and 194: 13.2. ANALYZING INFEASIBLE PROBLEMS
- Page 195 and 196: 13.2. ANALYZING INFEASIBLE PROBLEMS
- Page 197 and 198: 13.2. ANALYZING INFEASIBLE PROBLEMS
- Page 199 and 200: Chapter 14 Primal feasibility repai
- Page 201 and 202: 14.2. AUTOMATIC REPAIR 179 One way
- Page 203 and 204: 14.3. FEASIBILITY REPAIR IN MOSEK 1
- Page 205 and 206: 14.3. FEASIBILITY REPAIR IN MOSEK 1
- Page 207 and 208: Chapter 15 Sensitivity analysis 15.
- Page 209 and 210: 15.4. SENSITIVITY ANALYSIS FOR LINE
- Page 211 and 212: 15.4. SENSITIVITY ANALYSIS FOR LINE
- Page 213 and 214: 15.4. SENSITIVITY ANALYSIS FOR LINE
- Page 215 and 216: 15.5. SENSITIVITY ANALYSIS FROM THE
- Page 217 and 218: 15.6. SENSITIVITY ANALYSIS WITH THE
- Page 219 and 220: 15.6. SENSITIVITY ANALYSIS WITH THE
- Page 221 and 222: Appendix A API reference This chapt
- Page 223 and 224: 201 • Task.relaxprimal Obtain inf
- Page 225 and 226: A.1. EXCEPTIONS 203 • Task.putvar
- Page 227 and 228: A.2. CLASS TASK 205 Arguments which
- Page 229 and 230: A.2. CLASS TASK 207 See also • Ro
- Page 231 and 232: A.2. CLASS TASK 209 Description: Ap
160 CHAPTER 12. THE OPTIMIZERS FOR MIXED-INTEGER PROBLEMS<br />
Tolerance<br />
δ 1<br />
δ 2<br />
δ 3<br />
δ 4<br />
δ 5<br />
δ 6<br />
Parameter name<br />
dparam.mio tol abs relax int<br />
dparam.mio tol rel relax int<br />
dparam.mio tol abs gap<br />
dparam.mio tol rel gap<br />
dparam.mio near tol abs gap<br />
dparam.mio near tol rel gap<br />
Table 12.2: Integer <strong>optimizer</strong> tolerances.<br />
Parameter name Delayed Explanation<br />
iparam.mio max num branches Yes Maximum number of branches allowed.<br />
iparam.mio max num relaxs Yes Maximum number of realizations allowed.<br />
iparam.mio max num solutions Yes Maximum number of feasible integer solutions allowed.<br />
Table 12.3: Parameters affecting the termination of the integer <strong>optimizer</strong>.<br />
is satisfied. If it is satisfied, the <strong>optimizer</strong> will report that the candidate solution is near optimal and<br />
then terminate. Please note that since this criteria depends on timing, the <strong>optimizer</strong> will not be run<br />
to run deterministic.<br />
12.5.2 Important parameters<br />
All δ tolerances can be adjusted using suitable parameters — see Table 12.2. In Table 12.3 some other<br />
parameters affecting the integer <strong>optimizer</strong> termination criterion are shown. Please note that if the<br />
effect of a parameter is delayed, the associated termination criterion is applied only after some time,<br />
specified by the dparam.mio disable term time parameter.<br />
12.6 How to speed up the solution process<br />
As mentioned previously, in many cases it is not possible to find an optimal solution to an integer<br />
optimization problem in a reasonable amount of time. Some suggestions to reduce the solution time<br />
are:<br />
• Relax the termination criterion: In case the run time is not acceptable, the first thing to do is<br />
to relax the termination criterion — see Section 12.5 for details.<br />
• Specify a good initial solution: In many cases a good feasible solution is either known or easily<br />
computed using problem specific knowledge. If a good feasible solution is known, it is usually<br />
worthwhile to use this as a starting point for the integer <strong>optimizer</strong>.<br />
• Improve the formulation: A mixed-integer optimization problem may be impossible to solve<br />
in one form and quite easy in another form. However, it is beyond the scope of this <strong>manual</strong>