## 1 Introduction
As objective functions, the minimization of active power losses, the voltage stability index, and the load capacity factor of the distribution lines were considered. The main feature of this approach is that the optimization process was carried out only under maximum load conditions, which is not considered a suitable scenario given the potential oversizing of the compensating devices, since the consumption of active and reactive power are variable inputs. The authors of [14] proposed a multi-objective fuzzy approach based on ant colony optimization in order to solve the simultaneous and proximate reconfigurations (sizing and placement) of PV sources and D-STATCOMs in distribution systems. The objective was to minimize network losses and to improve voltage profiles and feeder load balancing operation characteristics. This methodology was validated in the IEEE 33-bus grid with excellent numerical results. The authors of [15] presented a heuristic method based on voltage and power loss indexes in order to locate and size D-STATCOMs in radial electrical distribution networks. Numerical validation of this heuristic approach was performed on the IEEE 33-bus test feeder. However, the authors only considered maximum load conditions. Table 1 summarizes the different algorithms used in the literature to solve the problem concerning the placement and sizing of D-STATCOMs in distribution networks. The main features of the optimization methods in Table 1 are the following: (i) the most common function is the minimization of energy losses, and (ii) the studied problems show two tendencies: the first is related to metaheuristics, and the second offers convex formulations or approaches that combine convex and combinatorial methods. Based on the aforementioned literature review, the problem of reactive power compensation in power systems is still an area of interest for both academia and the industry. Therefore, this research article proposes the following contributions:  
1. We provide a new solution method based on application of the generalized normal distribution optimizer (GNDO) for locating and sizing D-STATCOMs in distribution networks with radial and meshed topologies while using a discrete-continuous codification. 2. We combine the GNDO approach with an efficient power flow multi-period approach that allows solving of the technical constraints of the optimization problem, i.e., power balance, voltage regulation, and device capabilities, among others. 3. We improve the final solution obtained with the proposed master-slave optimizer by using the set of nodes where the D-STATCOMs must be located as inputs for the optimal reactive power flow (ORPF) problem, aiming to further minimize the final expected annual operating costs of the distribution grid. Note that the selection of the GNDO as a solution technique to address the optimal location and sizing problem for D-STATCOMs in distribution networks is based on three facts:  
1. The GNDO is a metaheuristic method inspired by the classical theory of normal probability distributions. It considers an initial population that evolves throughout the iterative process, considering the means and the standard deviation as advance parameters. 2. The computational implementation of the GNDO is simple and requires only a few mathematical programming skills to adapt it to any optimization problem that includes binary and continuous variables. 3. Multiple reports in the specialized literature have confirmed that the GNDO approach is efficient at solving complex optimization problems such as the placement location of renewable energy resources in AC and DC networks [24; 25] and parameter extraction for photovoltaic models [26], among other optimization problems.