See also: Setting Up Optimization in LEAP
LEAP includes the capability to automatically calculate least-cost capacity expansion and dispatch of supply-side Transformation modules based on the use linear programming-based optimization frameworks.
Optimization frameworks calculate the least-cost expansion and dispatch of power plants for an electric system, where optimal is defined as the energy system configuration with the lowest total net present value of the social costs of the system over the entire period of calculation (from the base year through to the end year), subject to various constraints such as meeting energy demands, or limiting emissions.
In calculating an optimal system LEAP takes into account all of the following relevant costs and benefits incurred in the system including:
A least cost system can optionally be calculated subject to a number of user specified constraints including maximum annual levels of emissions for any given pollutant (CO2, SOx, NOx, PM10, etc.) and minimum or maximum capacities for certain plant types. For example, an expansion pathway for an energy system could be calculated that meets a minimum renewable portfolio standard (RPS) whilst also staying within a target for reducing greenhouse gas (GHG) emission.
Bear in mind that optimization calculations tell the user what theoretical future configuration of an energy system will yield the lowest overall cost to society. But such pathways may not represent realistic policy options in a particular country for many different reasons including their social and environmental acceptability or the perceived need to preserve energy security or the diversity of energy supply. On the other hand, with LEAP’s simpler accounting calculations, the user tells the model what energy system they want to see built. That is, expert judgment is used to assess what pathways are feasible. These pathways are not necessarily optimal in the sense of being least-cost but they may be more realistic.
The optimality of a given pathway may be very sensitive to input assumptions such as future capital costs, future efficiency assumptions, future fuel costs or future GHG mitigation targets. A system that is optimal for a country under one set of assumptions (e.g. low growth in fuel prices) may be far from optimal under another set of assumptions (e.g. high growth in oil prices). Generally, the goal in energy planning is not to identify a single optimal solution, but rather to identify robust energy policies that work well under a range of plausible input assumptions. You can easily use LEAP’s scenario capabilities to calculate explore different optimal solutions under different sets of input assumptions.
Optimization Calculations Supported in LEAP
Optimization calculations in LEAP work through integration with either of two different optimizing frameworks:
OSeMOSYS: The Open Source Energy Modeling System (OSeMOSYS) which has been developed by a coalition of organizations including the Royal Technical University (KTH) in Sweden, the Stockholm Environment Institute (the developers of LEAP), the International Atomic Energy Agency (IAEA), and the UK Energy Research Center (UKERC). OSeMOSYS is based on the GNU Linear Programming Kit (GLPK), a software toolkit intended for solving linear programming problems by means of the revised simplex method. Both OSeMOSYS and GLPK are open source and freely distributed tools. Both are included as part of LEAP's standard installation and both are fully integrated into LEAP's user interface.
NEMO (the Next Energy Modeling system for Optimization) is a high-performance, open-source energy system optimization model developed at SEI. NEMO is intended for users who seek substantial optimization capabilities without the limitations of proprietary, fee-based software or the performance bottlenecks of common open-source alternatives.
LEAP has supported the OSeMOSYS platform for many years and we will continue to do so for some years to come. OSeMOSYS has the advantage of being distributed as part of LEAP so no additional software is required to use it and its also included with each LEAP license. However, OSeMOSYS also tends to be slow, especially with large problem sets, and it is built upon a modeling language (GLPK) that no longer appears to be actively developed. SEI therefore took the decision to create a new optimization framework called NEMO that has strong advantages over OSeMOSYS, and which also is well-placed to meet the future developmental needs of the LEAP user community. Like OSeMOSYS, NEMO is also source, but unlike OSeMOSYS, it is built in a new programing language called Julia, originally developed at MIT.
Julia is fast, flexible, and well suited for scientific and numerical computing. It also has a vibrant and growing community of users. This makes NEMO particularly good at the types of optimization problems encountered in LEAP: linear (LP) and mixed integer linear programming (MILP), especially for large problem sets.
SEI's research efforts are now devoted to the NEMO system and in general we recommend that most LEAP users transition to using NEMO. Using NEMO with LEAP has a number of advantages versus using OSeMOSYS with LEAP. Namely:
Speed/Size: While both frameworks offer similar calculation times for small (teaching) models, NEMO is better able to handle large optimization models and is significantly faster at solving such models compared to OSeMOSYS.
Solvers: OSeMOSYS is limited using only GLPK or CPLEX. NEMO can be used with a wide (and expanding) range of solvers including free solvers like GLPK and Cbc as well as industrial-grade solvers like CPLEX, GUROBI and MOSEK. thus giving users a better chance of being able to use solvers they already own or for which they have standing expertise. More information here on solvers supported by LEAP and NEMO.
Handling of Time Slices: NEMO has been specially designed to work with the new and much more flexible time-slicing features in the latest versions of LEAP.
Energy Storage: LEAP with OSeMOSYS is not able to model energy storage. If you want to model energy storage in LEAP you will need to use NEMO.
Support: NEMO is developed and supported by SEI, the developers of LEAP, meaning that LEAP and NEMO are closely integrated and support of the two tools is closely coordinated. The LEAP web site provides a one-stop-shop for both developer and community support of both tools. OSeMOSYS is an open source project with unknown levels of support and development from its developers (KTH) and its user community.
Future Development: Because NEMO is closely integrated with LEAP and developed and maintained by the same team that develops LEAP, this make future development of both tools much easier. NEMO serves as a foundation for further expanding the types of analyses that can be conducted using LEAP.
NEMO must be installed separately from LEAP. Once installed NEMO is seamlessly connected to LEAP. Support for NEMO requires an add-on license to a standard LEAP license. As with LEAP itself, these licenses are available at no charge to qualified users in low and lower-middle-income countries and at nominal cost to qualified users in upper-middle-income countries. More information here on solvers supported by LEAP and NEMO.
The table below provides a quick comparison of the OSeMOSYS and NEMO frameworks:
Controlling which framework/solver Used by LEAP
Users of LEAP need never interact directly with either OSeMOSYS or NEMO or any of their data or results files. LEAP automatically writes the data files required by these frameworks making use of the same data you already input into LEAP including process efficiencies, availability rates, emission factors, unit capital costs, fixed and variable O&M costs, fuel costs and externality values.
The results of the optimization are automatically read back into LEAP so that all relevant results can be viewed in LEAP in its standard Results, Energy Balance and Cost-Benefit reports. LEAP also automatically handles all unit conversions necessary for reading and writing the data files required by OSeMOSYS and NEMO.
Optimization can be optionally used in one or more scenarios for calculating capacity expansion, whilst other scenarios can continue to use LEAP's accounting calculations in which the user exogenously specifies the expansion pathway. Just like LEAP, the two optimization models calculate both capacity expansion (i.e. how many megawatts of power plants are built) and process dispatch (i.e. how many megawatt-hours of each power plant will be dispatched in each time slice of each year).
You can control which scenarios use optimization by simply editing the Optimize variable in LEAP in any given scenario. When this variable is set to Yes, the default optimization framework and solver will be used (currently OSeMOSYS with the free GLPK solver). When set to No, LEAP will use its accounting and simulation calculations. For finer grade control, you can even make use of different frameworks and solvers to calculate different scenarios. This can be useful for checking that different frameworks and solvers yield the same results. In some rare cases they may yield slightly different results (most often due to optimizations of the solver code designed to speed up calculations). The allowable keywords used for the Optimize variable are currently as follows:
Yes: Optimize using OSeMOSYS and GLPK
No: Use LEAP's own accounting and simulation calculation methods
OSeMOSYS(GLPK): Optimize using OSeMOSYS and GLPK: Equivalent to "yes"
OSeMOSYS(CPLEX): Optimize using OSeMOSYS and CPLEX
NEMO(GLPK): Optimize using NEMO and GLPK
NEMO(Cbc): Optimize using NEMO and Cbc
NEMO(CPLEX): Optimize using NEMO and CPLEX
NEMO(GUROBI): Optimize using NEMO and GUROBI
NEMO(MOSEK): Optimize using NEMO and MOSEK
Note that the commercial solvers CPLEX, and GUROBI must be purchase installed separately from LEAP and NEMO. MOSEK is installed with NEMO but you must have a properly purchased and installed license file for MOSEK in order for it to calculate. Use the orange Exp button () in the data entry table to quickly choose a framework and solver from among those installed.
For more information: