WebCab Optimization
v2.6
(J2EE Edition)

com.webcab.ejb.math.optimization.unidimensional
Interface UniDimensionalSolver

All Superinterfaces:
EJBObject, Remote

public interface UniDimensionalSolver
extends EJBObject

The UniDimensionalSolver Enterprise JavaBean offers methods for finding the location of the extremum (i.e. minimum or maximum) of a function of one real variable. That is, we offer procedures for finding the extremum of a function defined over a one dimensional real space (i.e. the real line) with or without upper and lower bounds.

Application of Enterprise JavaBean

Each of the procedures provided within this Enterprise JavaBean proceeds by first being passed the object function of the optimization problem for which the location of the extremum is to be found. We then call one of the optimization procedures giving various parameters used to define procedure specific information such as the tolerance used and in the case of constrained optimization the constraints which must be satisfied. In most instances we are also required to provide an initial point from where the given optimization procedure will start it iterative search of the (local or global) extremum.

Overview of the Optimization

The aim of the theory of optimization is to find the location of the extremum (i.e. maximum or minimum) of a (possibly constrained) function defined over one or more (real) dimensions. An extremum point can be either local or global. A local extremum is a point such that the object function is known to obtain its highest (in the case of maximization) or lowest (in the case of minimization) value within a given sub-region of the entire domain over which the optimization problem is considered. A global extremum is the point at which the (object) function takes it maximum or minimum value over the entire domain for which the optimization problem is considered. Here we offer procedures which are designed for finding both the local and global extremum.

Selecting an Algorithm for your problem

You should select an optimization procedure to use in accordance with the properties of the optimization problem you are considering. For the unidimensional case there are two approaches to selecting the particular algorithm to use, as described below:

Problem Based Approach

This approach focuses on the properties of the problem at hand. In particular, we take into account the following criteria when selecting the particular optimization procedure to use:

  1. Object Function - Nature of the object function namely whether it is linear, continuous or continuously differentiable over the domain for which the optimization problem is considered.
  2. Constraints - Whether the object function is constrained to satisfy upper and lower bounds.
  3. Local or Global - Whether a local or global extremum is sought.

By using this information and taking into account your particular applications needs you will able to select the most appropriate procedure to use.

Method Based Approach

It is also true that in the unidimensional optimization case the algorithms can be roughly broken down into the following three categories:

  1. Quick Algorithms to find Local Extremum.
  2. Slower but more precise Algorithms of finding the Local Extremum.
  3. Algorithms for finding the global extremum on a finite interval of the real line.

Apart from categorizing your problem within one of these three criteria the only other information required in the selection of an approach is whether the object function of your optimization problem is differentiable or not, and in the case of the second and third categories whether you wish to select the set of bracketing and locate algorithms which is used within the procedure.

Using Algorithms with pre-set Bracketing and Locate Algorithms

Unless you particular wish to fine tune the optimization algorithms for your given problem at hand we strongly advise that when wishing to find the local or global extremum over an interval that the algorithms with a preset default set of bracketing and locate algorithms are used. The algorithms with these preset internal algorithms are as follows:

  1. Slower but more precise Algorithms for finding the Local Extremum:
    1. For General Functions: seekNextExtreme
    2. For Differentiable Functions: seekNextExtremeDeriv
  2. Algorithms for finding the global extremum on a finite interval of the real line:
    1. For General Functions: globalExtreme
    2. For Differentiable Functions: globalExtremeDeriv

Remark: The function used within an optimization problem must be provided using setFunction, which takes as a parameters an instance of a class which implements one of the UniDimensionalFunction sub-interfaces. When we refer to a function being general we refer to the fact that only the getValueAt method, giving the functions value at a points has been implemented. By differentiable function we refer to the fact that in addition to the implementation of this method you have also implemented Derivative.getDerivativeAt(double).

Using Algorithms with user selected Bracketing and Locate Algorithms

To offer the greatest power and flexibility we provide methods which allow the Bracketing and Locate algorithms used within the optimization procedures to be selected and configured. This allows the algorithm to be finely tuned to find the exact requirements of your problem at hand and the level of precision and robustness required. We offer the following four procedures, two for finding the local extremum and two for finding the global extremum:

  1. Slower but more precise Algorithms for finding the Local Extremum.
    1. For General Functions: seekNextExtreme
    2. For Differentiable Functions: seekNextExtremeDeriv
  2. Algorithms for finding the global extremum on a finite interval of the real line.
    1. For General Functions: globalExtreme
    2. For Differentiable Functions: globalExtremeDeriv

Using "Quick Algorithms for finding Local Extremum"

For those who require speed at the expense of precision we offer the following methods for finding the local extremum of a general function which are not even necessarily continuous.

  1. seekExtremeValueUnidir - Finds the value of the unidimensional object function at a local extremum (maximum or minimum) found, where the specific bracketing and locate algorithms from the Enterprise JavaBeans BracketingAlgorithm and LocateAlgorithm are set and the initial point given.
  2. seekExtremeUnidir - Evaluates the location of a (local) extremum (maximum or minimum) of a unidimensional object function and returns the type Extremum which contains the coordinate value of the extremum sought of the type of extremum found (i.e. whether maximum or minimum).
  3. seekExtremeBidir - Evaluates the location of a local minimum of a unidimensional function with a iterative search started in two directions, when the bracketing and locate algorithms and initial point are given.

For all three of these methods the specific bracketing and locate algorithms used within the algorithm must be selected (i.e. given via a parameter) from the Enterprise JavaBean's BracketingAlgorithm and LocateAlgorithm.

Selecting the Bracketing and Locate Algorithms by Trial and Error

A very effective means by which to select the optimal Bracketing and Locate algorithm combination for your particular problem, is to just try the 16 combinations of algorithms and then compare the results found. To assist (and demonstrate) this approach we provide within this package client examples which solve various unidimensional optimization problems using the various combinations of Bracketing and Locate algorithms. By adopting these examples (i.e. set your function rather than use the preset object function) you will be able to select the optimal bracketing and locate algorithm combination for your particular optimization problem but just comparing the results given by the various algorithms.

Further Remarks on Unidimensional Optimization Problems

Constrained Optimization

