The Economic Evaluation of Investments in the Energy Sector: A Model for the Optimization of the Scenario Analyses