c

scalation.minima

NelderMeadSimplex

class NelderMeadSimplex extends Minimizer with Error

The NelderMeadSimplex solves Non-Linear Programming (NLP) problems using the Nelder-Mead Simplex algorithm. Given a function 'f' and its dimension 'n', the algorithm moves a simplex defined by n + 1 points in order to find an optimal solution. The algorithm is derivative-free.

minimize f(x)

Linear Supertypes
Error, Minimizer, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. NelderMeadSimplex
  2. Error
  3. Minimizer
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new NelderMeadSimplex(f: FunctionV2S, n: Int)

    f

    the vector-to-scalar objective function

    n

    the dimension of the search space

Type Members

  1. type Pair = (VectorD, VectorD)
    Definition Classes
    Minimizer
  2. type Vertex = (VectorD, Double)

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. val EPSILON: Double
    Attributes
    protected
    Definition Classes
    Minimizer
  5. val MAX_ITER: Int
    Attributes
    protected
    Definition Classes
    Minimizer
  6. val STEP: Double
    Attributes
    protected
    Definition Classes
    Minimizer
  7. val TOL: Double
    Attributes
    protected
    Definition Classes
    Minimizer
  8. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  9. def centroid(): Vertex

    Calculate the centroid of the best-side of the simplex (excluding h=0), returning it and its functional value.

  10. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  11. def contractIn(x_c: VectorD, x_r: VectorD): Vertex

    Contract: compute the inner contraction point between x_h and x_c.

    Contract: compute the inner contraction point between x_h and x_c.

    x_c

    the best-side centroid of the simplex

    x_r

    the reflection point

  12. def contractOut(x_c: VectorD, x_r: VectorD): Vertex

    Contract: compute the outer contraction point between x_r and x_c.

    Contract: compute the outer contraction point between x_r and x_c.

    x_c

    the best-side centroid of the simplex

    x_r

    the reflection point

  13. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  14. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  15. def expand(x_c: VectorD, x_r: VectorD): Vertex

    Expand: compute the expansion point beyond the reflection point.

    Expand: compute the expansion point beyond the reflection point.

    x_c

    the best-side centroid of the simplex

    x_r

    the reflection point

  16. def fg(x: VectorD): Double

    The objective function 'f' plus a weighted penalty based on the constraint function 'g'.

    The objective function 'f' plus a weighted penalty based on the constraint function 'g'. Override for constrained optimization and ignore for unconstrained optimization.

    x

    the coordinate values of the current point

    Definition Classes
    Minimizer
  17. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  18. final def flaw(method: String, message: String): Unit
    Definition Classes
    Error
  19. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  20. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  21. def improveSimplex(toler: Double = EPSILON): (Double, Double)

    Improve the simplex by replacing the worst/highest vertex (x_h) with a a better one found on the line containing x_h and the centroid (x_c).

    Improve the simplex by replacing the worst/highest vertex (x_h) with a a better one found on the line containing x_h and the centroid (x_c). Try the reflection, expansion, outer contraction and inner contraction points, in that order. If none succeeds, shrink the simplex and iterate. Return both distance and difference between x_h (worst) and x_l (best).

    toler

    the tolerance used for termination

  22. def initSimplex(x0: VectorD, step: Double): Unit

    Initialize the search simplex by setting n + 1 vertices and computing their functional values.

    Initialize the search simplex by setting n + 1 vertices and computing their functional values.

    x0

    the given starting point

    step

    the step size

  23. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  24. def lineSearch(x: VectorD, dir: VectorD, step: Double = STEP): Double

    Perform an exact (e.g., GoldenSectionLS) or inexact (e.g., WolfeLS) line search.

    Perform an exact (e.g., GoldenSectionLS) or inexact (e.g., WolfeLS) line search. Search in direction 'dir', returning the distance 'z' to move in that direction. Currently NOT USED, but may be used to find a better point to add to simplex.

    x

    the current point

    dir

    the direction to move in

    step

    the initial step size

    Definition Classes
    NelderMeadSimplexMinimizer
  25. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  26. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  27. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  28. def reflect(x_c: VectorD): Vertex

    Reflect: compute the reflection point of the worst point (h=0) across the centroid.

    Reflect: compute the reflection point of the worst point (h=0) across the centroid.

    x_c

    the best-side centroid of the simplex

  29. def replace(x_n: VectorD): Unit

    Replace the worst vertex (h=0) in the simplex with the new point.

    Replace the worst vertex (h=0) in the simplex with the new point.

    x_n

    the new replacement point

  30. def shrink(): Unit

    Shrink: fixing the best/lowest point (l=n), move the rest of the points toward it.

  31. def solve(x0: VectorD, step: Double = STEP, toler: Double = EPSILON): VectorD

    Solve the Non-Linear Programming (NLP) problem using the Nelder-Mead Simplex algorithm.

    Solve the Non-Linear Programming (NLP) problem using the Nelder-Mead Simplex algorithm.

    x0

    the given starting point

    step

    the initial step size

    toler

    the tolerance used for termination

    Definition Classes
    NelderMeadSimplexMinimizer
  32. def sort(): Unit

    Sort the vertices in non-increasing order (high to low).

    Sort the vertices in non-increasing order (high to low). Then the key indices are worst/highest (h=0), second worst (s=1), and best/lowest (l=n).

  33. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  34. def toString(): String
    Definition Classes
    AnyRef → Any
  35. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  36. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  37. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )

Inherited from Error

Inherited from Minimizer

Inherited from AnyRef

Inherited from Any

Ungrouped