# Bacterial Foraging-Based Algorithm for Optimizing the Power Generation of an Isolated Microgrid
## 1 Introduction
Here, \(\vec{x}\in\mathbb{R}^{n}\) such that \(n\geq 1\), is the solution vector \(\vec{x}=[x_{1},x_{2},\ldots,x_{n}]^{T}\), where each \(x_{i}\), \(i=1,\ldots,n\) is delimited by the lower and upper limit \(L_{i}\leq x_{i}\leq U_{i}\); \(m\) is the number of inequality constraints and \(p\) is the number of equality constraints (in both cases, the constraints can be linear or non-linear). If we denote by \(F\) the feasible region (where all the solutions that satisfy the problem are found) and by \(S\) the entire search space, then \(F\subseteq S\). Metaheuristics are well-known algorithms, most of them are inspired by nature, that have successfully solved CNOPs. Metaheuristics are divided into two broad groups: (1) evolutionary algorithms (EAs), whose operation is based on emulating the process of natural evolution and survival of the fittest [9], and (2) swarm intelligence algorithms (SIAs) that base their operation on social and cooperative behaviors of simple organisms such as insects, birds, and bacteria [10]. From the initial ideas of [PERSON] [11], in 2002 [PERSON] proposed a novel SIA called Bacterial Foraging Optimization Algorithm (BFOA) [12], based on E.Coli bacteria foraging. In BFOA, each bacterium _E. Coli_ tries to maximize the energy obtained per unit of time spent on the foraging process, while avoiding harmful substances. Moreover, bacteria can communicate with each other by segregating certain substances. There are four main processes in BFOA: (1) chemotaxis (swim-tumble movements), (2) swarming (communication between bacteria), (3) reproduction (cloning of the best bacteria), and (4) elimination-dispersal (replacement of the worst bacteria). Bacteria are potential solutions to the problem and their location represents the values of the problem decision variables. Bacteria can move (generate new solutions) through the chemotaxis cycle; additionally, a movement through the attraction of solutions in promising areas of the search space is generated (as it allows the reproduction of the best solutions). Finally, those bacteria located in areas of low quality are deleted. In 2009, a simplified BFOA version was proposed, called modified bacterial foraging optimization algorithm (MBFOA) [13], which implements fewer parameters with respect to the original BFOA. MBFOA includes a mechanism for the management of constraints based on feasibility rules, consistingof (a) between two feasible solutions, that with the best value in the objective function is selected, (b) between a feasible solution and a non-feasible solution, the feasible one is selected, and (c) between two non-feasible solutions, the one with the smallest amount of constraint violations is selected [14]. MBPOA has been used to solve a number of problems of a different nature. For example, solving a set of chemical and mechanical engineering design problems, obtaining competitive results [13], and the solution of a bi-objective mechanical design problem with constraints [15]. In 2016, a recent algorithm based on MBFOA, called two-swim MBPOA (TS-MBFOA) [16], was proposed. This version includes an operation similar to the mutation operator, used in EAs, as a swimming operator within the chemotaxis process. It also implements a random swim in the chemotaxis process, along with a skew mechanism for the initial population based on the variables range. TS-MBFOA has been used to solve real-world problems of mechatronic design and also in the nutrition field by generating successful healthy menus [17]. There is a number of proposals in the specialized literature using metaheuristics algorithms to optimize particular mathematical models minimizing or maximizing an MG. Some of the EAs employed are Differential Evolution and Genetic Algorithms. SIAs employed are limited to particle swarm optimization (PSO) and BFOA. Other paradigms such as artificial neural networks, harmony search, and hybridizations between harmony search and differential evolution have also been used [18; 19; 20].