This article addresses a comprehensive analysis of power electrical systems, employing a combined approach of genetic algorithms and mathematical optimization through nonlinear programming with discontinuous derivatives (DNLP) in GAMS. The primary objective is to minimize economic losses and associated costs faced by the network operator following disruptive events. The analysis is divided into two fundamental aspects. Firstly, it addresses the topological reconfiguration of the network, involving the addition of lines and distributed energy resources such as distributed generation. To determine the optimal topological reconfiguration, a genetic algorithm was developed and implemented. This approach aims to restore electrical service to the maximum load within the system. Secondly, an optimal energy dispatch was performed for each generator, considering the variation in load throughout the day. The system’s load curve is taken into account to determine the optimal energy distribution. Thus, the problem of economic losses is approached from two perspectives: the minimization of costs due to nonsupplied electrical energy and the determination of efficient energy dispatch for each generator after network reconfiguration. For the analysis and case studies, simulations were conducted on the IEEE 9- and 30-node test systems. The results demonstrate the effectiveness of the proposed solution, evaluated in terms of reduced load shedding and economic losses.