Heuristic Algorithm for Distribution Networks Reconfiguration for Loss Reduction Based on Graph Theory