Applying stochastic analysis to energy planning and more