Reconfiguration algorithm for minimizing losses in radial electric distribution systems