Wolfram Library Archive

Courseware Demos MathSource Technical Notes
All Collections Articles Books Conference Proceedings
Title Downloads

Optimization Using Mathematica

M. Asghar Bhatti
Organization: The University of Iowa
Department: Department of Civil and Environmental Engineering

1998 Worldwide Mathematica Conference
Conference location

Chicago, IL

Optimization problems arise very naturally in many different disciplines. A structural engineer designing a multistory building must choose materials and proportions for different structural components in the building in order to have a safe structure that is as economical as possible. A portfolio manager for a large mutual fund company must choose investments that generate the largest possible rate of return for its investors while keeping the risk of major losses to acceptably low levels. A plant manager in a manufacturing facility must schedule the plant operations such that the plant produces products that maximize the company's revenues while meeting customer demands for different products and staying within available resource limitations. A scientist in a research laboratory may be interested in finding a mathematical function that best describes an observed physical phenomenon.

Over the last four decades or so, a large number of algorithms have been developed to solve these types of optimization problems. Most of these algorithms are natural for implementation within Mathematica. However, built-in support in Mathematica for solving optimization problems is limited and consists of following functions.

FindMinimum: solves a nonlinear unconstrained problems using a variety of methods, including conjugate gradient and BFGS quasi-Newton methods. ConstrainedMin and ConstrainedMax: These functions solve linear programming problems. All variables are restricted to be positive. LinearProgramming: Solves the same class of problems as the ConstrainedMin and the ConstrainedMax; however, the problem must be specified in the form of matrices of coefficients of linear functions. Currently there is no built-in support for solving nonlinearly constrained optimization problems. For teaching optimization, the built-in functions have another drawback in that they typically return only the optimum solution. Intermediate results cannot be seen to gain an understanding of the process. For the past several years the author has been working on developing Mathematica functions for optimization that overcome these limitations. A number of functions have been developed to solve quadratic programming problems and general nonlinear constrained optimization problems. In addition to supplementing Mathematica's built-in support for optimization, these functions optionally provide details of all intermediate results. In this way they can be used by students and others who are interested in the learning theory on which these algorithms are based. For small problems, functions have been developed for graphical solution and direct solution using optimality conditions. Several functions, duplicating the functionality of the built-in functions, have also been developed to meet this educational mission. The paper will demonstrate the use of these functions. Implementation of some of these algorithms will be discussed.

*Applied Mathematics > Optimization

steepest descent method, conjugate gradient, modified Newton's method, quasi-newton methods, primal affine scaling method, primal-dual interior point method, quadratic programming, active set method, penalty methods, sequential quadratic programming


Bhatti.sit (249.5 KB) - Macintosh Stuffit archive
Bhatti.zip (251.2 KB) - ZIP archive