For unidimensional optimization problems the constraints can only take very simple forms, for example lowerBound ≤ x ≤ upperBound, where lowerBound, upperBound are two given real numbers. Therefore we are able to offer a number of refined algorithms to deal with the unidimensional constrained case, two such examples are globalExtremeDeriv, and globalExtreme.

Continuous and Differentiable Object Functions

As mentioned above the algorithms implemented within this Enterprise JavaBean work most efficiently when the functions are `well behaved'. Generally speaking what we mean by `well behaved' is that the smoother the function, the more `well behaved' the function is. This is important to our study here since generally the more `well behaved' a function the more efficient and stable the optimization algorithms contained within this Enterprise JavaBean will be when applied to the given function at hand. This principle is true for both general or differentiable functions.

The reason for this is that the `greedy type' algorithms implemented here have as a basis that at each iterative step we move to the extremum point within a given neighborhood lying in one of a number of chosen directions. Such `greedy type' or calculus inspired arguments work increasingly more effectively as the function on which they are applied gets smoother.

Remark: In practice, the requirement that the majority of the procedures within this Enterprise JavaBean require that the object function is continuous or even differentiable is not a restriction with most practical applications. The reason being that processes generated from real world systems such as economic systems will result in the study of object functions which are in nearly all cases are continuous and even differentiable.

Object Functions which take NaN values

It is also important to point out that though we may consider non-continuous functions with some of the algorithms these functions must never return a NaN (Not a number). In order to guarantee this we must ensure that for all points within the domain over which the optimization problem is considered the object function does not return such as value. If such an value is returned, the algorithms will exit and throw an InvalidUniDimensionalFunctionException exception. If this exception is thrown, you will then be able to call methods within the Exception class which provide the coordinate value of the point where the function evaluates to a Double.NaN. By modifying your given function at points where it returns a NaN you should be able to modify the object function of the optimization problem so that the essential features of the underlying problem are preserved but the optimization algorithm can be successfully applied.

Local and Global Extremum

The local extremum (i.e. minimum or maximum) is just the extremum in a neighborhood of a point, where the global extremum is the extremum on the whole domain over which the optimization problem is considered. In practice it is generally the global extremum which is desired and for constrained optimization problems (i.e. with an upper and lower bound) we provide effective algorithms which treat this case, namely:

  1. For General Functions: globalExtreme(ExtremumTypes, double, double, int, double, int)
  2. For Differentiable Functions: globalExtremeDeriv(ExtremumTypes, double, double, int, double, int)

For unconstrained optimization problems since you can never be certain that the local extremum is in fact the global extremum. There are no iterative algorithms which are effective at finding the global extremum of a unconstrained problem.

UniDimensionalException and setting the Object Function

The UniDimensionalException is thrown if a function is not set and one of the optimization solver algorithms is called. If the algorithm requires a differential object function and a differentiable function has not been set then a UniDimensionalException will be thrown. For details concerning the implementation and the setting of a function please see the documentation of setFunction.

Detailed Overview of Uni-Dimensional Algorithms Available

Quick Algorithms for Local Uni-Dimensional Optimization

  1. seekExtremeValueUnidir - Finds the location of the (local) extremum (maximum or minimum) of the unidimensional function, where the specific bracketing and locate algorithm from the Enterprise JavaBean's BracketingAlgorithm and LocateAlgorithm used by the algorithm must be selected.
  2. seekExtremeUnidir - Evaluates the value of the unidimensional object function at the (local) extremum (maximum or minimum), where the specific bracketing and locate algorithm from the Enterprise JavaBean's BracketingAlgorithm and LocateAlgorithm used by the algorithm must be selected.
  3. seekExtremeBidir - Seeks a local minimum of the unidimensional function, where the specific bracketing and locate algorithm from the Enterprise JavaBean's BracketingAlgorithm and LocateAlgorithm used by the algorithm must be selected.

More Precise (but slower) Algorithms for Local Uni-Dimensional Optimization

  1. seekNextExtreme(ExtremumTypes, double, double, int) - Seek local minimum for a general function using a default set of Bracketing and Locate algorithms.
  2. seekNextExtreme(ExtremumTypes, double, double, BracketingAlgorithm[], LocateAlgorithm[], int) - Same as above but you are able to select the set of Bracketing and Locate algorithms used.
  3. seekNextExtremeDeriv(ExtremumTypes, double, double, int) - Seeks local minimum of a unidimensional differentiable function using a default set of Bracketing and Locate algorithms.
  4. seekNextExtremeDeriv(ExtremumTypes, double, double, BracketingAlgorithm[], LocateAlgorithm[], int) - Same as above but you are able to select the set of Bracketing and Locate algorithms used.

Algorithms for Global Uni-Dimensional Optimization

  1. globalExtreme(ExtremumTypes, double, double, int, double, int) - Seek global extremum within an interval of the real line for a general unidimensional function.
  2. globalExtreme(ExtremumTypes, double, double, int, double, BracketingAlgorithm[], LocateAlgorithm[], int) - Same as above except you are able to select set of the Locate and Bracketing algorithms used.
  3. globalExtremeDeriv(ExtremumTypes, double, double, int, double, int) - Seeks the global extremum within the real line of differentiable unidimensional function, using a default set of Bracketing and Locate algorithms.
  4. globalExtremeDeriv(ExtremumTypes,double,double,int,double,BracketingAlgorithm[],LocateAlgorithm[],int) - Same as above but you are able to select the set of Bracketing and Locate algorithms used.


