# Bacterial Foraging-Based Algorithm for Optimizing the Power Generation of an Isolated Microgrid
## 6 Conclusions  
Two algorithms, TS-MBFOA and NTS-MBFOA, based on the foraging of the _E. Coli_ bacteria were implemented to solve a CNOP minimizing an isolated microGrid (IMG). An IMG is an intelligent energy network that uses distributed generators allowing the exploitation of renewable energy sources, such as wind and solar, as well as fuels (e.g., diesel, petrol). The CNOP is based on a mathematical model, wherein the optimum values of a network of power generation devices are computed to supply a load during 24 h. In essence, every hour an optimization problem is solved, according to the conditions and operation restrictions of the network. As a result, we generate behavior graphs of the optimal powers, i.e., the sum of the 24 objective functions, which represents the best solution.  
Two experiments were designed to monitor the behavior of the algorithms while minimizing the IMG. In the first experiment, 87 independent runs were conducted with different values to the parameters of the TS-MBFOA algorithm in order to obtain the best configuration of parameters that allows the optimal performance of the algorithm. As a result of this experiment, we obtained that the best performance of the algorithm was using a population of 10 bacteria, eight chemotaxis cycles, five bacteria to reproduce every 60 generations with a step size of 0.015 and a scaling factor of 0.040. We also noticed that, the higher the number of bacteria and chemotaxis cycles, the longer the execution time required by the algorithm.  
In the second experiment, 30 independent runs of both TS-MBFOA and NTS-MBFOA were conducted, using the parameter tuning obtained in the previous experiment. The best solution obtained by TS-MBFOA was \(-\)551,960.121 and by NTS-MBFOA was \(-\)549,369.785, where a lower value is better, meaning economic savings. Both results are the sum of the 24 objective functions.  
A non-parametric Wilcoxon signed rank test was conducted for the 30 best solutions of each of the algorithms, resulting in a significant difference between both algorithms.  
Results obtained by TS-MBFOA and NTS-MBFOA were compared against the LSHADE-CV algorithm, where the best solution found by our proposals were better, although at a higher computational cost.  
According to results, TS-MBFOA found a better _numerical_ solution to the problem. From the mechatronic point of view, however, it is important to notice that NTS-MBFOA obtained a better result because it favors the useful life both of the diesel generator and the energy storage system (battery). This conclusion arises from a behavior analysis of each resource used by the IMG during the 24 h of a day.  
As future work, more experiments will be conducted on TS-MBFOA and NTS-MBFOA to reduce the number of evaluations and find highly competitive solutions against other state-of-the-art algorithms. We are motivated in advance in the study of IMG for a real implementation in a low-consumption energy housing.  
Conceptualization, B.H.-O. and E.A.P.-F.; Data curation, B.H.-O.; Formal analysis, B.H.-O. and M.B.C.-Y.; Funding acquisition, B.H.-O. and E.A.P.-F.; Investigation, B.H.-O., J.H.-T., O.C.-B. and M.B.C.-Y.; Methodology, B.H.-O., O.C.-B., M.B.C.-Y. and E.A.P.-F.; Project administration, B.H.-O. and E.A.P.-F.; Resources, B.H.-O. and E.A.P.-F.; Software, B.H.-O.; Supervision, B.H.-O. and E.A.P.-F.; Validation, B.H.-O., M.B.C.-Y. and E.A.P.-F.; Visualization, B.H.-O., [PERSON]-T. and O.C.-B.; Writing--original draft, B.H.-O., [PERSON]-T. and O.C.-B. Writing--review & editing, B.H.-O. and O.C.-B.  
This work was supported by the COFAA and SIP of the Instituto Politecnico Nacional, Mexico for the publication.  
To CONACYT (Ministry of Science and Technology of Mexico) for supporting the National System of Researchers.  
The authors declare no conflict of interest.