Optimal Investments for Electricity Generation: A Stochastic Model and a Test-Problem