## 1 Introduction  
Electrical distribution networks cover hundreds of kilometers around urban and rural areas in medium- and low-voltage levels to provide electrical energy services to all end users (i.e., residential, commercial, and industrial users) [1]. The main characteristic of these networks is that these are built up in a radial configuration to reduce the investment costs of protection schemes and additional conductors [2]; however, this feature significantly increases the number of power losses in all conductors of the network since the active and reactive power travels along the grid from the substation to all the load terminals [3]. To reduce the annual operating costs of a distribution network (urban or rural), typical solutions based on reactive power compensation [4]; grid reconfiguration schemes [5]; or shunt active power compensation with unity power factor [6]; and with variable power factor [7] are commonly found in the specialized literature. However, due to the increasing interest in the inclusion of renewable energy resources at medium- and low-voltage levels, the problem of optimal power losses reduction, although an important problem, passes to a second plane for utilities, since the main advantage of using renewables is to reduce the amount of electrical energy purchased from the conventional power system (i.e., hydro-thermal power systems) for distribution networks interconnected with the main transmission network [8]; or the number of diesel gallons in the case of isolated distribution networks [9], in addition to improving the grid efficiency in hybrid systems [10]. In addition, the increasing usage of PV sources was also promoted by the reduction in PV cells due to the advances in power electronics and generation materials such as silicon, perovskite and tandem solar cells, as presented in [11]. An important study prior to the optimal placement and sizing of PV sources in electrical networks is to explore the potential construction sites for objects that might cause shading, including high-voltage transmission towers, whose shading effects can be significant due to their height since these natural or artificial obstacles can significantly reduce the expected efficiency of the PV generation system. All of these aspects were carefully analyzed by the authors of [12]. In the specialized literature, multiple approaches focused on the optimal integration of renewable energy in distribution levels were proposed, some of which are discussed below: the authors of [13] presented the application of the recently developed vortex search algorithm to locate and estimate the size of solar photovoltaic (PV) sources in distribution networks. The classical IEEE 33- and 69-node test feeders were employed to validate their numerical results, which were compared with the mixed-integer nonlinear solvers available in the GAMS software. Numerical results demonstrated the effectiveness of the proposed methodology; however, the authors focused their attention on the reduction in the number of electrical energy losses for a typical operative day which can be an unrealistic approach due to the final costs of PV sources that are not covered by the reduction in the total cost regarding energy losses. In [14;15] [PERSON] et al. have presented two approaches for integrating renewable generation based on wind and solar power in distribution networks. The main contribution of the authors of these studies is the possibility of generating reactive power with the power electronic converters that becomes the interface of the renewable generators with the power system.