PSO is modeled on the behaviour of a swarm of animals when they hunt for food or avoid predators~\cite{miller2007}. In nature a swarm of animals is found to exhibit very complex behaviour and capable of solving difficult problems like finding the shortest distance to a food source. However the rules that govern the behaviour of each animal are thought to be simple. Animals are known to communicate the information they have discovered to their neighbours and then act upon that individually. The individuals cooperate through self-organization but without any central control. The interaction of a large number of animals acting independently according to some simple rules produces highly organized structures and behaviours.
In PSO, a swarm of particles wanders around in the design space according to some specified velocity. The position of each particle corresponds to one set of design variables and it has an associated value of the cost function. Each particle remembers the best position it has discovered in its entire lifetime (local memory) and also knows the best position discovered by its neighbours and the whole swarm (global memory). The velocity of each particle is such as to pull it towards its own memory and that of the swarm. While there are many variants of the PSO algorithm, the one we use is described below and complete details are available in~\cite{regis2006}. The algorithm is given for a function minimization problem \begin{equation*} \min_{x_l \le x \le x_u} \J(x) \end{equation*}
\noindent{\bf Algorithm}: {\em Particle swarm optimization} \begin{enumerate}
\item Set $n=0$
\item Randomly initialize the position of the particles and their velocities $\{x^n_k, v^n_k\}, k=1,\dots,K$.
\item Compute cost function associated with the particle positions $\J(x^n_k), k=1,\dots,K$
\item Update the local and global memory \begin{equation} x_{*,k}^n = \argmin_{0 \le s \le n}{ \J(x^s_k) }, \quad x_{*}^n = \argmin_{0 \le s \le n, 1 \le k \le K}{ \J(x^s_k) } \end{equation}
\item Update the particle velocities \begin{equation} v^{n+1}_k = \omega^n v^n_k + c_1 r^n_{1,k} (x_{*,k}^n - x^n_k) + c_2 r^n_{2,k} (x_*^n - x^n_k) \end{equation}
\item Apply craziness operator to the velocities
\item Update the position of the particles \begin{equation} x^{n+1}_k = x^n_k + v^{n+1}_k \end{equation}
\item Limit new particle positions to lie within $[x_l, x_u]$ using reflection at the boundaries
\item If $n < N_{\max}$, then $n = n + 1$ and go to step (iii), else STOP.
\end{enumerate}