Method Summary
 double globalExtreme(ExtremumTypes extremumType, double lowerBound, double upperBound, int noSubIntervals, double tolerance, BracketingAlgorithm[] bracketingAlgorithm, LocateAlgorithm[] locateAlgorithm, int maxIterations)
          Seeks the global extreme within an interval of an unidimensional optimization problem with a general object function using information from a user selected set of locate and bracketing algorithms.
 double globalExtreme(ExtremumTypes extremumType, double lowerBound, double upperBound, int noSubIntervals, double tolerance, int maxIterations)
          Seeks the global extreme within an interval of an unidimensional optimization problem with a general object function using information from a default set of locate and bracketing algorithms.
 double globalExtremeDeriv(ExtremumTypes extremumType, double lowerBound, double upperBound, int noSubIntervals, double tolerance, BracketingAlgorithm[] bracketingAlgorithm, LocateAlgorithm[] locateAlgorithm, int maxIterations)
          Seeks the global extreme within an interval of an unidimensional optimization problem with a differentiable object function using information from a user selected set of locate and bracketing algorithms.
 double globalExtremeDeriv(ExtremumTypes extremumType, double lowerBound, double upperBound, int noSubIntervals, double tolerance, int maxIterations)
          Seeks the global extreme within an interval of an unidimensional optimization problem with a differentiable object function using information from a default set of locate and bracketing algorithms.
 double seekExtremeBidir(double initialPoint, BracketingAlgorithm bracketingAlgorithm, LocateAlgorithm locateAlgorithm, double minDistance, double bracketingParameter, double tolerance, int maxIterations)
          Seeks a location of a (local) minimum of a unidimensional object function using user selected bracketing and locate algorithms from BracketingAlgorithm and LocateAlgorithm respectively and starting the iterative search in two directions from a given initial point.
 Extremum seekExtremeUnidir(double initialPoint, BracketingAlgorithm bracketingAlgorithm, LocateAlgorithm locateAlgorithm, double minDistance, double bracketingParameter, double tolerance, int maxIterations)
          Evaluates the location of a (local) extremum (i.e. maximum or minimum) of the unidimensional object function, where the specific bracketing and locate algorithms from the Enterprise JavaBeans BracketingAlgorithm and LocateAlgorithm are set and the initial point given.
 double seekExtremeValueUnidir(double initialPoint, BracketingAlgorithm bracketingAlgorithm, LocateAlgorithm locateAlgorithm, double minDistance, double bracketingParameter, double tolerance, int maxIterations)
          Finds the value of the unidimensional object function at the local extremum (maximum or minimum) found, where the specific bracketing and locate algorithms from the Enterprise JavaBean's BracketingAlgorithm and LocateAlgorithm are set and the initial point given.
 double seekNextExtreme(ExtremumTypes extremumType, double initialPoint, double tolerance, BracketingAlgorithm[] bracketingAlgorithm, LocateAlgorithm[] locateAlgorithm, int maxIterations)
          Seeks the closest local extremum to a given initialPoint for the unidimensional object function using information from a user selected set of bracketing and location algorithms.
 double seekNextExtreme(ExtremumTypes extremumType, double initialPoint, double tolerance, int maxIterations)
          Seeks the closest local extremum to a given initialPoint for the unidimensional object function using information from a default set of bracketing and location algorithms.
 double seekNextExtremeDeriv(ExtremumTypes extremumType, double initialPoint, double tolerance, BracketingAlgorithm[] bracketingAlgorithm, LocateAlgorithm[] locateAlgorithm, int maxIterations)
          Seeks the closest local extremum to a given initialPoint for the unidimensional differentiable object function using information from a user selected set of bracketing and location algorithms.
 double seekNextExtremeDeriv(ExtremumTypes extremumType, double initialPoint, double tolerance, int maxIterations)
          Seeks the closest local extremum to a given initialPoint for the unidimensional differentiable object function using information from a default set of bracketing and location algorithms.
 void setFunction(FunctionDelivery deliveryOfUniDimensionalFunction)
          Submits a new uni-dimensional function for which the location of the extremum is to be found.
 
Methods inherited from interface javax.ejb.EJBObject
getEJBHome, getHandle, getPrimaryKey, isIdentical, remove
 

Method Detail

setFunction

public void setFunction(FunctionDelivery deliveryOfUniDimensionalFunction)
                 throws FunctionDeliveryException,
                        RemoteException
Submits a new uni-dimensional function for which the location of the extremum is to be found. The current function (if any) will be discarded.

Providing an Implementation of the Function

In order to provide a function which is to be used within the algorithms contained within this Enterprise JavaBean you are required to implement one of the following interfaces:

  1. UniDimensionalFunction - For unidimensional functions which are either not differentiable or for which the differentiable is not known.
  2. Derivative - For unidimensional functions which are differentiable and the differential is known. Note that the Derivative interface inherits from the UniDimensionalFunction interface.

For further explicit details concerning how these interfaces are implemented (including source code) see the documentation for the Enterprise JavaBeans UniDimensionalFunction and Derivative.

Parameters:
deliveryOfUniDimensionalFunction - References an instance of a class which implements the function through the use of the UniDimensionalFunction and Derivative interfaces.
FunctionDeliveryException
RemoteException

seekExtremeValueUnidir

public double seekExtremeValueUnidir(double initialPoint,
                                     BracketingAlgorithm bracketingAlgorithm,
                                     LocateAlgorithm locateAlgorithm,
                                     double minDistance,
                                     double bracketingParameter,
                                     double tolerance,
                                     int maxIterations)
                              throws TooManyUniDimensionalIterationsException,
                                     InvalidUniDimensionalFunctionException,
                                     UniDimensionalException,
                                     RemoteException
Finds the value of the unidimensional object function at the local extremum (maximum or minimum) found, where the specific bracketing and locate algorithms from the Enterprise JavaBean's BracketingAlgorithm and LocateAlgorithm are set and the initial point given. In order to find the location of the extremum you may use seekExtremeUnidir, which applied the same algorithm except returns the location of the extremum rather than the value of the object function at a extremum.

Application of this Approach

Once the object function has been set you should specify the specific bracketing and locate algorithms which are used within this method, by passing as parameters the appropriate procedure from the Enterprise JavaBeans BracketingAlgorithm and LocateAlgorithm.

The iterative search will begin from the point initialPoint, with the accuracy of the result depending on the algorithms chosen and the algorithms settings corresponding to the last four parameters. The last four parameters do not have a general interpretation but there exact meaning and use should become clear once the bracketing and location algorithms are chosen and we refer the read to the corresponding documentation of the Enterprise JavaBeans BracketingAlgorithm and LocateAlgorithm, or the Mathematical Documentation chapter of the PDF documentation for further details.

