This paper presents a new concept to include uncertainty management in energy and environmental planning models developed in algebraic modeling languages. SETSTOCH is a tool for linking algebraic modeling languages with specialized stochastic programming solvers. Its main role is to retrieve from the modeling language a dynamically ordered core model (baseline scenario) that is sent automatically to the stochastic solver. The case presented herein concerns such a study realized with the IEAMARKAL model used by many research teams around the world.