Optimization

Download unconstrained minimization routine.

Download constrained minimization routine.

Definitions

Optimization: Finding the maximum or minimum of a function f

Function f can be a function of a single variable, e.g., f = f(x) in one-dimensional optimization problems. In multidimensional problems f = f(x1,x2,...,xn).

Some optimization problems are posed with constraints, such as

All algorithms for optimization begin with a starting guess and the guess is updated/improved to obtain the final solution. The most frequently used algorithms are- (i)Conjugate gradient method, (ii) Newton's method, and (iii) Marquadt's method.

In the figure below, a typical one-dimensional problem is shown, schematically.

The distinction between global min/max from local min/max can be a very difficult problem. One method of distinction is to find the max/min based on a widely varying starting guesses and from the set of solutions that are obtained, select the largest/smallest of these as the global solution.

Warning: For large multi-dimensional problems, there may be no practical way to ensure that you have located a global optimum.

Non-linear Constrained Optimization

The procedure for setting up an optimization problem on Excel is shown in the two diagrams, below. The built-in "Solver" program is used. You will find the "Solver" in the tools menu of Excel.

Run the Excel Solver with a number of trial starting guesses and ensure, as best as you can, that you have reached the global optimum.





Excel Sheets showing three examples of optimization.