The growing demand for electricity worldwide has generated great interest in Distributed Generation (DG), since they can be used in places far from large cities or in places where there are no water resources for centralized generation. One of the greatest potential benefits offered is to minimize the losses in the Electrical Power Systems (EPS) and in turn in the distribution networks (DN). The correct location of DG assumes the importance that if DG are improperly placed in an EPS. For this purpose, what is established in this article is to minimize the losses of active power in an EPS containing (39) bars. The comparison is made by modeling the EPS in the first case without the introduction of DG and in the second case introducing DG, for this solution and the modeling is done using the General Algebraic Modeling System General (GAMS), since the results also It will visualize the improvement of the voltage profiles in the bars which will guarantee us a high stability and reliability in the operation of EPS.