Parameters:
initialPoint - the initial point for which the iterative search from the extremum is started from.
bracketingAlgorithm - the bracketing algorithm used selected from the Enterprise JavaBean BracketingAlgorithm.
locateAlgorithm - the locate algorithm used selected from the Enterprise JavaBean LocateAlgorithm.
minDistance - this parameter is required by all bracketing algorithms within BracketingAlgorithm, and usually signifies the minimal distance between the end points of any bracketed interval in which the extremum lies. Therefore, the value used here should be approximately as large as the 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 BracketingAlgorithm documentation or the Mathematical Documentation chapter of the accompanying PDF documentation.
tolerance - the tolerance used within the exit condition of the iterative locate algorithm used. A reasonable value to take for the tolerance is 1E-5.
maxIterations - the maximum number of iterations used only in the iterative locate algorithms, in such cases a reasonable value to use is 300. If the number of iterations exceeds this number TooManyUniDimensionalIterationsException will be thrown.
Returns:
the value of the object function at the (local) extremum found.
Throws:
TooManyUniDimensionalIterationsException - thrown if the exit criteria of the locate algorithm was not triggered and hence the (local) extremum found after maxIterations iterations.
InvalidUniDimensionalFunctionException - thrown if the object function given returns invalid values, such as NaN.
UniDimensionalException - thrown if algorithms selected require a differentiable function but one has not been set, or if the no function has been set. In particular, in the case of a differentiable function the Derivative interface will need to be implemented and in the case of a general function the Function interface will need to be implemented.
RemoteException
See Also:
applies the same algorithm for the corresponds bracketing and locate algorithms except that here the {@link Extremum} type is returned which encapsulates the type of the extremum found (i.e. maximum or minimum) and the coordinate value of the object function at the extremum found., seekExtremeBidir(double, com.webcab.ejb.math.optimization.unidimensional.BracketingAlgorithm, com.webcab.ejb.math.optimization.unidimensional.LocateAlgorithm, double, double, double, int)

seekExtremeUnidir

public Extremum seekExtremeUnidir(double initialPoint,
                                  BracketingAlgorithm bracketingAlgorithm,
                                  LocateAlgorithm locateAlgorithm,
                                  double minDistance,
                                  double bracketingParameter,
                                  double tolerance,
                                  int maxIterations)
                           throws TooManyUniDimensionalIterationsException,
                                  InvalidUniDimensionalFunctionException,
                                  UniDimensionalException,
                                  RemoteException
Evaluates the location of a (local) extremum (i.e. maximum or minimum) of the unidimensional object function, where the specific bracketing and locate algorithms from the Enterprise JavaBeans BracketingAlgorithm and LocateAlgorithm are set and the initial point given. This method returns the type Extremum which contains the coordinate value of the extremum sought of the type of extremum found (i.e. whether maximum or minimum). In order to find the value of the object function at the extremum found you may use seekExtremeValueUnidir, which applied the same algorithm except but returns the value of the object function at the extremum rather than the coordinate value of the extremum found.

Remark: This approach in general will yield less precise results than seekExtremeBidir(double, com.webcab.ejb.math.optimization.unidimensional.BracketingAlgorithm, com.webcab.ejb.math.optimization.unidimensional.LocateAlgorithm, double, double, double, int), for corresponding choices of the locate and bracketing algorithms, but will also also be faster by a factor of two.

Application of this Approach

Once the object function has been set you should specify the specific bracketing and locate algorithms which are used within this method, by passing as parameters the appropriate procedure from the Enterprise JavaBeans BracketingAlgorithm and LocateAlgorithm.

The iterative search will begin from the point initialPoint, with the accuracy of the result depending on the algorithms chosen and the algorithms settings corresponding to the last four parameters. The last four parameters do not have a general interpretation but there exact meaning and use should become clear once the bracketing and location algorithms are chosen and we refer the read to the corresponding documentation of the Enterprise JavaBeans BracketingAlgorithm and LocateAlgorithm, or the Mathematical Documentation chapter of the PDF documentation for further details.

