# Bacterial Foraging-Based Algorithm for Optimizing the Power Generation of an Isolated Microgrid
## 5 Results
### Second Experiment  
We ran independently both TS-MBFOA and NTS-MBFOA 30 times with the parameter configuration obtained in the previous experiment. The statistical results of both algorithms are shown in Table 5. The standard deviation is calculated using the best solution found in each of the 30 independent runs, where the best solution is the sum of the 24 objective functions in a run. TS-MBFOA obtained the best solution with a value of \(-\)551,960.121 followed by NTS-MBFOA with a value \(-\)549,369.785 in the objective function. Values are negative because they represent an economic saving when operating with RES, instead of using only the diesel generator and the ESS (battery). The more energy supplied by the RES and the less supplied by the DG and the ESS, the higher the savings. A convergence graph was generated for TS-MBFOA and NTS-MBFOA using the data of the independent run number 15 (representing the median). In Figure 4, we can observe the behavior of each algorithm during the 24 h, both algorithms starting with infeasible solutions. For the NTS-MBFOA, feasible solutions arise in the first \(\sim\)10 generations, except for hours 16:00, 17:00, and 23:00, where the algorithm requires more generations. For the TS-MBFOA, solutions are found beyond 200 generations. As can be observed in Figure 4, the NTS-MBFOA converges more quickly on feasible solutions, which indicates a lower computational cost than TS-BFOA. With respect to the quality of the solutions found by the algorithms in each of the 24 h, the convergence graphs indicate that both algorithms behave differently along the day, but in hours 00:00, 02:00-04:00, 06:00-07:00, 13:00-14:00, 16:00-18:00 and 22:00-23:00 the TS-MBFOA algorithm generates better feasible solutions. In the rest of the hours, NTS-MBFOA generates a better solution to the objective function. In run number 15, the TS-MBFOA obtained a value of \(-\)525,869.49 in the objective function, in the case of NTS-MBFOA the value found was \(-\)422,989.41. \begin{table}
\begin{tabular}{c c} \hline \hline
**Parameter** & **TS-MBFOA/NTS-MBFOA \\ \hline \(S_{b}\) & 10 \\ \(N_{c}\) & 8 \\ \(S_{r}\) & 5 \\ \(R\) & 0.015 \\ \(\sigma\) & 0.040 \\ \(RepCycle\) & 60 \\ \(GMAX\) & 15,000 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Parameters of TS-MBFOA and NTS-MBFOA. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Statistic** & **LSHADE-CV** & **TS-MBFOA & **NTS-MBFOA** \\ \hline Best & \(-\)5.33E+05 & \(-\)5.52E+05 & \(-\)5.49E+05 \\ Median & \(-\)5.32E+05 & \(-\)4.98E+05 & \(-\)4.92E+05 \\ Average & \(-\)5.32E+05 & \(-\)4.81E+05 & \(-\)4.89E+05 \\ Worst & \(-\)5.32E+05 & \(-\)3.45E+05 & \(-\)3.78E+05 \\ Std. & 8.73E+01 & 4.86E+04 & 4.40E+04 \\ Evaluations & 2.88E+05 & 1.20E+06 & 1.20E+06 \\ \hline \hline \end{tabular}
\end{table} 
Table 5: Basic Statistics of the results obtained by TS-MBFOA and NTS-MBFOA compared against an Evolutionary Algorithm. Std is the standard deviation. Results of bacterial foraging-based algorithms are better when compared against the LSHADE-CV algorithm. However, a higher number of evaluations is required. Parameters reported by the authors of LSHADE-CV algorithm are presented in Table 6. LSHADE-CV dynamically tuned the parameters using operators such as parameter memory and linear population reduction [35]. The best numeric solution was \(-532\),508.057. Besides, BFOAs obtained a better median, average, standard deviation and the worst value found is close to the average. Analyzing the results of the TS-MBFOA and the NTS-MBFOA, we observed that NTS-MBFOA has a lower standard deviation than the TS-MBFOA because it finds the better among the worst results, that is, results closer to the average. To know if there is a significant difference between the NTS-MBFOA and TS-MBFOA algorithms, we conducted the non-parametric Wilcoxon Signed Rank Test, with a confidence level of 95% to the set of the 30 best solutions obtained of the 30 independent runs of each algorithm.