{'fraction_non_alphanumeric': 0.029455420206776536, 'fraction_numerical': 0.018067355921793427, 'mean_word_length': 4.8158952225033484, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Optimal Selection and Location of Fixed-Step Capacitor Banks in Distribution Networks Using a Discrete Version of the Vortex Search Algorithm

: This paper deals with the problem of the optimal selection of capacitor banks in electrical AC distribution systems for minimizing the costs of energy losses during a year of operation through a discrete version of the vortex search algorithm (DVSA). This algorithm works with a hypersphere with a variable radius deﬁned by an exponential function where a Gaussian distribution is used to generate a set of candidate solutions uniformly distributed around the center of this hypersphere. This center corresponds to the best solution obtained at the iteration t, which is initialized at the center of the solution space at the iterative search beginning. The main advantage of combining the exponential function with the Gaussian distribution is the correct balance between the exploration and exploitation of the solution space, which allows reaching the global optimal solution of the optimization problem with a low standard deviation, i.e., guaranteeing repeatability at each simulation. Two classical distribution networks composed of 33 and 69 nodes were used to validate the proposed DVSA algorithm. They demonstrated that the DVSA improves numerical reports found in specialized literature regarding the optimal selection and location of ﬁxed-step capacitor banks with a low computational burden. All the simulations were carried out in MATLAB software.


Introduction
Electrical distribution networks are responsible for transferring energy from the transmission system to industrial, commercial, and domestic users [1]. The convectional configuration of these networks is radial; this means their configuration is like a tree where each user has one main supply source [2,3]. This implies that the energy reaches the end-users through the primary feeder of the network. Therefore, this increases the power losses of the system [4]. Additionally, the voltages of the end-users may be below the established limits. In order to improve the operation of the system, various strategies have been proposed, such as phase balancing [5], shunt capacitor placement [6], distributed generator placement [7], reconfiguration [8], location of energy storage systems [9], series compensation [10], etc.
One of the above-mentioned strategies being the most economical and easiest to implement is the optimal installation of shunt capacitors [11]. This strategy allows reducing power losses, improving voltage drop, and increasing power factor. However, shunt capacitor installation has some challenges, such as its placement and sizing, which are very important since if they are carried out improperly, they can increase the power loss and decrease the voltage profile of the distribution networks. Therefore, the optimal capacitor installation in distribution networks helps to reduce the annual operating costs caused by power losses by about 30% with low investments and minimum grid interventions, as reported in [6]. Thus, the optimal location problem of capacitor banks in distribution networks has been widely studied in the scientific literature; some of these works are presented below.
The location and sizing of capacitors in distribution systems have been tackled with several methodologies and optimization algorithms. The authors of [12] proposed a mixed-integer linear programming by using a suitable linearization that maximized the net present value of cash flow. In [13], a mixed-integer nonlinear programming (MINLP) approach was presented for radial and mesh distribution systems. In reference [14], a fuzzy-based approach mixed with the simulated annealing technique was proposed. The authors of [15] presented a combination between a loss sensitivity factor (LSF) and a particle swarm optimization (PSO) with its discrete version, while the LSF determines the node placement and the discrete PSO provides the capacitor size. In [16], a mixed approach that contemplates the LSF and voltage stability index (VSI) for the optimal capacitor installation considering all possible load variations was developed. The authors of [17] implemented two methods, a sensitivity analysis and the gravitational search algorithm (GSA). The sensitivity analysis reduces search space to find an accurate solution, while the GSA allocates the capacitor values. In reference [18], new PSO approaches, including Gaussian and Cauchy probability distribution functions, were described; whereas in [19] an improved harmony algorithm (IHA) mixed with LSF and VSI was presented. The LSF and VSI were used for node location, while the IHA approach provided the capacitor size. Other optimization algorithms that have been implemented for the optimal location and sizing of capacitors in distribution systems are two-stage method (TSM) [20], fuzzy-real coded genetic algorithm (FRCGA) [21], flower pollination algorithm (FPA) [22], teaching learning-based optimization (TLBO) [23], memetic algorithm [24], Chu-Beasley-based genetic algorithm [25], plant growth simulation algorithm [26], direct search algorithm [27], hybrid algorithm [28], firefly algorithm [29], and artificial bee colony [30].
Recently, a promissory metaheuristic optimization technique known as the vortex search algorithm (VSA) has emerged to solve complex nonlinear non-convex optimization problems in the continuous domain. Some of these approaches are optimal power flow in AC and DC networks [31][32][33], respectively; optimal selection of analog active filter components [34]; application of the VSA for numerical optimization [35][36][37]; optimal design of offshore and onshore natural gas liquefaction processes [38]; and optimal solution of the inverse kinematics problem of serial robot manipulators with offset wrist [39]; among others. It is worth mentioning that the main advantages of using the VSA in nonlinear optimization problems are the following: (i) its low standard deviation since it works with Gaussian distribution functions for exploring the solution space; (ii) its correct balance between exploration and exploitation of the solution space during the iteration procedure since the optimization search is guided by a variable radius applied on the Gaussian hypersphere that contains all the potential solutions of the current iteration; and (iii) its easy implementation for any programming language via sequential programming. On the other hand, after a careful review of the state of the art, we do not find evidence regarding a discrete version of the VSA applied to mixed-integer nonlinear optimization problems. This is a gap that this research tries to fill in the electrical engineering area by applying this variant of the VSA applied to the issue of the optimal location and selection of fixed-step capacitor banks in distribution networks. Considering the specialized literature, the main contributions of this research can be summarized as follows: The proposal of a discrete version of the VSA (DVSA) to solve the problem of the optimal selection and location of fixed-step capacitor banks in AC distribution networks with low computational effort. The use of a discrete codification implements integer numbers as decision variables that simplify the dimension of the classical binary vectors used in the literature to represent this optimization problem. This codification compacts in a unique stage, the location and sizing problems of capacitor banks, which substantially reduces the processing times. An improvement of the current results reported in the specialized literature for the problem of the optimal location of fixed-step capacitor banks. This paper is organized as follows: Section 2 shows the mathematical formulation for the optimal location and sizing of capacitors in distribution systems. Section 3 explains the proposed methodology to solve the optimal capacitor installation problem. Section 4 describes the test system and capacitor bank information. The next section analyzes the main results. Lastly, the conclusions of the study and the outlines for future research are presented in Section 5.

Mathematical Formulation
The problem of the optimal location and selection of fixed-step capacitor banks in AC distribution networks can be represented with an MINLP model, where (i) the integer characteristic is defined by the possibility of locating (or not) capacitor bank k into an arbitrary node i, which is defined with the integer variable x i,k ; (ii) the mixed nature of the model is giving by the presence of continuous variables such as power injection in slack nodes, and voltage magnitudes v i and angle θ i in all the nodes; (iii) the nonlinear structure is defined by the presence of a trigonometric function in the power balance equations as well as by the products between voltage magnitudes in different nodes. The complete mathematical structure of this MINLP model is described as follows:

Objective Function
The objective function corresponds to the minimization of the total energy cost during a continuous year of operation added to the investment costs in fixed capacitor banks, as presented in (1).
where z is the objective function value; C year k is the installation cost of capacitor bank k with total reactive power injection Q k at any node of the system; C loss kWh is the average costs of the energy losses in the whole distribution network, ∆T is the length of the time period under analysis, i.e., ∆T = 8760 h; Y ij is the magnitude of the admittance matrix that interconnects nodes i and j; v i and v j are the variables associated to the magnitude of the voltages at nodes i and j which have angles δ i and δ j , respectively; and θ ij is the angle of the admittance that relates nodes i and j. Note that C and N are the sets that contain all the capacitor options and the total nodes of the network, respectively.

Set of Constraints
The set of constraints corresponds to a compilation of different operative limitations of any power distribution; these are listed below: where p g i and q g i correspond to the active and reactive power generation in the node i; p d i and q d i are the active and reactive power consumption in the node i; v min and v max are the minimum and maximum voltage bounds, and N ava cap represents the number of capacitors available for installation. The interpretation of the optimization model (1)-(6) is as follows: Equation (1) defines the objective function related to the annual operation cost of the distribution network which is associated with the sum of the investments in fixed-step capacitor banks and the cost of the energy losses produced in all the resistive effects in the distribution lines. Expressions (2) and (3) correspond to the active and reactive power balance constraints per node, respectively. These are the more complex constraints in power system optimization since these are a nonlinear non-affine set of equality constraints with products between voltage magnitudes and trigonometric functions, which are typically solved with numerical methods such as Newton-Raphson or successive approximations [40]. Expression (4) determines the possibility of installing only one type of capacitor bank per node. Equation (5) specifies the fixed number of capacitor banks to be installed in the distribution network. In Equation (6), the voltage regulation constraint is presented, which is a typical operational restriction imposed by the regulatory entities on the distribution company to guarantee a quality service to all the end-users. Remark 1. The optimization model (1)-(6) is an MINLP representation of the problem of the optimal location of fixed-step capacitor banks in distribution networks, where the discrete nature of the decision is an integer. Nevertheless, we select a binary representation by introducing the decision variable x k,i since it facilitates the interpretation of the complete mathematical formulation. Notwithstanding, in the solution methodology (i.e., the next section), we codify it by using its integer structure to simplify the structure of the DVSA.

Solution Methodology
To solve the problem of the optimal location of fixed-step capacitor banks in distribution networks to minimize operating costs in a horizon of one year, this paper used the VSA in its discrete form (i.e., DVSA) as a master optimization stage that is connected with a power flow method in its slave stage. The function of the master stage is to define the set of nodes where the capacitor will be located with their corresponding sizes, while the slave state is entrusted with evaluating the power flow constraints, i.e., the power balance equations defined by (2) and (3).

Vortex Search Algorithm
The VSA is an optimization methodology that allows solving nonlinear non-convex optimization problems with a continuous structure based on the manner of stirred fluids that produce vortex behaviors in pipes [34]. The main characteristic of this approach is that it works with a Gaussian distribution and a variable radius that permits the exploration and exploitation of the solution space during the iterative process [33]. In the literature, the optimal power flow has been successfully solved with the VSA approach by guaranteeing the global optimal value with minimum standard deviations [41]. Even if the VSA works with continuous variables, in this research, we used this evolution strategy to explore and exploit the solution space by rounding these variables to the nearest integer to have a feasible solution for the slave stage.
In general terms, the VSA works with nonconcentric hyperspheres, where the exterior diameter represents the boundaries of the solution variables, and its center represents the current best solution. In the beginning, the center of the hypersphere (i.e., µ 0 ) is defined in (7): where x min and x max represent vectors with dimensions d × 1 that contain the minimum and maximum bounds of the decision variables. A set of solutions is generated around the center of the hypersphere in its neighborhood, which is denoted as C t (s), where t is the iterative counter. Initially t = 0, which implies that C 0 (s) is generated by a random process using a Gaussian distribution in the d−dimensional space. Note that C 0 (s) = {s 1 , s 2 , . . . , s m }, being m the number of candidate solutions. To generate a Gaussian distribution in a multidimensional space, an equation is used as defined in Expression (8).
where x ∈ R d×1 corresponds to a random vector of variables, µ ∈ R d×1 is a simple mean (center) vector, and Σ ∈ R d×d is the covariance matrix. Note that if the diagonal elements of the covariance matrix are equal and the off-diagonal elements in this matrix are zero, then the Gaussian distribution will produce hyperspheres in a d-dimensional space. An easy way to determine Σ, considering zero covariances and equal variances, is defined in (9).
where σ is the variance of the Gaussian distribution and I d×d is an identity matrix. Observe that the standard deviation of the Gaussian distribution (i.e., σ 0 ) can be defined as in Equation (10): where σ 0 is considered the radius of the hypersphere in a d-dimensional space, i.e., r 0 . To attain a correct exploration in the solution space, σ 0 initially corresponds to the biggest possible hypersphere. In addition, during the search process, its radius decreases closer to the optimal solution. At the selection stage, the best solution s 0, * ∈ C 0 (s) is selected and memorized to modify the current center of the hypersphere µ 0 . Each solution s l k needs to lie within its limits before the selection step. The rule employed for this purpose is presented in (11): where h = 1, 2, . . . , m, l = 1, 2, . . . , d, and r l represent uniformly distributed random numbers in the interval {0, 1}. Observe that the best solution s t, ∈ C t (s) is updated if the current solution is better, which updates of the center µ t and its radius r t . One of the essential aspects in the implementation of the VSA approach for nonlinear optimization is the adaptive adjusting of the hypersphere radius by using a variable-step approach [34]. In the original version of the VSA approach, gamma functions were proposed to guide the variation of the radius during the iterative procedure. However, the authors of [33] have simplified it by introducing a decreasing exponential function to make the radius variable as defined in (12): where the parameter α is defined heuristically as 6, and t max is the total number of iterations [33].
To exemplify the codification proposed to represent the problem of the optimal location of fixed-step capacitor banks in distribution networks, i.e., the potential solution s k takes the following form: where the first part of the vector represents integer numbers that define the node where a capacitor is located (i.e., from node 1 to node n). While the second part of the vector corresponds to the size of capacitor bank k, i.e., the integer number that determines the nominal reactive power injection of the capacitor, which varies from 1 to c, being c the capacitor bank with the highest reactive injection capability.
The first part of the codification vector is always revised so that repeated numbers do not appear in order to guarantee the feasibility of each solution to fulfill constraint (4), which is associated with the possibility of locating a unique capacitor bank per node.
In Algorithm 1, the implementation of the VSA to solve discrete optimization problems is summarized.

Algorithm 1:
Proposed master optimization algorithm based on the VSA to define the location and sizing of capacitor banks in distribution networks.
Set the initial best fitness function as z(s best ) = ∞ (minimization problem); 5.
Generate the candidate solutions using a Gaussian distribution around the center µ t with a standard deviation (radius) r t as defined in (9) to obtain C t (s) with d-dimension columns and m rows; 8.
If C t (s) crosses any upper or lower bound, place it within its bounds using (11); 9.
Evaluate the successive approximation power flow problem (see (16)) for each s h in C t (s) and calculate its corresponding fitness function as (13); 10.
Select the best solution s as the argument that produces the minimum z f contained in C t (s); 11. if Retain the best solution attained so far s best ; 16. end 17.
Make the center µ t+1 equal to the best solution s best ; 18.
Update the current radius r t+1 as given by (12); 19. t = t + 1; 20. end 21. Output: 22. The best solution is found for s best and its fitness function is z f (s best ); Note in Algorithm 1 that we speak about the fitness function z f , which allows guiding the exploration and exploitation of the solution space during the iterative procedure. Here, the proposed fitness function takes the following form: where β is a penalization factor that amplifies the effect of a possible voltage violation.

Remark 2.
Note that the power balance equations (see Expressions (2) and (3)) due to their equal nature need to be solved with a numerical method, which will be presented. In addition, the constraints related to the number of capacitor banks available and their installation in nodes are directly guaranteed by the proposed codification, which implies that they are always fulfilled during the iteration procedure.
Remark 3. Algorithm 1 is the general pseudo-code for solving discrete optimization problems via the DVSA in distribution system applications by using a master-slave optimization strategy. Observe that in the case of the optimal location and selection of fixed-step capacitor banks in line 9 of this algorithm, the slave stage (i.e., the successive approximation power flow approach) is implemented, which provides the required information regarding grid performance (voltage magnitudes and angles) to evaluate the fitness function that guides the whole optimization process through the solution space [42].

Successive Approximation Power Flow Approach
The successive approximation power flow method is a powerful tool to solve power flow problems in electrical distribution networks with a convergence guarantee, as recently demonstrated in [40]. This approach works with the complex representation of the power flow problem; i.e., Equations (2) and (3) are rewritten as follows: where S g is a vector that has apparent power injection in all the slack nodes; S d is a vector that contains all the apparent power consumptions in the demand nodes, including the reactive power injections of the fixed capacitor banks installed; and V g and V d are the voltage variables in slack and demand nodes, respectively. Note that Y ·,· is rectangular matrices with the components of the admittance matrix [43].

Remark 4.
The apparent power balance equation (14) is indeed a linear equality constraint where the variables are the amount of apparent power injection in the slack nodes and the voltage values in the demand nodes. Nevertheless, the main complication in the power flow analysis is the solution of (15) since it is a set of nonlinear equations that require numerical methods to be solved.
Note that the solution of (15) can be achieved by rewriting it as a fixed-point theorem form, i.e., V d = f (V d ), as follows: where b is the iterative counter. The convergence of the recursive expression for power flow analysis defined by (16) was proved in [40,44] by using the Banach fixed-point theorem. In addition, the recursive formula (16) is evaluated until the convergence error is reached; i.e., max V b+1 where epsilon is recommended in the literature as 1 × 10 −10 .
One of the main advantages of the successive approximation method for power flow solutions in distribution networks is its speed of convergence. This is because the inverse of the matrix Y dd is calculated one time and stored in memory to accelerate the required computational times in its solution [40].
Finally, Figure 1 presents the flow diagram of the slave optimization stage (i.e., the power flow evaluator) that is responsible of providing all the electrical variables required in the fitness function evaluation.

Test Systems
This section presents the test system information of two radial distribution test feeders largely used in power system optimization. These test systems correspond to the 33-and 69-node test feeders.

Thirty-Three-Node Test Feeder
The 33-node test feeder is a radial distribution network composed of 32 lines and 33 nodes, which is operated at 12.66 kV as the nominal voltage at the substation (i.e., node 1). The electrical configuration of this test feeder is depicted in Figure 2. The total active and reactive power consumptions are 3715 kW and 2300 kVAr, respectively. The initial power losses of the 33-node test feeder are 210.9876 kW. The information for all the branches and the load consumption of the 33-node test feeder is listed in Table A1 located in Appendix A.

Sixty-Nine-Node Test Feeder
The 69-node test feeder is composed of 68 branches and 69 nodes, which are fed with 12.66 kV being the voltage-controlled source located at node 1. The electrical configuration of this test feeder is reported in Figure 3. This feeder has the total active and reactive power demands of 3890.7 kW and 2693.6 kVAr, respectively. The initial active power losses of this system are 224.9520 kW.  The information for all the branches and the 69-node test feeder load consumption is presented in Table A2 located in Appendix A.

Capacitor Banks Information
The set of fixed-step capacitor banks considered in this research are listed in Table 1, which was taken from [22]. Note that C loss kWh is assigned here as 0.0192 US$/kWh-year.

Computational Validation
To solve the general MINLP model (1)-(6) that represents the optimal location problem of fixed-step capacitor banks in AC distribution networks, we employed the MATLAB software version 2020a on a desktop computer with an INTEL(R) Core(TM) i5 − 3550 3.5-GHz processor and 8 GB of RAM running on a 64-bit version of Microsoft Windows 7 Professional.
The selection of the parameters reported in Table 2 was done using a sensitivity analysis between the number of individuals in the population and the number of iterations used by the DVSA. In this sense, we made and explored between 5 to 20 individuals and 500 to 2000 iterations in both test feeders, where we observed the following: (i) low individuals and low iteration numbers make the optimization process faster but the possibility of finding the global optimal solution decreases significantly; (ii) large numbers of individuals and iterations make the optimization process slow but the possibility of finding the global optimal solution increases significantly; and (iii) iteration numbers between 800 and 1500 and population sizes between 8 and 12 allow making the correct balance between total processing times and the possibility of finding the global optimum at each execution. For this reason, we selected a population size with 10 elements and 1000 iterations to parameterize the proposed DVSA.

Number of evaluations 100
It is worth mentioning that for comparative purposes with reference [22], we will consider the possibility of installing three fixed-step banks in the 33-and 69-node test feeders. Table 3 reports the results reached by the proposed DVSA in the 33-node test feeder. These results are compared to reported by the following optimization methods: GSA [17], TSM [20], FRCGA [21], and FPA [22].    Figure 5 illustrates the effect of installing the capacitor banks with the proposed method on the voltage profile for the 33-bus system. Note that the voltage profiles are improved when compared with the base case. In addition, note that the lowest voltage without compensation is 0.9038 pu and with compensation it is 0.9306 pu; this indicates that the lowest voltage improved by 2.93%. It is important to mention that after 100 consecutive evaluations of the proposed approach, the maximum operating costs reached is about US$23, 477.26. This result is better than the result achieved by the FPA. This maximum result obtained by the DVSA corresponds to the location of capacitor banks in nodes 3, 12, and 30 with reactive power injection capabilities of 900 kVAr, 450 kVAr, and 900 kVAr, respectively. In addition, the standard deviation of the proposed DVSA is about US$ 94.36. Regarding processing times, the proposed approach takes about 2.98 s to reach the global optimum. After 100 consecutive evaluations, we note that the probability of finding the global optimum by the proposed DVSA is about 70% for the 33-node test feeder. Figure 6 reports the final operation costs of the 33-node test feeder when the possibility of locating fixed step-capacitor banks varies from one to six. From Figure 6, we can note the following:

Results in the 33-Node Test Feeder
The final operating costs in the 33-node test feeder present higher variations if the number of fixed-step capacitor banks oscillates from one to three. However, after four capacitor banks, the reduction of the operating costs presents saturations. This implies that three capacitor banks are enough to reach adequate optimal solutions with minimum physical interventions inside the grid. The solution of the proposed DVSA for locating two or more capacitors shows better results than approaches in the literature, which means that our approach is efficient in reducing the total operating cost and suitable to be used for utilities in real applications. Table 4 shows the numerical comparisons between the proposed DVSA and approaches in the literature. In this case, it is also carried out by comparing the TLBO [23]. From Table 4, it is possible to confirm that the best approach to reduce total power losses and operating costs by using fixed-step capacitor banks in distribution systems is the DVSA. This is because it saves US$ 545.13 when compared to the solution reported by the FPA. In addition, comparing the total reactive power injections between the proposed approach (1800 kVAr) and the FPA approach (1950 kVAr) shows that the reactive power injection is lower when the proposed approach's configuration is used. This implies that the total operating costs are reduced. Figure 7 depicts the percentage of cost savings when fixed-step capacitor banks are installed in distribution networks. From Figure 7, we can confirm that the best approach to reduce the annual operation costs in distribution networks is our proposal with total cost savings of about 35.38%, which is at least a 1.45% improvement when compared to the FPA, and 6.50% concerning the worst method, i.e., GSA.

Results in the 69-Node Test Feeder
Regarding computational performance, the proposed DVSA takes about 14 s to reach the global optimal solution with an efficiency of 32% after 100 consecutive evaluations. The maximum value achieved by the proposed approach is about US$24, 866.68. This solution implies that even the worst solution of the DVSA is better than the results reported by all the comparative methods, as can be seen in Table 4. In addition, the standard deviation of our approach is about US$98.97, which implies that all the solutions reached by the DVSA are similar. Figure 8 reports the annual operating costs when a different number of capacitor banks are available for installation in the 69-node test feeder.  Figure 9 shows the effect of installing the capacitor banks with the DVSA method on the voltage profile for the 69-bus system. Note that the voltage profiles are improved when compared with the base case. Note that the lowest voltage without compensation is 0.9092 pu and with compensation it is 0.9308 pu; this indicates that the lowest voltage improved by 2.37%. From Figure 8 we can observe the following: (i) The problem of the optimal location of fixed-step capacitor banks in distribution networks reaches the best solutions when the number of capacitor banks is between two and five since after six the objective function will increase again, as is the case of the 69-node test feeder. This behavior can be attributed to the discrete nature of the decision variables since the minimum size of the capacitors is about 150 kVAr; and (ii) the solutions reported by our proposal for two or more capacitors are better than all the comparison methods.

Additional Comments
Considering the numerical validations reported in this research, it is worth mentioning the following: To verify that the proposed DVSA can find the optimal global solution for both test feeders, we implemented an exhaustive search algorithm to evaluate each possible combination of nodes for all possible capacitor sizes by using the successive approximation power flow method embedded in nested loops. After some hours of evaluation, this exhaustive search finds the same solutions reported in Tables 3 and 4, implying that these solutions are indeed the global optima. Regarding processing times of the proposed DVSA to select and locate fixed-step capacitor banks in AC distribution networks, it can be noted that after 100 consecutive evaluations in the case of the 33-node test feeder the average processing time is about 1.33 s, and in the case of the 69-node test feeder this time is about 4.01 s. These results demonstrate the low-computational effort required by the proposed approach to achieve the optimal solution. Note that the proposed DVSA for optimal location and selection of fixed-step capacitor banks in distribution networks are easily extended to multiple periods of analysis (i.e., considering load curves) by adding the sub-index t in all the voltages, angles, and power in the mathematical model (1)-(6) (see optimization model (A1)-(A6) reported in Appendix B) since the optimal location and size of the capacitors is uncoupled in time. This implies that the complication in the implementation is only associated with the number of power flow evaluations required in the slave stage. These implementations will be presented in the next section.

Optimal Location of Capacitors Considering a Variable Load Curve
To evaluate the optimization model that defines the optimal selection and location of fixed-step capacitor banks in the AC distribution system more realistically. We reformulated the mathematical model (1)-(6) to include the time-varying dependence as defined in Appendix B (see the mathematical model (A1)-(A6)). To model the daily demand behavior, we consider the typical residential demand curve in the Colombian power system reported in [3]. This demand curve is plotted in Figure 10.  Table 5 presents the numerical results in both test feeders considering the daily load behavior presented in Figure 10. From results in Table 5, we can observe that: In the 33-node test feeder, the initial energy losses considering the daily load behavior (see Figure 10) are about 2508.634 kWh/day, which are reduced to 1720.669 kWh/day after the installation of three fixed-step capacitors in nodes 12, 24, and 30 with nominal rates of 300 kVAr, 300 kVAr, and 750 kVAr, respectively. Note that these capacitors reduce the costs of the energy losses by 31.04%. The selected nodes in the case of the 33-node test feeder coincide for the cases of peak hour and daily load behavior. However, in the second case, their sizes have been reduced from 450 kVAr to 300 kVAr and from 1050 kVAr to 750 kVAr. It is worth mentioning that the reduction of sizes is an expected result because considering variable load behaviors, the expected reductions regarding power losses minimization are moderated in comparison to the load peak case; i.e., these pass from US$12191.17 (peak load case) to US$5514.78 (load daily load variation case).
In the case of the 69-node test feeder the initial daily energy losses without capacitors is about 2666.286 kWh/day, which are reduced to 1800.283 kWh/day. This reduction is reached after locating the fixed-step capacitor banks in nodes 11, 21, and 61 with nominal rates of 300 kVAr, 150 kVAr, and 900 kVAr, respectively. Observe that the annual operational costs are reduced by 32.48% regarding the base case reported in Table 5.
When comparing the location of the capacitor banks for the cases of load peak case and time-varying load behavior, it can be observed that the nodes 11 and 69 remain constant in both scenarios. While the node 18 is changed by the node 21 in the case of variable load behavior. This variation demonstrates that it is advisable for the optimal location of capacitor banks in distribution networks to consider a realistic load scenario instead of just the peak load case, since the solutions in the peak case could not be the same when taking charge variations into account.
Regarding the computational performance of the proposed DVSA to select and locate fixed-step capacitor banks in AC distribution networks, we can mention that; (i) after 100 consecutive evaluations of the proposed approach in the 33-node test feeder, about 78% of the solutions are the same-reported in Table 5. In the case of the 69-node test feeder, the effectiveness of the proposed approach is about 25%; and (ii) the average processing times after the 100 consecutive evaluations are 28.87 s and 152.57 s for the 33-and 69-node test systems, respectively. These results demonstrate the robustness of the proposed optimization method regarding the possibility of finding optimal solutions as well as the low-computational effort required to compute them.

Conclusions and Future Works
In this paper, a new DVSA was proposed to address the problem of the optimal selection and location of fixed-step capacitor banks in AC distribution networks. The objective function analyzed focused on minimizing the annual operating costs associated with grid energy losses during the peak hour. Numerical results demonstrated that for both test feeders with three capacitor banks, the annual operating costs were reduced at least 35%. In addition, the proposed approach had low computational effort since the average processing time for the 33-node test feeder was about 1.30 s, while in the 69-node test feeder, this was about 4.01 s. One of the main characteristics of the proposed DVSA lies in employing a unique codification that permits representing the problem of the optimal location and sizing of fixed-step capacitor banks. This prevents the usage of embedded metaheuristics to solve this problem. An extension to a daily operative behavior considering a Colombian typical load curve was analyzed for both test feeders in order to consider a more realistic case. Simulations in these operative conditions showed that the expected reductions in the annual operative costs are considered minor compared to the peak load case. However, these can be regarded as near to the real operation conditions expected for utilities in physical applications.
After 100 consecutive evaluations, the proposed DVSA achieved the best solutions for the 69-node and 33-node test feeders at 32% and 70% of the times in the case of load peak operation conditions, respectively. For the case of the time-varying load behavior, the best solutions were achieved at 78% and 25% of the times for the 33-and 69-node test feeders. The standard deviation index demonstrated that all the solutions achieved by this approach are similar. Additionally, they improved total power losses and decreased operating costs compared to the other methods. Regarding processing times in the case of the load curve, the proposed DVSA method takes less than 160 s to deal with the optimal solution in both test feeders, which can be considered a highly efficient methodology, since the location of capacitor banks in AC distribution networks are considered a planning problem where days or weeks are required to the physical implementation.
For future work, it will be possible to address the following problems: (i) propose a convex formulation of the optimal power flow problem in AC distribution networks that can be used in a master-slave strategy with a branch and bound method to guarantee the global optimal solution of the problem addressed in this research; (ii) employ the proposed DVSA method to solve the problem of the optimal location and sizing of distributed generators in AC by using a compact codification that takes into account discrete variables regarding nodes and continuous ones associated with the optimal sizing of these generators; and (iii) analyze the proposed methodology including voltage and current harmonics in the test systems.

Appendix B. Time-Varying Optimization Model
To extend the optimization model (1)-(6) in order to consider time-varying load effects, here, we reformulated it, by adding the sub-index t as follows: Note that in this model ∆t is defined as 365 days and the cardinality of the set T is 24 h. Note that in this model we assume that the hourly curve is practically the same during the whole year since it is based on the Colombian consumption where seasons do not have incidence (i.e., an equatorial country).