Simulated Annealing


Mutation Function


Thomas Weise - Metaheuristic Optimization

Th.Bäck A.E.Eiben J.N.Kok H.P.Spaink - Natural Computing Series

Pseudo Code
\caption{SA Algorithm}
                \STATE $f \gets \text{the objective function subject to minization}$
                \STATE $shouldTerminate \gets \text{the termination criterion}$
                \STATE $x_{new} \gets random() \text{the newly generated individual}$
                \STATE $x_{cur} \gets x_new \text{the point currently investigated}$
                \STATE $\textit{Best} \gets x_cur \text{the best individual ever discovered}$
                \STATE $\textit{T} \gets \text{the temperature of the system which is decreased over time}$
                \STATE $t \gets 0$
                    \STATE $x_{new} \gets mutation(x_{cur})$
                    \STATE $\Delta E \gets x_{new} - x_{cur} $
                    \IF{$\Delta E \leq 0$}
                        \STATE $x_{cur} \gets x_{new}$
                        \IF{$f(\textit{Best}) > f(x_{cur})$}
                            \STATE $\textit{Best} \gets x_{cur}$
                        \STATE $T \gets getsTemperature()$
                        \IF{$\text{randomly from [0,1]} < e^{-(\Delta E/T)}$}
                            \STATE $x_{cur} \gets x_{new}$
                    \STATE $t \gets t+1$
                \RETURN $\textit{Best}$