OSNR optimization in optical networks: modeling and distributed algorithms via a central cost approach