Optimization Methods for Optical Long-Haul and Access Networks