Tomlab User's Guide the Tomlab Manual
Total Page:16
File Type:pdf, Size:1020Kb
Tomlab User's Guide The Tomlab Manual PDF generated using the open source mwlib toolkit. See http://code.pediapress.com/ for more information. PDF generated at: Sun, 22 Jan 2012 18:37:11 UTC Contents Articles TOMLAB 1 TOMLAB Overall Design 5 TOMLAB Problem Types and Solver Routines 11 TOMLAB Defining Problems in TOMLAB 22 TOMLAB Solving Linear Quadratic and Integer Programming Problems 39 TOMLAB Solving Unconstrained and Constrained Optimization Problems 48 TOMLAB Solving Global Optimization Problems 58 TOMLAB Solving Least Squares and Parameter Estimation Problems 62 TOMLAB Multi Layer Optimization 71 TOMLAB TomHelp 72 ClsSolve 72 ConSolve 76 CutPlane 79 DualSolve 81 ExpSolve 83 GlbDirect 85 GlbSolve 88 GlcCluster 90 GlcDirect 92 GlcSolve 97 InfLinSolve 101 InfSolve 102 LinRatSolve 104 LpSimplex 105 L1Solve 107 MilpSolve 109 MinlpSolve 116 MipSolve 120 MultiMin 123 MultiMINLP 125 NlpSolve 128 PdcoTL 130 PdscoTL 133 QpSolve 135 SlsSolve 137 STrustr 139 Tfmin 141 Tfzero 142 UcSolve 143 TOMLAB Utility Functions 146 TomRun 148 AddPwLinFun 149 Binbin2lin 151 Bincont2lin 152 CheckFuncs 153 CheckDerivs 154 CpTransf 155 EstBestHessian 156 Lls2qp 157 LineSearch 158 PreSolve 160 PrintResult 161 Runtest 162 SolverList 163 StatLS 164 Systest 165 TOMLAB Approximation of Derivatives 165 TOMLAB Special Notes and Features 173 TOMLAB Appendix A 179 TOMLAB Appendix B 189 TOMLAB Appendix C 193 TOMLAB Appendix D 198 TOMLAB Appendix E 201 TOMLAB Appendix F 206 TOMLAB Appendix G 207 References Article Sources and Contributors 214 TOMLAB 1 TOMLAB TOMLAB is a general purpose development, modeling and optimal control environment in Matlab for research, teaching and practical solution of optimization problems. TOMLAB has grown out of the need for advanced, robust and reliable tools to be used in the development of algorithms and software for the solution of many different types of applied optimization problems. There are many good tools available in the area of numerical analysis, operations research and optimization, but because of the different languages and systems, as well as a lack of standardization, it is a time consuming and complicated task to use these tools. Often one has to rewrite the problem formulation, rewrite the function specifications, or make some new interface routine to make everything work. Therefore the first obvious and basic design principle in TOMLAB is: Define your problem once, run all available solvers. The system takes care of all interface problems, whether between languages or due to different demands on the problem specification. In the process of optimization one sometimes wants to graphically view the problem and the solution process, especially for ill-conditioned nonlinear problems. Sometimes it is not clear what solver is best for the particular type of problem and tests on different solvers can be of use. In teaching one wants to view the details of the algorithms and look more carefully at the different algorithmic steps. When developing new algorithms tests on thousands of problems are necessary to fully access the pros and cons of the new algorithm. One might want to solve a practical problem very many times, with slightly different conditions for the run. Or solve a control problem looping in real-time and solving the optimization problem each time slot. All these issues and many more are addressed with the TOMLAB optimization environment. TOMLAB gives easy access to a large set of standard test problems, optimization solvers and utilities. Overall Design Overall Design presents the general design of TOMLAB. • Overall Design Problem Types and Solver Routines Contains strict mathematical definitions of the optimization problem types. All solver routines available in TOMLAB are described. • Problem Types and Solver Routines Defining Problems in TOMLAB • Defining Problems in TOMLAB Solving Linear, Quadratic and Integer Programming Problems Contains examples on the process of defining problems and solving them. All test examples are available as part of the TOMLAB distribution. • Solving Linear, Quadratic and Integer Programming Problems Solving Unconstrained and Constrained Optimization Problems Contains examples on the process of defining problems and solving them. All test examples are available as part of the TOMLAB distribution. TOMLAB 2 • Solving Unconstrained and Constrained Optimization Problems Solving Global Optimization Problems Contains examples on the process of defining problems and solving them. All test examples are available as part of the TOMLAB distribution. • Solving Global Optimization Problems Solving Least Squares and Parameter Estimation Problems Contains examples on the process of defining problems and solving them. All test examples are available as part of the TOMLAB distribution. • Solving Least Squares and Parameter Estimation Problems Multi Layer Optimization Shows how to setup and define multi layer optimization problems in TOMLAB. • Multi Layer Optimization Tomhelp - The Help Program Contains detailed descriptions of many of the functions in TOMLAB. The TOM solvers, originally developed by the Applied Optimization and Modeling (TOM) group, are described together with TOMLAB driver routine and utility functions. Other solvers, like the Stanford Optimization Laboratory (SOL) solvers are not described, but documentation is available for each solver. • Tomhelp - The Help Program TOMLAB Solver Reference • TOMLAB Solver Reference TOMLAB Utility Functions Describes the utility functions that can be used, for example tomRun and SolverList. • TOMLAB Utility Functions Approximation of Derivatives Introduces the different options for derivatives, automatic differentiation. • Approximation of Derivatives TOMLAB 3 Special Notes and Features Discusses a number of special system features such as partially separable functions and user supplied parameter information for the function computations. • Special Notes and Features Appendix A: Prob - the Input Problem Structure Contains tables describing all elements defined in the problem structure. Some subfields are either empty, or filled with information if the particular type of optimization problem is defined. To be able to set different parameter options for the optimization solution, and change problem dependent information, the user should consult the tables in this Appendix. • Appendix A: Prob - the Input Problem Structure Appendix B: Result - the Output Result Structure Contains tables describing all elements defined in the output result structure returned from all solvers and driver routines. • Appendix B: Result - the Output Result Structure Appendix C: TomSym - the Modeling Engine • Appendix C: TomSym - the Modeling Engine Appendix D: Global Variables and Recursive Calls This section is concerned with the global variables used in TOMLAB and routines for handling important global variables enabling recursive calls of any depth. • Appendix D: Global Variables and Recursive Calls Appendix E: External Interfaces Describes the available set of interfaces to other optimization software, such as CUTE, AMPL, and The Mathworks' Optimization Toolbox. • Appendix E: External Interfaces Appendix F: Motivation and Background to TOMLAB Gives some motivation for the development of TOMLAB. • Appendix F: Motivation and Background to TOMLAB TOMLAB 4 Appendix G: Performance Tests on Linear Programming Solvers • Appendix G: Performance Tests on Linear Programming Solvers Further Reading TOMLAB has been discussed in several papers and at several conferences. The main paper on TOMLAB v1.0 is [1] . The use of TOMLAB for nonlinear programming and parameter estimation is presented in [2] , and the use of linear and discrete optimization is discussed in [3] . Global optimization routines are also implemented, one is described in [4] . In all these papers TOMLAB was divided into two toolboxes, the NLPLIB TB and the OPERA TB. TOMLAB v2.0 was discussed in [5] [6] . and [7] . TOMLAB v4.0 and how to solve practical optimization problems with TOMLAB is discussed in [8] . The use of TOMLAB for costly global optimization with industrial applications is discussed in [9] ; costly global optimization with financial applications in [10] [11] [12] . Applications of global optimization for robust control is presented in [13] [14] . The use of TOMLAB for exponential fitting and nonlinear parameter estimation are discussed in e.g. [15] [16] [17] [18] [19] [20] . The manuals for the add-on solver packages are also recommended reading material. References [1] K. Holmström. The TOMLAB Optimization Environment in Matlab. Advanced Modeling and Optimization, 1(1):47-69, 1999. [2] K. Holmström and M. Björkman. The TOMLAB NLPLIB Toolbox for Nonlinear Programming. Advanced Modeling and Optimization, 1(1):70-86, 1999. [3] K. Holmström, M. Björkman, and E. Dotzauer. The TOMLAB OPERA Toolbox for Linear and Discrete Optimization. Advanced Modeling and Optimization, 1(2):1-8, 1999. [4] M. Björkman and K. Holmström. Global Optimization Using the DIRECT Algorithm in Matlab. Advanced Modeling and Optimization, 1(2):17-37, 1999. [5] K. Holmström. The TOMLAB v2.0 Optimization Environment. In E. Dotzauer, M. Björkman, and K. Holmstöm, editors, Sixth Meeting of the Nordic Section of the Mathematical Programming Society. Proceedings, Opuscula 49, ISSN 1400-5468, Västerås, 1999. Mälardalen University, Sweden. [6] K. Holmström. New Optimization Algorithms and Software. Theory of Stochastic Processes, 5(21)(1-2):55-63, 1999. [7] K. Holmström. Solving applied optimization problems using TOMLAB. In