Stochastic Planning and Operation in Energy Systems