Routing in Optical and Stochastic Networks