WebCab Optimization for COM v2.6

MultiDimensionalSolver.NelderMead Method 

Uses the downhill simplex method of Nelder and Mead to find a local extremum (i.e. minimum or maximum) of a generic multidimensional function.

public double[] NelderMead(
   ExtremumTypes extremumType,
   double[] initialPoint,
   double tolerance
);

Parameters

extremumType
Indicates the type of extreme searched: in the case of a minimum, extremumType == ExtremumTypes.MINIMUM; and in the case of a maximum, extremumType == ExtremumTypes.MAXIMUM.
initialPoint
The initial point about which the iterative optimization procedure starts. The initial point is given as an array where the n-th term of the array corresponds to the value of the n coordinate value.
tolerance
An internal algorithm parameter known as a fractional convergence tolerance which is used within the termination condition. The smaller the tolerance given the more iteratives of algorithm will be performed, which can lead to the exception TooManyMultiDimensionalIterationsException being thrown. If this happens you should increase the value of the tolerance and re-run the algorithm. A reasonable value to take from this parameters is 0.01.

Return Value

the point (i.e an N-dimensional vector) where the object function has a local extremum.

Remarks

When to use this approach

When addressing general multi-dimensional problems you have the choice of selecting this method or Powell's direction set method (see Powell's method). If your aim is to `get something working quickly' then you should use this simplex method. The simplex method make no requirements on the function in fact it is possible to consider even non-continuous functions. However, partly because of its generality it is not particularly efficient in terms of the number of function evaluations required in order to achieve a given level of accuracy. It is also important to point out that though this method can be very slow and is in a sense simple, it can also be very robust.

Applying this method

Before you call this method you are required to set the object function of the optimization problem using SetFunction. Please see the documentation of SetFunction or the programmers guide within the PDF documentation for more details on exactly how to set the function. Once the object function has been set all that means to be done to to select an initial points from which the iterative search for the extremum will begin and the tolerance which will determine the exit condition for the search algorithm.

Exceptions

Exception TypeCondition
TooManyMultiDimensionalIterationsExceptionThrown if the user function returns invalid values like infinity or NaN.
MultiDimensionalExceptionThrown if the delivered function does not implement {@lnik MultiDimensionalFunction}, or an interface which extends MultiDimensionalFunction.

See Also

MultiDimensionalSolver Class | WebCab.COM.Math.Optimization.MultiDimensional Namespace