Multi-dimensional Optimization - Function of Four Variables

 

This page contains a utility that attempts to compute the minimum value of a function of four variables.

References:

The utility posted on this page is a JavaScript translation of the FORTRAN routine UNCMND, by Stephen Nash, which is posted on the NIST site as UNCMND.

From the book "Numerical Methods and Software"
D. Kahaner, C. Moler, and S. Nash
Prentice Hall, 1988

Although all care has been taken to ensure that the sub-routines were translated accurately, some errors may have crept into the translation. These errors are mine; the original FORTRAN routines have been thoroughly tested and work properly. Please report any errors to the webmaster.


The program posted on this page seeks a minimum of the Function, F(w, x, y, z), where F is the following function:

F = A w2 + B x2 + C y2 + D z2 +
        E w + F x + G y + H z +
        I wx + J wy + K xy + L yz +
        M xz + N wz +
        O x2y + P x2z +
        Q x y2 + R y2z +
        S x z2 + T yz2

Values for all of these coefficients may not be necessary--in which case, make sure there is a "0" in the unused fields--but, by providing many fields, the intention is to make this program applicable to a wider range of problems.

Optimization in the present context refers to the minimization or maximization of a function. In practice, most programs are designed to seek a minimum of a function, but these programs are equally effective for seeking a maximum of a function because the task of maximizing a function, F, is the same as minimizing -F. In other words, if the goal is to find the largest value of F, multiply the coefficients by -1 before inputting them into the data fields below.


HOW TO USE THIS UTILITY

Enter the appropriate values for the coefficients in the data fields below.
Also enter an initial estimate for the solution vector xo   =   (wo, xo, yo, zo)T.
(Note that numbers in scientific notation are NOT recognized)

Once you click the "Minimize" button, this utility will seek the solution vector x   =   (w, x, y, z)T that minimize the function F. This vector, and the value of F at that point, are output--if a minimum can be found.

IMPORTANT!    Note the error code.
There are functions for which a solution cannot be found. In these cases, the program terminates without finding a solution.

A B C D
E F G H
I J K L
M N O P
Q R S T
 
 
wo xo yo zo
 
   
Error Codes:
Error Code = 1: Terminated with gradient small, x is probably optimal.
Error Code = 2: Terminated with stepsize small, x is probably optimal.
Error Code = 3: Lower point cannot be found, x is probably optimal.
Error Code = 4: Iteration limit (150) exceeded.
Error Code = 5: Too many large steps, function may be unbounded.
   

 

For more information about this program, please see the associated blog post: Multi-dimensional Optimization Routine1

Return to Math Functions Page

AKiTi.ca Home