Network reconfiguration in distribution systems for loss reduction and load balancing