Navigation: Optimize Commands > Define/Edit > Method

 

Method

 

Contact Us: fredsupport@photonengr.com

 

 

 

Description


Once variables and merit function aberrations have been defined, the optimization process can proceed by one of several methods.  The goal of the optimization algorithm is to explore the variable space within the user specified limits and modify the variable values iteratively in order to drive the merit function value towards a minimum.  Specifying how the optimization routine explores the variable space is done using the Method portion of the optimization's Define/Edit dialog.  In general, there are two methods for exploring the variable space; globally or locally.  In a global type optimization, the broader variable space is explored and merit function minimization proceeds using one or more variable configurations from that search.  In a local type optimization, the variable space in the region of the starting configuration is explored and merit function minimization proceeds from that starting configuration.  The implicit assumption of local optimization is that the starting configuration lies near to the optimal configuration in the merit function space.  A listing of the available local and global optimization methods is provided below:

 

Local

Global

Simplex

Simplex with Multiple Restarts

Single Variable Minimization

Single Variable with Multiple Restarts

 

Simplex with Simulated Annealing

 

 

Navigation


This feature can be accessed by selecting Optimization > Define/Edit: Method from the menu.

 

 

Controls


Control

Inputs / Description

Defaults

The Optimization Method

Method

Drop down menu containing a list of the available optimization methods.  If one of the "multiple restarts" options is selected:

Each restart begins by selecting an initial value for each active variable, where each value is randomly drawn from within the allowed variable range.

The model configuration at the end of the optimization is set to the result with the lowest merit function.

Simplex

Multi-start parameters

Number of Restarts

This option is activated only when the Method selected uses random restarts and sets the number of random restarts used in the overall optimization.

2

Variable for 1-D Optimizations

Drop-list Box

The drop-list box is activated only when the Method selected uses 1-D variable minimization.  When activated, the drop-list box allows selection of the the variable to be used in the optimization.  All other variables are ignored.

Variable 0

Simulated Annealing Parameters

Reduce Temperature Fraction

Determines how the temperature is reduced between annealing steps.  For example, if the current temperature is 1 and the Reduce Temperature Fraction is 0.9, then the second annealing step would have temperature 0.9, the third 0.81, etc.

0.9

Set Starting Temperature

Auto

Randomly samples the variable space and determines the starting temperature based on the merit function evaluations.  The starting temperature is set to a value such that random thermal perturbations of the variables at the starting energy level will allow the simplex to step over the highest merit function value in the samples 80% of the time.

Toggled

Set To

User specified starting temperature (merit function value).

1

Stop Annealing

After

User specified number of temperature reductions to occur in the annealing schedule before final local optimization.

25

Below Min Temperature

Value at which the annealing stops and final local optimization begins.

0.001

Stopping/Convergence Criteria

When all variables change less than

Specifies an optimization convergence threshold as a normalized variable change within an iteration of the Simplex that all variables must satisfy.  The variable change is calculated in the following way:

 

1.For each variable in the simplex, N values of the variable are tested for each simplex iteration

2.For each variable, the delta-range of the N tested values is calculated

3.The delta-range for each variable is normalized by taking it as a fraction of its allowed variable range limits

4.The resulting normalized delta-range value for each variable is compared to the specified convergence threshold value.  If all variables satisfy the convergence threshold, the optimization is considered to be converged.

 

This convergence criteria can be pictured as first calculating the normalized "size" of the simplex and then calculating the contraction (the variable delta-range) of the simplex for that iteration.  If the contraction is small enough, then the optimization is converged.

 

This convergence criteria only applies to a single temperature step if Simulated Annealing is used.

0.001

When the merit function changes less than

Specified an optimization convergence threshold as a normalized merit function change within an iteration of the Simplex.  The merit function change is calculated in the following way:

1.N configurations are evaluated for an iteration of the simplex

2.Considering the N evaluations of the simplex, calculate the delta-change of the merit function value across all configurations.

3.Normalize the delta-change of the merit function to the lowest merit function value.

4.Convergence is achieved when the normalized merit function delta-change is below the specified convergence threshold.

 

This convergence criteria only applies to a single temperature step if Simulated Annealing is used.

0.001

When the merit function value falls below

Optimization will stop when the lowest merit-function value evaluated during the current iteration falls below the specified threshold.

 

This convergence criteria only applies to a single temperature step if Simulated Annealing is used.

0.001

After iterations

Optimization will stop after the specified number of iterations.

 

This convergence criteria only applies to a single temperature step if Simulated Annealing is used.

10

 

 

 

Application Notes


Simplex

The Simplex method of optimization1,2,3,4,5,6 is a geometric approach to optimization and is akin to a ball rolling down a hill, where the hill is analogous to the merit function and the ball indicates points that are sampling the variable space.  The number of points in the simplex is the number of dimensions plus one, where the simplex undergoes reflection, expansion, and two forms of contraction to search the variable space. The simplex method is very robust, meaning that there is confidence in convergence even in systems with stochastic (i.e., random) noise. However, noise is always present in ray tracing of non-sequential optical systems due to limitations in discrete ray sampling. Additionally, the simplex method does not employ derivatives, which are typically unavailable in non-sequential analysis. Because of the lack of derivative information, the simplex method will proceed in a slower manner than other algorithms which take advantage of derivative information to guide the variable search.

 

