User's Guide for Tomlab 4.0.6
Total Page:16
File Type:pdf, Size:1020Kb
User’s Guide for Tomlab 4.0.61 Kenneth Holmstr¨om and Anders G¨oran Tomlab Optimization G¨addgatan 9 SE-723 49 V¨aster˚as, Sweden August 1, 2003 1More information available at the TOMLAB home page: http://tomlab.biz and at the Applied Optimization and Modeling TOM home page http://www.ima.mdh.se/tom. E-mail: [email protected]. 1 Contents 1 Introduction to TOMLAB 7 1.1 WhatisTOMLAB? ..................................... ....... 7 1.2 The Organization of This Guide . ........ 8 1.3 Further Reading . ...... 9 2 The Design of TOMLAB 10 2.1 Structure Input and Output . 10 2.2 Introduction to Solver and Problem Types . .......... 10 2.3 The Process of Solving Optimization Problems with TOMLAB . .......... 11 2.4 Low Level Routines and Gateway Routines . ....... 14 3 Optimization Problem Types and Solver Routines in TOMLAB 16 3.1 Optimization Problem Types Defined in TOMLAB . ...... 16 3.2 Solver Routines in TOMLAB . ....... 20 3.2.1 Solvers Available in all Tomlab Versions . ............. 20 3.2.2 Solvers Available in the TOMLAB /SOL Toolbox . ........ 22 3.2.3 Solvers Available in the TOMLAB/CGO Toolbox . .......... 22 3.2.4 Solvers Available in the TOMLAB /PENSDP Toolbox . .......... 23 3.2.5 Solvers Available in the TOMLAB /PENBMI Toolbox . ........... 23 3.2.6 Solvers Available in the TOMLAB /MINLP v1.0 Toolbox . ............ 23 3.2.7 Finding Available Solvers . ........ 24 4 Defining User Problems in the TOMLAB Quick or Init File format 26 4.1 TOMLAB Quick (TQ) Format for User Problems . ......... 26 4.2 TOMLAB Init File (IF) Format for User Problems . ............ 27 4.3 Create an Init File going from TQ to IF format . .............. 29 4.4 Adding an Init File to the GUI Data Base . .......... 30 5 Solving Linear, Quadratic and Integer Programming Problems 32 5.1 Linear Programming Problems . .......... 32 5.1.1 A Quick Linear Programming Solution . ........ 33 5.1.2 Several Linear Programs . ....... 34 5.1.3 LargeSetsofLinearPrograms . ......... 34 5.1.4 More on Solving Linear Programs . ......... 36 5.2 Quadratic Programming Problems . .......... 40 5.2.1 A Quick Quadratic Programming solution . ......... 40 5.2.2 Several Quadratic Programs . ....... 41 5.2.3 Large Sets of Quadratic Programs . ......... 42 5.2.4 Another Direct Approach to a QP Solution . ..... 44 5.2.5 More on Solving Quadratic Programs . ......... 44 5.3 Mixed-Integer Programming Problems . .......... 45 5.3.1 Large Sets of Mixed-Integer Programs . ......... 48 2 5.3.2 More on Solving Mixed-Integer Programs . ......... 48 6 Solving Unconstrained and Constrained Optimization Problems 50 6.1 Defining the Problem in Matlab m-files . ...... 50 6.1.1 Communication between user routines . ..... 53 6.2 Solving Unconstrained Optimization using the TQ format . .......... 54 6.3 Direct Call to an Optimization Routine . ........... 55 6.4 Solving Constrained Optimization using the TQ format . ........... 56 6.5 Efficient use of the TOM solvers . ....... 58 7 Solving Global Optimization Problems 59 7.1 Solving Box-Bounded Global Optimization with TQ format . ........... 59 7.2 Defining Global Mixed-Integer Nonlinear Problems with TQ format . ......... 60 8 Least Squares and Parameter Estimation Problems 62 8.1 Solving Linear Least Squares Problems using the TQ Format . ......... 62 8.2 Solving Linear Least Squares Problems using the SOL Solver LSSOL . 63 8.3 Solving Nonlinear Least Squares Problems using the TQ Format . ......... 64 8.4 Fitting Sums of Exponentials to Empirical Data . ............. 67 8.5 Solving Large Scale LS problems with Tlsqr ............................... 68 9 Efficient Use of the SOL Solvers in TOMLAB 71 9.1 Setting Parameters for the SOL Solvers . ........ 71 9.2 Derivatives for the SOL Solvers . .......... 72 9.3 SOL Solver Output on Files . ..... 73 9.4 Warm Starts for the SOL Solvers . ......... 74 9.5 Memory Issues for the SOL Solvers . ........ 75 10 Special Notes and Features 76 10.1 Approximation of Derivatives . .............. 76 10.2 Speed and Solution of Optimization Subproblems . ....... 79 10.3 User Supplied Problem Parameters . ........ 80 10.4 UserGivenStationaryPoint. ............. 81 10.5 Print Levels and Printing Utilities . ............... 82 10.6 Partially Separable Functions . ........... 83 10.7 Usage of routines from Optimization Toolbox 1.x . ............... 84 10.8 UsingMatlab5.0or5.1 ............................. ............. 84 10.9 UtilityTestRoutines................................ ............ 84 11 The tomGUI Graphical User Interface (GUI) 85 11.1 The Input Modes . ...... 88 11.2 General Parameter Mode . ........ 88 11.3 Solver Parameter Mode . ......... 90 11.4 PlotParameterMode ................................. .......... 91 3 12 The Menu Program tomMenu 93 13 The TOMLAB Routines - Detailed Descriptions 96 13.1TheTOMSolvers ...................................... ....... 96 13.1.1 clsSolve ............................................... 96 13.1.2 conSolve ............................................... 98 13.1.3 cutPlane ............................................... 101 13.1.4 DualSolve .............................................. 103 13.1.5 ego .................................................. 105 13.1.6 expSolve ............................................... 108 13.1.7 glbSolve ............................................... 110 13.1.8 glbFast ............................................... 112 13.1.9 glcSolve ............................................... 114 13.1.10 glcFast ................................................ 116 13.1.11 glcCluster .............................................. 119 13.1.12 infSolve ............................................... 121 13.1.13 lpSolve ............................................... 123 13.1.14 L1Solve ............................................... 125 13.1.15 mipSolve .............................................. 127 13.1.16 nlpSolve ............................................... 130 13.1.17 qpSolve ............................................... 132 13.1.18 rbfSolve ............................................... 134 13.1.19 slsSolve ............................................... 137 13.1.20 sTrustr ............................................... 139 13.1.21 itrr .................................................. 141 13.1.22 ucSolve ............................................... 142 13.1.23 pensdpTL .............................................. 144 13.1.24 penfeas sdp ............................................. 148 13.1.25 penbmiTL .............................................. 149 13.1.26 penfeas bmi ............................................. 154 13.1.27 pdcoTL ............................................... 156 13.1.28 pdscoTL ............................................... 159 13.2 Utility Functions in TOMLAB . .......... 162 13.2.1 tomRun ............................................... 162 13.2.2 cpTransf ............................................... 164 13.2.3 LineSearch ............................................. 165 13.2.4 intpol2 ................................................ 166 13.2.5 intpol3 ................................................ 166 13.2.6 preSolve ............................................... 167 13.2.7 PrintResult ............................................. 168 13.2.8 runtest ................................................ 169 13.2.9 SolverList .............................................. 170 4 13.2.10 systest ................................................ 171 14 TOMLAB LDO (Linear and Discrete Optimization) 172 14.1 Optimization Algorithms and Solvers in TOMLAB LDO . ............ 172 14.1.1 LinearProgramming............................... ......... 172 14.1.2 Transportation Programming . ............. 173 14.1.3 NetworkProgramming. .......... 173 14.1.4 Mixed-Integer Programming . ......... 174 14.1.5 DynamicProgramming . ......... 174 14.1.6 QuadraticProgramming. ......... 175 14.1.7 Lagrangian Relaxation . ............ 175 14.1.8 UtilityRoutines ................................. ......... 175 14.2 How to Solve Optimization Problems Using TOMLAB LDO . ........... 176 14.2.1 How to Solve Linear Programming Problems . .......... 176 14.2.2 How to Solve Transportation Programming Problems . .............. 177 14.2.3 How to Solve Network Programming Problems . ........... 177 14.2.4 How to Solve Integer Programming Problems . ........... 179 14.2.5 How to Solve Dynamic Programming Problems . ........... 180 14.2.6 How to Solve Lagrangian Relaxation Problems . ............. 180 14.3 Printing Utilities and Print Levels . ............... 182 14.4 Optimization Routines in TOMLAB LDO . ......... 183 14.4.1 akarmark .............................................. 183 14.4.2 balas ................................................. 184 14.4.3 dijkstra ............................................... 185 14.4.4 dpinvent ............................................... 186 14.4.5 dpknap ............................................... 187 14.4.6 karmark ............................................... 188 14.4.7 ksrelax ................................................ 189 14.4.8 labelcor ............................................... 190 14.4.9 lpdual ................................................ 191 14.4.10 lpkarma ............................................... 192 14.4.11 lpsimp1 ............................................... 193 14.4.12 lpsimp2 ............................................... 194 14.4.13 maxflow ............................................... 195 14.4.14 modlabel .............................................