Intelligent system for automatic reconfiguration of distribution network in real time