scalation.minima

NelderMeadSimplex

class NelderMeadSimplex extends Minimizer with Error

This class solves unconstrained 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
Learn more about member selection
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 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. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  8. def centroid(): Vertex

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

  9. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  10. 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

  11. 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

  12. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  13. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  14. 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

  15. 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
  16. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  17. def flaw(method: String, message: String): Unit

    Show the flaw by printing the error message.

    Show the flaw by printing the error message.

    method

    the method where the error occurred

    message

    the error message

    Definition Classes
    Error
  18. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  19. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  20. 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 tolerence used for termination

  21. 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

  22. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  23. def lineSearch(x: VectorD, dir: VectorD, step: Double = STEP): Double

    Perform an exact (e.

    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
  24. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  25. final def notify(): Unit

    Definition Classes
    AnyRef
  26. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  27. 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

  28. 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

  29. def shrink(): Unit

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

  30. 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 tolerence used for termination

    Definition Classes
    NelderMeadSimplexMinimizer
  31. 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).

  32. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  33. def toString(): String

    Definition Classes
    AnyRef → Any
  34. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  35. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  36. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Error

Inherited from Minimizer

Inherited from AnyRef

Inherited from Any

Ungrouped