## 1 Introduction
### State of Art  
In the scientific literature, there are numerous studies that combine distribution network reconfiguration, DG integration, optimization of DG placement and sizing, and the implementation of optimal power flow (OPF). However, the approach presented in this work introduces a subtle but significant variation from the existing literature. In [13], [PERSON] et al. develop an algorithm based on Harris Hawks Optimization (HHO) to address the problem of distribution network reconfiguration, including \(\upmu\)grids. The objective is to minimize energy losses and improve voltage profiles by determining the optimal network topology. The approach includes a multi-stage optimization process that combines HHO with pre-processing and post-processing phases, which improve the initial generation of configurations and refine the solutions obtained. [PERSON] et al., in their work titled \"Radiality Constraints for Resilient Reconfiguration of Distribution Systems: Formulation and Application to Microgrid Formation\" [14], as the title suggests, emphasize the importance of radiality constraints in systems that include flexible \(\upmu\)grids, explaining how they can contribute to system robustness by allowing dynamic network reconfiguration. Other authors have also studied \(\upmu\)grids/reconfigurations as a way to improve the system [15; 16], including radial distribution systems [17; 18]. The reconfigurations in the recent work published and described above [14] are based on graph theory, which has also been the foundation of the algorithm presented in this work. Additionally, [PERSON] et al., in [19], highlight the innovation of reconfigurable microgrids (RMGs) in short-term optimization, combining network reconfiguration and optimal DG dispatch to minimize energy losses. They use a hybrid optimization approach based on particle swarm optimization (PSO), which enhances system efficiency and reliability, validated in an IEEE-33 system. On the other hand, \(\upmu\)grids are increasingly recognized for their role in enhancing the flexibility of energy systems, enabling the integration of renewable energy sources, DG, and energy storage systems. [PERSON] and [PERSON] [20] use the Manta Ray Foraging Optimization (MRFO) algorithm to improve fault tolerance and rapid recovery in smart grids through network reconfiguration, also achieving significant energy loss reduction and improvement in the voltage profile given different network scenarios. Recently, [PERSON] et al., in [21], propose a deep reinforcement learning approach for optimal distribution network reconfiguration, aimed at minimizing critical load loss during certain events (contingencies), achieving quick and effective reconfiguration even with changes in system states. [PERSON] et al., in [22], develop a supply interruption management strategy that combines network reconfiguration with optimal distributed energy resource (DER) scheduling, enabling a high percentage of load to be maintained in service following network faults, highlighting the efficiency of the method compared to traditional \(\upmu\)grid formation approaches. As the reconfigurations and DG management are investigated, the optimal placement of DG within an electrical system or \(\upmu\)grids is also studied. In [23], [PERSON] et al. develop an optimization strategy that simultaneously determines the optimal reconfiguration of the distribution network and the DG power injection, with objectives such as minimizing energy loss, improving the voltage profile, and maximizing DG penetration. Using metaheuristic algorithms (Evolutionary Programming, PSO, Firefly, and GSA), they demonstrate that network reconfiguration alone is not sufficient to achieve maximum network performance. In this work, the authors highlight the crucial importance of optimal DG placement, although in their case study, they assume that this placement is optimal based on previous studies, specifically in [24], focusing therefore on optimizing DG injection.