Optimal quasi-static routing for virtual circuit networks subjected to stochastic inputs