Distributed Control Algorithms for Solving Large-scale Optimization Problems of Networked Systems