Power control for OSNR optimization in optical networks: a distributed algorithm via a central cost approach