Downhill Simplex Algorithm

download Downhill Simplex Algorithm

of 2

description

Simplex algo

Transcript of Downhill Simplex Algorithm

  • Appendix D: Downhill Simplex Algorithm

    This algorithm is based on a simplex, the simplest volume in the N-dimensionalparameter area, which is stretched from N 1 points. Given a continuous functiony f(x1, . . ., xN) ofN variables x {x1, . . ., xN}. The goal is to nd a localminimum ymof this function with corresponding variables xm. For that purpose, we construct asimplex of N 1 points with vectors x1, . . ., xN, xN 1, with xi x0 lei.The procedure is now as follows. After having generated the start simplex, the best

    point (ymin, xmin), the worst point (ymax, xmax), and the second-worst point (yv, xv) aredetermined. Then, the mirror center

    xs 1N

    X

    xi 6xmaxxi D:1

    is determined from all points except the worst point. The rst step to generate a newsimplex with lower volume is the reection of the worst point at the mirror center:

    xr xsa xmaxxs : D:2There are three other methods to construct a new simplex:

    . the expansion to accelerate the reduction of the simplex to a simplex of smallervolume,

    . the contraction to keep the simplex small, and

    . the compression around the actual best point.

    All four methods are used repeatedly until the best point is obtained. Figure D.1illustrates all four steps for a three point simplex from N 2 parameters.After the rst reection, the expansion point

    xe xsc xrxs : D:3is determined and compared with (yr, x

    r) to determine the next steps. The followingow chart in Figure D.2 illustrates the complete algorithm.The coordinate changes of the parameters during the used steps are made using

    theNelderMead parametersa,b, andc, usually set to 1, 0.5, and 2. The iteration is aslong resumed until a convergence criterion is fullled. The procedure convergesapproximately linear and is thus not extremely fast but durable.

    A Practical Guide to Optical Metrology for Thin Films, First Edition. Michael Quinten. 2013 Wiley-VCH Verlag GmbH & Co. KGaA. Published 2013 by Wiley-VCH Verlag GmbH & Co. KGaA.

    j199

  • (b)(a) mirror point

    (d)(c)

    FigureD.1 Illustration of the fourmethods in the downhill simplexmethod to define new points ofthe simplex. (a) Reflection, (b) expansion, (c) contraction, and (d) compression.

    REFLECTION

    yr < ymin

    EXPANSION

    ye < yr

    yr < yv yr < ymax

    CONTRACTION

    yc < ymax

    (xr, yr)(xmax, ymax)

    (xr, yr)(xmax, ymax) (xc, yc)(xmax, ymax)

    COMPRESSION

    (xe, ye)(xmax, ymax)

    MINIMUM REACHED RETURN TO MAIN

    PROCESS

    no

    no

    no

    no

    no

    no

    yes

    yes

    yes

    yes

    yes

    yes

    Figure D.2 Flowchart of the downhill simplex algorithm.

    200j Appendix D: Downhill Simplex Algorithm