Optimal Placement of Compensating Devices in Distr