Parameters:
initialPoint - the initial point for which the iterative search from the extremum is started from.
bracketingAlgorithm - the bracketing algorithm used selected from the Enterprise JavaBean BracketingAlgorithm.
locateAlgorithm - the locate algorithm used selected from the Enterprise JavaBean LocateAlgorithm.
minDistance - this parameter is required by all bracketing algorithms within BracketingAlgorithm, 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 BracketingAlgorithm documentation or the Mathematical Documentation chapter of the accompanying PDF documentation.
tolerance - the tolerance used within the exit condition of the iterative locate algorithm used. A reasonable value to take for the tolerance is 1E-5.
maxIterations - the maximum number of iterations used only in the iterative locate algorithms, in such cases a reasonable value to use is 300. If the number of iterations exceeds this number TooManyUniDimensionalIterationsException will be thrown.
Returns:
an object containing the point where the function has a local extremum greater than initialPoint and the type of that extremum (-1 when we have a maximum; 1 when we have a minimum
Throws:
TooManyUniDimensionalIterationsException - thrown if the number of iterations in locate algorithms is greater than maxIterations.
InvalidUniDimensionalFunctionException - thrown if the user function returns invalid values like infinity or NaN.
UniDimensionalException - thrown if you use an algorithm which requires derivable functions but the delivered function does not implement the Derivative interface; also thrown if the delivered function does not implement an interface which extends Function.
RemoteException
See Also:
applies the same algorithm except that here the value of the object function at the extremum found (i.e. maximum or minimum) is returned.

seekExtremeBidir

public double seekExtremeBidir(double initialPoint,
                               BracketingAlgorithm bracketingAlgorithm,
                               LocateAlgorithm locateAlgorithm,
                               double minDistance,
                               double bracketingParameter,
                               double tolerance,
                               int maxIterations)
                        throws TooManyUniDimensionalIterationsException,
                               InvalidUniDimensionalFunctionException,
                               UniDimensionalException,
                               RemoteException
Seeks a location of a (local) minimum of a unidimensional object function using user selected bracketing and locate algorithms from BracketingAlgorithm and LocateAlgorithm respectively and starting the iterative search in two directions from a given initial point.

Remark: This approach in general will yield more precise results than seekExtremeUnidir(double, com.webcab.ejb.math.optimization.unidimensional.BracketingAlgorithm, com.webcab.ejb.math.optimization.unidimensional.LocateAlgorithm, double, double, double, int), for corresponding choices of the locate and bracketing algorithms, but will also be slower by a factor of two.

Application of this Approach

Once the object function has been set you should specify the specific bracketing and locate algorithms which are used within this method, by passing as parameters the appropriate procedure from the Enterprise JavaBeans BracketingAlgorithm and LocateAlgorithm.

The iterative search will begin from the point initialPoint, with the accuracy of the result depending on the algorithms chosen and the algorithms settings corresponding to the last four parameters. The last four parameters do not have a general interpretation but there exact meaning and use should become clear once the bracketing and location algorithms are chosen and we refer the read to the corresponding documentation of the Enterprise JavaBeans BracketingAlgorithm and LocateAlgorithm, or the Mathematical Documentation chapter of the PDF documentation for further details.

Parameters:
initialPoint - the initial point for which the iterative search from the extremum is started from.
bracketingAlgorithm - the bracketing algorithm used selected from the Enterprise JavaBean BracketingAlgorithm.
locateAlgorithm - the locate algorithm used selected from the Enterprise JavaBean LocateAlgorithm.
minDistance - this parameter is required by all bracketing algorithms within BracketingAlgorithm, 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 BracketingAlgorithm documentation or the Mathematical Documentation chapter of the accompanying PDF documentation.
tolerance - the tolerance used within the exit condition of the iterative locate algorithm used. A reasonable value to take for the tolerance is 1E-5.
maxIterations - the maximum number of iterations used only in the iterative locate algorithms, in such cases a reasonable value to use is 300. If the number of iterations exceeds this number TooManyUniDimensionalIterationsException will be thrown.
Returns:
the point where the function has a local minimum (it can be greater or less than the initialPoint).
Throws:
TooManyUniDimensionalIterationsException - thrown if the number of iterations in locate algorithms is greater than maxIterations.
InvalidUniDimensionalFunctionException - thrown if the user function returns invalid values like infinity or NaN.
UniDimensionalException - thrown if you use an algorithm which requires derivable functions but the delivered function does not implement the Derivative interface; also thrown if the delivered function does not implement an interface which extends Function.
RemoteException

seekNextExtreme

public double seekNextExtreme(ExtremumTypes extremumType,
                              double initialPoint,
                              double tolerance,
                              int maxIterations)
                       throws TooManyUniDimensionalIterationsException,
                              InvalidUniDimensionalFunctionException,
                              UniDimensionalException,
                              RemoteException
Seeks the closest local extremum to a given initialPoint for the unidimensional object function using information from a default set of bracketing and location algorithms.

Explanation of Approach

Unlike seekExtremeValueUnidir and seekExtremeUnidir which use only one pair of bracketing and locate algorithms and which can be rather imprecise. This method uses information from a defaults set of bracketing and locate algorithms, whereas in the associated method seekNextExtreme(...,BracketingAlgorithm[],...) you are able to selected the group and location and bracketing algorithms used. Though the justification for this approach is heuristic in nature in many instances it leads to a improvement in the accuracy of the results found. Moreover, this approach also has the important property that the probability to miss extremum is greatly reduced.

Basic Idea and advice on the apply this approach

The basic idea of this approach is that for each iteration all the algorithms with the default set are invoked and the "best" next point of all the algorithms is used as the starting point of the next iteration. Here the tolerance set will be the level of the tolerance used within each of the bracketing and locate algorithms. Please note that the precision used should also increase as the initial point moves closer to the local extremum.

Application of this Approach

Once the object function has been set you should specify the initialPoint from where the closest local extremum will be found, the type of extremum sought, the tolerance and the maximum number of iterations which can be used.

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 for which the iterative search from the extremum is started from.
tolerance - the tolerance of the result. The actual coordinate value of the extreme will lie in the interval (result - tolerance, result + tolerance). Hence, the value for the tolerance, should reflect the level of accuracy required.
maxIterations - the maximum number of iterations used only in the iterative locate algorithms, in such cases a reasonable value to use is 300. If the number of iterations exceeds this number TooManyUniDimensionalIterationsException will be thrown.
Returns:
the first local extreme found which is either greater than the initialPoint in the case of a maximum being sought, or less than the initialPoint in the case of the minimum being sought.
Throws:
UniDimensionalException - thrown if the delivered function does not implement Function or an interface which extends Function.
TooManyUniDimensionalIterationsException - thrown if the number of iterations is grater than maxIterations.
InvalidUniDimensionalFunctionException - thrown if the user function returns invalid values like infinity or NaN.
RemoteException

seekNextExtreme

public double seekNextExtreme(ExtremumTypes extremumType,
                              double initialPoint,
                              double tolerance,
                              BracketingAlgorithm[] bracketingAlgorithm,
                              LocateAlgorithm[] locateAlgorithm,
                              int maxIterations)
                       throws TooManyUniDimensionalIterationsException,
                              InvalidUniDimensionalFunctionException,
                              UniDimensionalException,
                              RemoteException
Seeks the closest local extremum to a given initialPoint for the unidimensional object function using information from a user selected set of bracketing and location algorithms.

Explanation of Approach

Unlike seekExtremeValueUnidir and seekExtremeUnidir which use only one pair of bracketing and locate algorithms and which can be rather imprecise. This method uses information from a set of user defined bracketing and locate algorithms, if you wish we also provide the method seekNextExtreme(int, double, double, int), for which we have selected a collected of bracketing and location algorithms. Though the justification for this approach is heuristic in nature in many instances it leads to a improvement in the accuracy of the results found. Moreover, this approach also has the important property that the probability to miss extremum is greatly reduced.

Basic Idea and advice on applying this approach

The basic idea of this approach is that for each iteration all the algorithms chosen are invoked (even if there are duplicates) and the "best" next point of all the algorithms is used as the starting point of the next iteration. The precision used in each of the bracketing and locate algorithms should be similar (possibly even identical). The precision used should also increase as the initial point moves closer to the local extremum. In order to ensure the efficient execution of this approach certain care must be taken in the selection of the algorithms used. The reason being that for algorithms which fail for the given problem at hand though not influencing the result, will make significant computation demands during the methods execution.

Application of this Approach

Once the object function has been set you should specify the set of bracketing and locate algorithms which are used within this method, by passing as parameters the appropriate procedures from the Enterprise JavaBeans BracketingAlgorithm and LocateAlgorithm.

Finally the initialPoint from which the closest local extremum will be sought. It is also necessary to set the type of extremum sought along with the tolerance and the maximum number of iterations used.

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 for which the iterative search from the extremum is started from.
tolerance - the tolerance of the result. The actual coordinate value of the extreme will lie in the interval (result - tolerance, result + tolerance). Hence, the value for the tolerance, should reflect the level of accuracy required.
bracketingAlgorithm - the bracketing algorithm used selected from the Enterprise JavaBean BracketingAlgorithm.
locateAlgorithm - the locate algorithm used selected from the Enterprise JavaBean LocateAlgorithm.
maxIterations - the maximum number of iterations used only in the iterative locate algorithms, in such cases a reasonable value to use is 300. If the number of iterations exceeds this number TooManyUniDimensionalIterationsException will be thrown.
Returns:
the first local extreme found which is either greater than the initialPoint in the case of a maximum being sought, or less than the initialPoint in the case of the minimum being sought.
Throws:
UniDimensionalException - thrown if the delivered function does not implement Function or an interface which extends Function; also thrown if you use a bracketing or locate algorithm which needs derivable functions and your function does not implement Derivative or an interface which extends it.
TooManyUniDimensionalIterationsException - thrown if the number of iterations is grater than maxIterations.
InvalidUniDimensionalFunctionException - thrown if the user function returns invalid values like infinity or NaN.
RemoteException

seekNextExtremeDeriv

public double seekNextExtremeDeriv(ExtremumTypes extremumType,
                                   double initialPoint,
                                   double tolerance,
                                   int maxIterations)
                            throws TooManyUniDimensionalIterationsException,
                                   InvalidUniDimensionalFunctionException,
                                   UniDimensionalException,
                                   RemoteException
Seeks the closest local extremum to a given initialPoint for the unidimensional differentiable object function using information from a default set of bracketing and location algorithms.

Explanation of Approach

Unlike seekExtremeValueUnidir and seekExtremeUnidir which use only one pair of bracketing and locate algorithms and which can be rather imprecise. This method uses information from a defaults set of bracketing and locate algorithms, whereas in the associated method seekNextExtreme(...,BracketingAlgorithm[],...) you are able to selected the group and location and bracketing algorithms used. Though the justification for this approach is heuristic in nature in many instances it leads to a improvement in the accuracy of the results found. Moreover, this approach also has the important property that the probability to miss extremum is greatly reduced.

Basic Idea and advice on the apply this approach

The basic idea of this approach is that for each iteration all the algorithms with the default set are invoked and the "best" next point of all the algorithms is used as the starting point of the next iteration. Here the tolerance set will be the level of the tolerance used within each of the bracketing and locate algorithms. Please note that the precision used should also increase as the initial point moves closer to the local extremum.

Application of this Approach

Once the object function has been set you should specify the initialPoint from where the closest local extremum will be sought. You are also required to set the type of extremum sought, the tolerance and the maximum number of iterations used.

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 for which the iterative search from the extremum is started from.
tolerance - the tolerance of the result. The actual coordinate value of the extreme will lie in the interval (result - tolerance, result + tolerance). Hence, the value for the tolerance, should reflect the level of accuracy required.
maxIterations - the maximum number of iterations used only in the iterative locate algorithms, in such cases a reasonable value to use is 300. If the number of iterations exceeds this number TooManyUniDimensionalIterationsException will be thrown.
Returns:
the first local extremum found which is either greater than the initialPoint in the case of a maximum being sought, or less than the initialPoint in the case of the minimum being sought.
Throws:
UniDimensionalException - thrown if the delivered function does not implement Derivative or an interface which extends Derivative.
TooManyUniDimensionalIterationsException - thrown if the number of iterations is grater than maxIterations.
InvalidUniDimensionalFunctionException - thrown if the user function returns invalid values like infinity or NaN.
RemoteException

seekNextExtremeDeriv

public double seekNextExtremeDeriv(ExtremumTypes extremumType,
                                   double initialPoint,
                                   double tolerance,
                                   BracketingAlgorithm[] bracketingAlgorithm,
                                   LocateAlgorithm[] locateAlgorithm,
                                   int maxIterations)
                            throws TooManyUniDimensionalIterationsException,
                                   InvalidUniDimensionalFunctionException,
                                   UniDimensionalException,
                                   RemoteException
Seeks the closest local extremum to a given initialPoint for the unidimensional differentiable object function using information from a user selected set of bracketing and location algorithms.

Explanation of Approach

Unlike seekExtremeValueUnidir and seekExtremeUnidir which use only one pair of bracketing and locate algorithms and which can be rather imprecise. This method uses information from a set of user defined bracketing and locate algorithms, if you wish we also provide the method seekNextExtremeDeriv(int, double, double, int), for which we have selected a collected of bracketing and location algorithms. Though the justification for this approach is heuristic in nature in many instances it leads to a improvement in the accuracy of the results found. Moreover, this approach also has the important property that the probability to miss extremum is greatly reduced.

Basic Idea and advice on applying this approach

The basic idea of this approach is that for each iteration all the algorithms chosen are invoked (even if there are duplicates) and the "best" next point of all the algorithms is used as the starting point of the next iteration. The precision used in each of the bracketing and locate algorithms should be similar (possibly even identical). The precision used should also increase as the initial point moves closer to the local extremum. In order to ensure the efficient execution of this approach certain care must be taken in the selection of the algorithms used. The reason being that for algorithms which fail for the given problem at hand though not influencing the result, will make significant computation demands during the methods execution.

Application of this Approach

Once the object function has been set you should specify the set of bracketing and locate algorithms which are used within this method, by passing as parameters the appropriate procedures from the Enterprise JavaBeans BracketingAlgorithm and LocateAlgorithm.

Finally the initialPoint from which the closest local extremum will be sought must be given. It is also necessary to provide the type of extremum sought along with the tolerance and the maximum number of iterations which can be used.

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 for which the iterative search from the extremum is started from.
tolerance - the tolerance of the result. The actual coordinate value of the extreme will lie in the interval (result - tolerance, result + tolerance). Hence, the value for the tolerance, should reflect the level of accuracy required.
bracketingAlgorithm - the bracketing algorithm used selected from the Enterprise JavaBean BracketingAlgorithm.
locateAlgorithm - the locate algorithm used selected from the Enterprise JavaBean LocateAlgorithm.
maxIterations - the maximum number of iterations used only in the iterative locate algorithms, in such cases a reasonable value to use is 300. If the number of iterations exceeds this number TooManyUniDimensionalIterationsException will be thrown.
Returns:
the first local extremum found which is either greater than the initialPoint in the case of a maximum being sought, or less than the initialPoint in the case of the minimum being sought.
Throws:
UniDimensionalException - thrown if the delivered function does not implement Derivative or an interface which extends Derivative.
TooManyUniDimensionalIterationsException - thrown if the number of iterations is grater than maxIterations.
InvalidUniDimensionalFunctionException - thrown if the user function returns invalid values like infinity or NaN.
RemoteException

globalExtremeDeriv

public double globalExtremeDeriv(ExtremumTypes extremumType,
                                 double lowerBound,
                                 double upperBound,
                                 int noSubIntervals,
                                 double tolerance,
                                 int maxIterations)
                          throws InvalidUniDimensionalFunctionException,
                                 TooManyUniDimensionalIterationsException,
                                 UniDimensionalException,
                                 RemoteException
Seeks the global extreme within an interval of an unidimensional optimization problem with a differentiable object function using information from a default set of locate and bracketing algorithms.

Explanation of Approach

This method uses its own default set of bracketing and locate algorithms from which the "best" point is selected during each iteration in order to improve accuracy in a similar fashion to seekNextExtreme. However in addition, by varying the noSubIntervals parameter we are able to ensures that the maximum advancing step for each iteration will (upperBound - lowerBound) / noSubIntervals, where lowerBound and upperBound are the end points of the interval over which the global extremum is sought. These two processes reduce the probability to missing a local extremes which are each candidates of the global extremum being sought within the interval considered.

Remark: In addition to this method we also offer the method globalExtremeDeriv(...,BracketingAlgorithm[],...), which is similar in approach to this method except you are able to set the default set of bracketing and locate algorithms which are used at each step.

Application of this Approach

Once the object function has been set you should specify:

  1. Interval considered which is determined by providing the upper and lower bounds of the interval
  2. Type of extremum sought (i.e. maximum or minimum)
  3. The initialPoint from where the closest local extremum is sought.
  4. The tolerance and the maximum number of iterations used.

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.
lowerBound - the coordinate value on the real line of the beginning of the interval over which the global extremum (with respect to the interval considered) is sought.
upperBound - the coordinate value on the real line of the end of the interval over which the global extremum (with respect to the interval considered) is sought.
noSubIntervals - the number of intermediate "safety" points to be used, in order to ensure that the advance step do not become to large. Note that the larger this parameter is the less likely we are to miss any local extremum in the search for the global extremum.
tolerance - the tolerance of the result. The actual coordinate value of the extreme will lie in the interval (result - tolerance, result + tolerance). Hence, the value for the tolerance, should reflect the level of accuracy required.
maxIterations - the maximum number of iterations which is only used in the iterative locate algorithms, in such cases a reasonable value to use is 300. If the number of iterations exceeds this number TooManyUniDimensionalIterationsException will be thrown.
Returns:
the coordinate value of the location of the global extremum within the interval considered of the unidimensional optimization problem considered.
Throws:
UniDimensionalException - thrown if the delivered function does not implement Derivative or an interface which extends Derivative.
InvalidUniDimensionalFunctionException - thrown if the user function returns invalid values like infinity or NaN.
TooManyUniDimensionalIterationsException - thrown if the number of iterations is greater than maxIterations.
RemoteException

globalExtremeDeriv

public double globalExtremeDeriv(ExtremumTypes extremumType,
                                 double lowerBound,
                                 double upperBound,
                                 int noSubIntervals,
                                 double tolerance,
                                 BracketingAlgorithm[] bracketingAlgorithm,
                                 LocateAlgorithm[] locateAlgorithm,
                                 int maxIterations)
                          throws InvalidUniDimensionalFunctionException,
                                 TooManyUniDimensionalIterationsException,
                                 UniDimensionalException,
                                 RemoteException
Seeks the global extreme within an interval of an unidimensional optimization problem with a differentiable object function using information from a user selected set of locate and bracketing algorithms.

Explanation of Approach

This method uses a user defined set of bracketing and locate algorithms from which the "best" point is selected during each iteration in order to improve accuracy in a similar fashion to seekNextExtreme. However in addition, by varying the noSubIntervals parameter we are able to ensures that the maximum advancing step for each iteration will (upperBound - lowerBound) / noSubIntervals, where lowerBound and upperBound are the end points of the interval over which the global extremum is sought. These two processes reduce the probability to missing a local extremes which are each candidates of the global extremum within the interval considered.

Remark: In addition to this method we also offer the method globalExtremeDeriv(int, double, double, int, double int), which is similar in approach to this method except that we have provide a default set of bracketing and locate algorithms which are used at each step.

Application of this Approach

Once the object function has been set you should specify the set of bracketing and locate algorithms which are used within this method, by passing as parameters the appropriate procedures from the Enterprise JavaBeans BracketingAlgorithm and LocateAlgorithm.

Finally the initialPoint from which the closest local extremum will be sought should be provided along with the type of extremum searched for, the tolerance and the maximum number of iterations which can be used.

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.
lowerBound - the coordinate value on the real line of the beginning of the interval over which the global extremum is sought.
upperBound - the coordinate value on the real line of the end of the interval over which the global extremum is sought.
noSubIntervals - the number of intermediate "safety" points to be used, in order to ensure that the advance steps do not get to large. Note that the larger the parameter the less likely we are to miss any local extremum in the search for the global extremum.
tolerance - the tolerance of the result. The actual coordinate value of the extreme will lie in the interval (result - tolerance, result + tolerance). Hence, the value for the tolerance, should reflect the level of accuracy required.
bracketingAlgorithm - the bracketing algorithm used selected from the Enterprise JavaBean BracketingAlgorithm.
locateAlgorithm - the locate algorithm used selected from the Enterprise JavaBean LocateAlgorithm.
maxIterations - the maximum number of iterations which is only used in the iterative locate algorithms, in such cases a reasonable value to use is 300. If the number of iterations exceeds this number TooManyUniDimensionalIterationsException will be thrown.
Returns:
the coordinate value of the location of the global extremum within the interval considered of the unidimensional optimization problem considered.
Throws:
UniDimensionalException - thrown if the delivered function does not implement Derivative or an interface which extends Derivative.
InvalidUniDimensionalFunctionException - thrown if the user function returns invalid values like infinity or NaN.
TooManyUniDimensionalIterationsException - thrown if the number of iterations is greater than maxIterations.
RemoteException

globalExtreme

public double globalExtreme(ExtremumTypes extremumType,
                            double lowerBound,
                            double upperBound,
                            int noSubIntervals,
                            double tolerance,
                            int maxIterations)
                     throws InvalidUniDimensionalFunctionException,
                            TooManyUniDimensionalIterationsException,
                            UniDimensionalException,
                            RemoteException
Seeks the global extreme within an interval of an unidimensional optimization problem with a general object function using information from a default set of locate and bracketing algorithms.

Explanation of Approach

This method uses its own default set of bracketing and locate algorithms from which the "best" point is selected during each iteration in order to improve accuracy in a similar fashion to seekNextExtreme. However in addition, by varying the noSubIntervals parameter we are able to ensures that the maximum advancing step for each iteration will (upperBound - lowerBound) / noSubIntervals, where lowerBound and upperBound are the end points of the interval over which the global extremum is sought. These two processes reduce the probability to missing a local extremes which are each candidates of the global extremum being sought within the interval considered.

Remark: In addition to this method we also offer the method globalExtreme(...,BracketingAlgorithm[],...), which is similar in approach to this method except you are able to set the default set of bracketing and locate algorithms which are used at each step.

Application of this Approach

Once the object function has been set you should specify the interval over which the extremum is sought by providing the upper and lower bounds of the interval. You will also need to provide the initialPoint, from where the closest local extremum will be sought, the type of extremum sought, the tolerance and the maximum number of iterations which can be used.

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.
lowerBound - the coordinate value on the real line of the beginning of the interval over which the global extremum is sought.
upperBound - the coordinate value on the real line of the end of the interval over which the global extremum is sought.
noSubIntervals - the number of intermediate "safety" points to be used, in order to ensure that the advance steps do not get to large. Note that the larger the parameter the less likely we are to miss any local extremum in the search for the global extremum.
tolerance - the tolerance of the result. The actual coordinate value of the extreme will lie in the interval (result - tolerance, result + tolerance). Hence, the value for the tolerance, should reflect the level of accuracy required.
maxIterations - the maximum number of iterations which is only used in the iterative locate algorithms, in such cases a reasonable value to use is 300. If the number of iterations exceeds this number TooManyUniDimensionalIterationsException will be thrown.
Returns:
the coordinate value of the location of the global extremum within the interval considered of the unidimensional optimization problem considered.
Throws:
UniDimensionalException - thrown if the delivered function does not implement Function or an interface which extends Function
InvalidUniDimensionalFunctionException - thrown if the user function returns invalid values like infinity or NaN.
TooManyUniDimensionalIterationsException - thrown if the number of iterations is greater than maxIterations.
RemoteException

globalExtreme

public double globalExtreme(ExtremumTypes extremumType,
                            double lowerBound,
                            double upperBound,
                            int noSubIntervals,
                            double tolerance,
                            BracketingAlgorithm[] bracketingAlgorithm,
                            LocateAlgorithm[] locateAlgorithm,
                            int maxIterations)
                     throws InvalidUniDimensionalFunctionException,
                            TooManyUniDimensionalIterationsException,
                            UniDimensionalException,
                            RemoteException
Seeks the global extreme within an interval of an unidimensional optimization problem with a general object function using information from a user selected set of locate and bracketing algorithms.

Explanation of Approach

This method uses a user defined set of bracketing and locate algorithms from which the "best" point is selected during each iteration in order to improve accuracy in a similar fashion to seekNextExtreme. However in addition, by varying the noSubIntervals parameter we are able to ensures that the maximum advancing step for each iteration is: (upperBound - lowerBound) / noSubIntervals, where lowerBound and upperBound are the end points of the interval over which the global extremum is sought. These two processes reduce the probability to missing a local extremes which are each candidates of the global extremum being sought within the interval considered which is being sought.

Remark: In addition to this method we also offer the method globalExtreme(int, double, double, int, double int), which is similar in approach to this method except that we have provide a default set of bracketing and locate algorithms which are used at each step.

Application of this Approach

Once the object function has been set you should specify the set of bracketing and locate algorithms which are used within this method, by passing as parameters the appropriate procedures from the Enterprise JavaBeans BracketingAlgorithm and LocateAlgorithm.

Finally the initialPoint from which the closest local extremum will be sought within the interval consider, the type of extremum required, the tolerance and the maximum number of iterations used.

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.
lowerBound - the coordinate value on the real line of the beginning of the interval over which the global extremum is sought.
upperBound - the coordinate value on the real line of the end of the interval over which the global extremum is sought.
noSubIntervals - the number of intermediate "safety" points to be used, in order to ensure that the advance steps do not get to large. Note that the larger the parameter the less likely we are to miss any local extremum in the search for the global extremum.
tolerance - the tolerance of the result. The actual coordinate value of the extreme will lie in the interval (result - tolerance, result + tolerance). Hence, the value for the tolerance, should reflect the level of accuracy required.
bracketingAlgorithm - the bracketing algorithm used selected from the Enterprise JavaBean BracketingAlgorithm.
locateAlgorithm - the locate algorithm used selected from the Enterprise JavaBean LocateAlgorithm.
maxIterations - the maximum number of iterations which is only used in the iterative locate algorithms, in such cases a reasonable value to use is 300. If the number of iterations exceeds this number TooManyUniDimensionalIterationsException will be thrown.
Returns:
the coordinate value of the location of the global extremum within the interval considered of the unidimensional optimization problem considered.
Throws:
UniDimensionalException - thrown if the delivered function does not implement Function or an interface which extends Function; also thrown if you use a bracketing or locate algorithm which needs derivable functions and your function does not implement Derivative or an interface which extends it.
InvalidUniDimensionalFunctionException - thrown if the user function returns invalid values like infinity or NaN.
TooManyUniDimensionalIterationsException - thrown if the number of iterations is greater than maxIterations.
RemoteException

WebCab Optimization
v2.6
(J2EE Edition)