A Model for Reconfiguration and Distributed Generation Allocation Considering Reduction of Network Losses