Although the simplex can represent an arbitrary n-dimensional function, the 2-D case serves a useful illustration of the simplex method.  Consider a 2-D function which has been sampled at three locations within the variable space to form a triangle, which is the simplex (shown below).  These points can be evaluated as best (B1), second best (B2) and worst (W).  In order to improve the simplex, we wish to move the worst point to a new position and improve the merit function evaluation.  Three operations are potentially performed on the simplex to move point W, reflection about B1B2, an expansion and a contraction.  The following steps would be taken:

1.

 

Find the midpoint of B1B2, shown as point C in the diagram below.

2.

 

Perform a reflection of the simplex along the line WC.  Evaluate the merit function using T1 in place of W.  If the merit function is better at T1 than W but worse than B2 (and lies within the valid variable limit range), then we restart at step 1 using the new simplex formed by B1, B2 and T1.  If the evaluation produces a result better than B1, then proceed to step 3.  If the evaluation fails (lies outside of variable limit range or T1 is worse than W), proceed to step 4.

3.

 

Expand the simplex along the line WC from T1 to T2 and re-evaluate.  If the result at T2 is better than T1, W is replaced with T2.  If the result at T2 is worse than T1, W is replaced with T1.  Restart the simplex at step 1 using the new simplex formed by either B1, B2 and T1 or B1, B2 and T2.

4.

 

Contract the simplex along the line WC to point T3.  The simplex is formed by points B1, B2 and T3 and the process is restarted from step 1.

 

 

 

 

[1]  W. H. Press, B. P. Flannery, S. A. Teukolsky, and W. T. Vetterling, Numerical Recipes in C (Cambridge U. Press, Cambridge, England, 1992), pp.395-455.

[2]  Nelder J.A., Mead R., 1965, Computer Journal, 7, 308

[3]  R. J. Koshel, "Simplex optimization method for illumination design," Opt.Lett. 30, 649-651 (2005)  http://www.opticsinfobase.org/abstract.cfm?URI=ol-30-6-649 

[4]  R. J. Koshel, Proc. SPIE 4832, 270 (2002).

[5]  http://en.wikipedia.org/wiki/Simplex_algorithm 

[6]  http://en.wikipedia.org/wiki/Nelder-Mead_method 

 

 

Simulated Annealing

Simulated Annealing is a pseudo-global optimization algorithm which has its foundations in thermodynamics.  Consider a high temperature liquid metal whose molecules are able to freely move about.  In thermal equilibrium, the energy of the system at temperature T has energy which is distributed probabilistically among all different energy states E according to the Boltzmann probability distribution:

Probability(E) ~ e(-E/kT)

If the molten metal is cooled slowly, the constituent molecules lose mobility.  If the cooling is slow enough (annealing), the metal forms a crystalline structure having the minimum energy configuration.  Unlike the standard Simplex, this method allows for the probability of a step upward in energy for any given iteration.  Accepting only downward steps in energy is equivalent to quenching the metal into a polycrystalline configuration, which is the approach that the standard Simplex method takes.  In this manner, the Simplex method is a local optimization strategy since there is no probability of taking an upward step to escape from a local minimum energy configuration.

 

In its relation to optimizing the FRED system model, the temperature T is representative of the merit function value at a given energy level.  At any given temperature, the simplex undergoes random thermal tumbling as it searches the current energy level.  When it has finished its search, the temperature is reduced and another search at the next energy level proceeds.  Because the simplex undergoes random perturbations during the search, it has the opportunity to explore many local minimum during any given iteration.  As the temperature is reduced, the number of local minimum being explored decreases and the algorithm (ideally) settles into the global minimum.

 

True to its name, the success of the Simulated Annealing optimization method depends heavily on annealing schedule.  That is, the starting temperature, temperature reductions and the number of iterations at each energy level determine whether or not an optimal configuration is found.  Determining the proper annealing schedule for a given optimization problem will require some trial and error on the part of the user.  However, some suggestions for starting temperature and annealing schedule have been built into the dialog as default parameters.  For example, the Auto option for choosing the starting temperature will compute the merit function value for a number of starting configurations and set the starting temperature such that the optimization has an 80% chance of stepping over the largest merit function value found.  Additionally, the temperature reduction factor is set at 0.9 in accordance with [1].  Regarding the convergence criteria, each option applies to a single temperature in the annealing schedule. For example, a given temperature may undergo N iterations according to the "After iterations" convergence criteria.  After the iterations have completed, the temperature is reduced and another N iterations of the simplex are performed.  Once the minimum temperature of the annealing schedule has been reached, the optimization undergoes one final local standard Simplex optimization.  The user may start with 10-100 iterations specified in the "After iterations" setting when Simulated Annealing is used.  Keep in mind that the algorithm has its best chance for success when the temperature is cooled slowly, but you also need to get a result in a finite amount of time!

 

[1] B. Flannery, W. Vetterling, S. Teukolsky, W. Press. Numerical Recipes: The Art of Scientific Computing (3rd Edition).  New York: Cambridge University Press, 2007.

 

 

Related Topics


Optimization Overview

Optimize - Variables

Optimize - Merit Function Aberrations

Optimize - Output Results

Optimize - Sensitivity Analysis

 

 

 

 

 

Copyright © Photon Engineering, LLC