Optimal Reconfiguration of Distribution Networks