## 3 Solution Approach
### Particle Swarm Optimization (PSO)  
PSO [44] is a nature-inspired optimization technique that draws inspiration from the collective behavior of groups in nature, like the flocking of birds or the schooling of fish. PSO works by simulating the movement of a swarm of particles through a multi-dimensional search space, aiming to find the best solution for a given problem. It is particularly effective for solving optimization problems with numerous variables and complex, non-linear objective functions. The objective function stated in Equation (1) is maximized with the PSO (particle swarm optimization) algorithm. Each member of the group in PSO is characterized by a velocity vector and a position vector in the search space. With each iteration, the particles' new positions are determined based on their velocity and current position in the search space.  
In the problem's dimensional space, solutions are represented by matrices with corresponding dimensions. Therefore, the position and velocity of PSO can be denoted by matrices of size \(X_{i}=[x_{i,1},x_{i,2},x_{i,D}]\) and \([V_{i}=v_{i,1},v_{i,2},v_{i,D}]\), respectively, where \(x_{i,j}\) represents the value of position \(x_{i}\) in dimension \(j\) and \(V_{i,j}\) represents the value of velocity \(V_{i}\) in dimension \(j\). The operations of the algorithm are also conducted as matrix operations, and the velocity and position update models of the standard PSO are represented as follows:  
\[V_{i,j}^{t+1}=w*(Vmax_{i,j}^{t})+c1*r1*(gBest_{j}^{t}-x_{i,j}^{t})+c2*r2*(pBest_{ i,j}^{t}-x_{i,j}^{t}) \tag{20}\]  
Figure 3: Load flow calculation using backward/forward sweep method.  
\[x_{i,j}^{t+1}=x_{i,j}^{t}+V_{i,j}^{t+1} \tag{21}\]  
\[w=w_{Max}-1*\frac{(w_{Max}-w_{Min})}{iters} \tag{22}\]  
where \(j=1,2,...D\) and \(c1\) and \(c2\) are constants representing the acceleration coefficients that control the particle's movement. Parameters \(r1\) and \(r2\) are random numbers following a Gaussian distribution and taking values between 0 and 1, and \(t\) represents the current iteration number. \(gBest_{j}^{t}\) represents the value of the \(j^{th}\) dimension of the globally optimal particle in the previous \(t\) iterations, and \(pBest_{i,j}^{t}\) represents the value of the \(j^{th}\) dimension of the optimal position of particle \(i\) in the previous \(t\) iterations. The inertia weight parameter, or \"\(w\)\", is a term used in optimization methods like PSO. The inertia weight (\"\(w\)\") in PSO maintains a balance between the local and global search space exploration. Throughout the optimization process, Equation (22) modifies '\(w\)' to progressively lower its value over iterations, which is a popular strategy to balance exploration and exploitation (\(w_{Max}\) is the maximum inertia weight, \(w_{Min}\) is the minimum inertia weight, and \(t\) is the number of iterations).  
The algorithm involves four steps:  
* Initialization: Initialize a population of particles with random positions and velocities in D dimensions in the search space.
* Estimation: Estimate the fitness of each particle in this population.
* Update: Calculate the speed of each particle and move to the next position.
* Termination: Stop the algorithm if it reaches a certain stop criterion; otherwise, go back to the estimation stage.  
The PSO algorithm relies on the interplay between particles' individual experiences (pBest) and the collective best experience of the swarm (gBest) to navigate the search space effectively and converge towards promising regions. The parameters used in the PSO study are \(V_{max}=4\); \(w_{Max}=0.9\); \(w_{Min}=0.2\); \(c1=c2=2\); \(\dim=2\); and PopSize = 5.