## 3 Metaheuristic Optimization Algorithms  
The metaheuristic optimization algorithms are population-based algorithms that use numerous agents following various pathways [33; 34]. In this study, the proposed voltage management strategy is evaluated in the low voltage distribution system. The primary objective here is to plan multiple community BESS, optimally through a network-level optimization. As it was mentioned above is that NNA is used as the upper-level optimization. The NNA is introduced in the next subsection. Neural Network Optimization Algorithm  
NNA is a modern metaheuristic optimization algorithm, which is motivated by the concept of Artificial Neural Networks (ANN). NNA utilizes the same structure and principle of ANNs to generate the algorithm candidate solutions and solve complex optimization problems. In this study, the objective function to be minimized is presented in Equation (2). Details of the NNA are as follows [30]:  
* Select the pattern solutions population \(\left(N^{Pop}\right)\) and set the lower \(\left(low\right)\) and upper \(\left(up\right)\) bounds and the maximum number of iterations of the algorithm \(\left(iter_{max}\right)\). In this study, the \(N^{Pop}\) is set to 50. Since we have three variables to optimize, the \(low\) and \(up\) bounds are set to adhere to BESS rated capacity, rated power, and the number of buses in the examined test feeder. For \(iter_{max}\), 250 is used in this study. * Initiate the population of pattern solutions with the predetermined bounds using the following formula: \[X_{mn}=low[n]+rand()\times\left(Upp[n]-low[n]\right)\] (13)
* Evaluate the fitness values of the initial population using Equation (2). * Randomly generate the weigh matrix, values of which are selected based on a uniform distribution between zero and one and the summation of these values should be below or equal to one. See Equations (14) and (15). \[\sum_{j=1}^{N^{pop}}w_{ij}(t)=1,\hskip 14.226378 pti=1,2,3,\ldots,\ N^{pop}\] (14) \[w_{ij}\ \in U(0,1),\hskip 14.226378 pti,j=1,2,3,\ldots,\ N^{pop}\] (15) \begin{table}
\begin{tabular}{c c c} \hline \hline
**Specification** & **Parameter** & **Value** \\ \hline AC voltage & \(AC\) & \(120/240\) V \\ Usable energy & \(M_{max}\) & \(13.5\) KWh \\ Maximum charging/discharging power & \(S_{max}\) & \(5\) kW \\ Minimum charging/discharging power & \(S_{min}\) & \(0\) kW \\ Maximum state of charge & \(SOC_{max}\) & \(100\%\) \\ Minimum state of charge & \(SOC_{min}\) & \(10\%\) \\ Round trip efficiency & \(\eta\) & \(90\%\) \\ \hline \hline \end{tabular}
\end{table} 
Table 1: The specification of the battery energy storage system. Figure 2: System configuration of home-connected PV and BESS. where \(t\) is the iteration number. Determine the target solution \(\left(X^{Target}\right)\) and the associated target weight \(\left(W^{Target}\right)\). Since NNA has only one target response, the target solution and weight are selected from the population weight (weight matrix). Create a new pattern solution \(\left(X^{new}\right)\) and update the pattern solutions using Equations (16) and (17). \[X_{j}^{\overset{\rightarrow}{New}}(t+1)=\sum_{i=1}^{N^{pp}}w_{ij}(t)\times \overset{\rightarrow}{X_{i}}(t),\hskip 14.226378 ptij=1,2,3,\ldots,\ N^{pop} \tag{16}\]  
\[\overset{\rightarrow}{X_{i}}(t+1)=\overset{\rightarrow}{X_{i}}(t)+X_{i}^{ \overset{\rightarrow}{New}}(t+1),\hskip 14.226378 ptii=1,2,3,\ldots,\ N^{pop} \tag{17}\]  
Update the weight matrix \(\left(W\right)\) using Equation (18), taking into consideration the constraints in Equations (14) and (15). \[W_{i}^{\overset{\rightarrow}{Updated}}(t+1)=\overset{\rightarrow}{W_{i}}(t)+ 2\times rand\times\left(W_{i}^{\overset{\rightarrow}{Target}}(t)-\overset{ \rightarrow}{W_{i}}(t)\right),i=1,2,3,\ldots,\ N^{pop} \tag{18}\]  
Evaluate the bias condition. If \(rand\leq\beta\) conducts that bias operator, see Equation (19) for both the new position of pattern solutions and the updated weight matrix.