# Function Optimization and Parameter Performance Analysis Based on Gravitation Search Algorithm
## 3 Simulation Experiments and Results Analysis
### Simulation Results and Corresponding Analysis  
The GSA parameters are initialized as follows: max iterations max_it = 1000, objects N = 100. When the simulation experiments are carried out for the parameters \(G_{0}\), \(\alpha\) = 20. In order to reduce the influence of random disturbance, the independent operation 50 times is carried out for each test function. The optimum values and average values of GSA under different \(G_{0}\) are shown in Table 2. The simulation curves for six test functions are shown in Figure 3a-f. \begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Function** & **Name** & **Expression** & **Range** & **Dim** \\ \hline \(f_{1}\) & Griewank & \(\sum\limits_{i=1}^{n}\dfrac{x_{i}^{2}}{4000}-\prod\limits_{i=1}^{n}\cos\left( \dfrac{x_{i}}{\sqrt{i}}\right)+1\) & \([-32,32]^{n}\) & 30 \\ \(f_{2}\) & Quartic & \(\sum\limits_{i=1}^{n}x_{i}^{4}+random[0,1)\) & \([-1.28,1.28]^{n}\) & 30 \\ \(f_{3}\) & Rastrigin & \(\sum\limits_{i=1}^{n}\left[x_{i}^{2}-10\cos(2\pi x_{i})+10\right]\) & \([-5.12,5.12]^{n}\) & 30 \\ \(f_{4}\) & Schwefel & \(418.9829n-\sum\limits_{i=1}^{n}\left(x_{i}\text{sin}\sqrt{|x_{i}|}\right)\) & \([-600,600]^{n}\) & 30 \\ \(f_{5}\) & Shekel’s Foxholes & \((\dfrac{1}{500}+\sum_{j=1}^{25}\dfrac{1}{j+\sum_{i=1}^{2}\left(x_{i}-a_{ij} \right)^{6}})^{-1}\) & \([-65.53,65.53]^{2}\) & 2 \\ \(f_{6}\) & Kowalik’s & \(\sum\limits_{i=1}^{11}\left[a_{i}-\dfrac{x_{1}(b_{i}^{2}+b_{i}x_{2})}{b_{i}^{2 }+b_{i}x_{3}+x_{4}}\right]^{2}\) & \([-5,5]^{4}\) & 4 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Typical test functions. \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline \multirow{2}{*}{**Function**} & \multirow{2}{*}{**Result**} & \multicolumn{6}{c}{**The Simulation Results of GSA under Different \(G_{0}\)**} \\ \cline{3-6}  & & **10** & **50** & **100** & **150** & **Minimum Time (s)** \\ \hline \multirow{2}{*}{\(f_{1}\)} & optimum & 1.4465e+3 & 153.1636 & 127.7572 & 86.9076 & \multirow{2}{*}{9.1665} \\  & average & 216.2229 & 210.4132 & 640.4764 & 1.0409e+4 & \\ \hline \multirow{2}{*}{\(f_{2}\)} & optimum & 0.0092 & 0.0055 & 0.0059 & 0.0062 & \multirow{2}{*}{7.6812} \\  & average & 69.0872 & 101.8753 & 102.9537 & 78.0762 & \\ \hline \multirow{2}{*}{\(f_{3}\)} & optimum & 4.9748 & 11.9395 & 13.9294 & 10.9445 & \multirow{2}{*}{7.4739} \\  & average & 236.9825 & 392.0198 & 367.3913 & 365.4881 & \\ \hline \multirow{2}{*}{\(f_{4}\)} & optimum & 315.2694 & 7.6050 & 2.4267 & 0.0123 & \multirow{2}{*}{7.7866} \\  & average & 31.1370 & 0 & 0 & 0 & \\ \hline \multirow{2}{*}{\(f_{5}\)} & optimum & 1.0012 & 1.0909 & 1.0602 & 0.9980 & \multirow{2}{*}{7.3759} \\  & average & 2.0043 & 0.9980 & 1.0836 & 1.4385 & \\ \hline \multirow{2}{*}{\(f_{6}\)} & optimum & 0.0013 & 0.0015 & 0.0017 & 0.0016 & \multirow{2}{*}{3.8364} \\  & average & 0.0072 & 0.0106 & 0.096 & 0.0049 & \\ \hline \hline \end{tabular}
\end{table} 
Table 2: The simulation result of different number of \(G_{0}\). Figure 3: _Cont._  
Figure 3: Simulation results of six typical test functions. (**a**) Griewank function; (**b**) Quartic function; (**c**) Rastrigin function; (**d**) Schwefel function; (**e**) Shekel’s Foxholes function; (**f**) Kowalik’s oxholes function. Figure 4: _Cont._  
Figure 5: _Cont._  
Seen from the above simulation results, there are most times to obtain the optimal solution when the \(\alpha\) value is 15, followed by 10. In addition to function \(f_{1}\), \(f_{4}\) has a greater difference among the optimal solutions. The optimal solutions of other functions are close. The running time of low dimensional functions is less than the high dimensional functions. Comparing the shortest running times, the function \(f_{6}\) is only a half of function\(f_{1}\), which shows that low dimensional function has better convergence performance. Seen from the points in convergence curves, when \(\alpha\) is 10, the most obvious optimization performances of \(f_{1}\), \(f_{4}\), \(f_{6}\) have converged to the optimal value.