Minimizing power losses in a distribution system is commonly realized through optimal network reconfiguration. In the past, network reconfiguration research was focused on planning, where the final configuration with the lowest power losses was the main goal. However, power losses during switching operations from the initial state to the final state of the configuration were not considered. This paper presents the optimal switching sequence path to minimize power losses during the network switching operation. Apart from this contribution, the simultaneous optimal network reconfiguration for variable load network and distributed generation (DG) output is also proposed. The proposed methodology involves the (i) optimal network reconfiguration with variable load and DG output simultaneously, and (ii) the optimal sequence of switching operations required to convert the network from the original configuration to the optimal configuration obtained from (i). The selected optimization technique in this work is the firefly algorithm. To assess the capabilities of the proposed method, simulations using MATLAB are carried out on IEEE 33‐bus radial distribution networks. The results demonstrate the effectiveness of the proposed strategy to determine the sequence path of switching operations, as well as the optimal network configuration and optimal output of DG units. © 2017 Institute of Electrical Engineers of Japan. Published by John Wiley & Sons, Inc.