One of the approaches to improve operation indices, such as power loss and reliability, is to smoothen voltage profiles. Energy management of generation units and network reconfiguration are two methods to achieve this. Hence, the latter is presented in this paper in a distribution with distributed generation units. To this end, an objective function is formulated aiming to minimize power loss and enhance the operating situation of the network. This problem is subject to various constraints and limits such as AC power flow equations, operation limits, planning model, and operation model of distributed generations. It is an integer nonlinear optimization problem and is solved using the crow search algorithm and the optimal solution is obtained. Two major innovations of the study include modeling generation units’ operation and network configuration mathematical expression of operation indicators. The method is applied to a test system and results demonstrate the high performance of this approach in improving the operation of the network. Finding the solution in less time with a satisfying standard deviation are two advantages of the proposed algorithm. Adopting this method, the network operator can reduce power loss through proper management of distributed generation power and optimal scheduling of switches. Moreover, the obtained voltage profile is more desirable in comparison to that of power flow studies.