WebCab Optimization for COM v2.6

MultiDimensionalSolver.Powell Method 

Seeks a local extremum of a general multi-dimensional function using Powell's direction set method.

public double[] Powell(
   ExtremumTypes extremumType,
   double[] initialPoint,
   double[,] initialDirections,
   BracketingAlgorithm bracketingAlgorithm,
   LocateAlgorithm locateAlgorithm,
   double minDistance,
   double bracketingParameter,
   double tolerance,
   int maxIterations,
   double fractionalTolerance
);

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.
initialDirections
A matrix whose columns contain the initial set of directions (usually the N unit vectors).
bracketingAlgorithm
The bracketing algorithm used within this method. For generic functions for which the derivative is not known you will need to use one of the two bracketing algorithms ParabolicBracketing or AccelBracketing. When deciding which of these two algorithms is more appropriate please see the remarks given above or the PDF documentation.
locateAlgorithm
The locate algorithm used within this method. For generic functions for which the derivative is not known you will need to use one of the following locate algorithms: LinearLocate, BrentLocate, ParabolicIterativeLocate, and ParabolicLocate. Please see the remarks given above or the PDF documentation for assistance in the selection of the most appropriate algorithm for your given problem.
minDistance
This parameter is required by all bracketing algorithms, and usually signifies the minimal distance between the end points of any bracketed interval in which the extremum lies. Therefore, the minDistance parameter should be approximately the same magnitude as tolerance parameter.
bracketingParameter
This parameter is required by some bracketing algorithms. For a detailed explanation as to its meaning and use for particular bracketing algorithms selected please see the documentation of the BracketingAlgorithm selected or the Mathematical Documentation chapter of the accompanying PDF documentation.
tolerance
The tolerance used when the exit condition of this iterative algorithm is checked. The smaller the tolerance used the more stable the convergence to the extremum within the iterative algorithm must be before the exit condition is trigger. Hence the smaller the tolerance generally the more accuracy the result, however it also has the draw back of making the algorithm more computationally demanding. A reasonable value to use for the tolerance is 0.1.
maxIterations
The maximum number of iterative steps taken before the algorithm exits and a TooManyMultiDimensionalIterationsException is thrown. A reasonable number to use for this parameter is 300.
fractionalTolerance
When the difference between the function values in two consecutive steps is less than fractionalTolerance, the point in the last step is considered a local extreme and returned. In most cases a reasonable value to take for this parameter is 0.0001, however if the object function in very oscillatory in a neighborhood of its extremum then a correspondingly larger value should be used.

Return Value

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

Remarks

This algorithm is a modification of Powell's algorithm as applied within Quadratic programing however the basic rationale of this approach is similar. That is, it has the ability to select good directions along which to the seek the extremum and hence is particular appropriate when the function being considered has long narrow valleys in which the other approach will tend to get stuck in.

When should this approach be used

When addressing general multi-dimensional problems you have the choice of selecting this method or the Simplex method of Nelder and Mead (see Nelder and Mead). The advantage of this approach is that it has the ability to choose good initial directions in which to search for an extremum. This ability to select good directions means that problems such as getting stuck in long valleys of the object function are mitigated. It also means that this algorithm is almost surely faster than the Simplex method used in Nelder and Mead. However, it should be pointed out that this approach in general is more difficult and time consuming to set up and get running.

Exiting Conditions

After this algorithm has be run it will exit when one of the following two conditions has been satisfied:

  1. Extremum found to the given level of tolerance set within the algorithm.
  2. Maximum number of Iterations reached: If maxIterations is exceeded, then TooManyMultiDimensionalIterationsException is thrown resulting in the algorithm exiting.
Either way the algorithm is certain to exit. If the algorithm exits because the number of iterations has been exceeded then you have the option to re-run the algorithm with either a large number of iterations allowed and/or a higher level of tolerance allow.

Exceptions

Exception TypeCondition
TooManyMultiDimensionalIterationsExceptionThrown if a number of steps greater than maxIterations is necessary in order to obtain the desired tolerance.
InvalidMultiDimensionalFunctionExceptionThrown if the user function returns invalid values like infinity or NaN.
MultiDimensionalExceptionThrown if the delivered function does not implement MultiDimensionalFunction, or an interface which extends MultiDimensionalFunction.

See Also

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