Setting Up Optimization
See also: Optimization in LEAP
Steps for Setting up Optimization Modeling
-
Decide which solver you wish to use. GLPK, Cbc and HIGHS come installed with LEAP. MOSEK is installed with LEAP, but you will need to separately purchase and install a license key if you wish to use it with LEAP/NEMO. CPLEX and GUROBI need to be purchased and installed separately from LEAP and NEMO. Once your solvers are installed LEAP should automatically detect them. No additional work is needed to connect the solvers to LEAP and NEMO. More information here on the solvers supported by LEAP and NEMO.
-
Once you have setup your optimizing framework and solver, or if you are having problems getting them installed, we suggest you visit the Help: About screen. This screen will give you a summary of which frameworks and solvers are installed.
-
Next, you should view the Optimization tab of the General: Settings screen. Here you can specify whether you wish to use emissions constraints and you can also configure how optimization calculations appear on-screen during a LEAP calculation. You should also check a few other key settings on the Costing tab of the Settings screen. In particular:
-
check that the Discount Rate is positive.
-
check that the cost annualization method is set to Capital Recovery Factor.
-
-
Next, select the Transformation module for which you wish to calculate an optimal capacity expansion pathway. Typically this will be the module in your LEAP data set that deals with electricity generation. Transformation modules are listed immediately below the top level Transformation branch in the LEAP tree structure (visible in the Analysis View).
-
Create and select a new scenario in the General: Scenarios screen or select an existing scenario that will be calculated using the optimization methodology.
-
Select the Transformation module where you wish to set up an optimization calculation, and then go to the Optimize variable located at the module branch and set its value to Yes to automatically use NEMO along with the fastest available solver installed on your PC. You can also specify a particular solver. For example, you might enter NEMO(CBC) or NEMO(CPLEX). Use the orange Exp button () in the data entry table to quickly choose a framework and solver from among those installed (as shown on right). Note that you cannot conduct optimization calculations for Current Accounts.
-
Once you have switched on optimization you will see a number of new variables displayed for each process in the optimized module. In addition, some variables used for LEAP's simulation and accounting methods (like Endogenous Capacity) will no longer be available. Make sure you input the minimum level of data required for an optimization calculation within these variables. Optimization calculations generally require more supporting data than LEAP’s basic simulation and accounting methods. In particular you need to specify process efficiencies and availability rates, unit capital costs, fixed and variable operating & maintenance costs, and (where appropriate) fuel costs. Most of these data values are specified at or below the processes listed under the selected Transformation module. If you are analyzing GHG or local air pollution emissions and wish to consider an optimal system that takes into account pollution damage costs then you will also need to specify emission factors and pollutant externality values. Emission constraints and externality costs are entered under the top-level Effects tree branch. If that branch is not visible, return to the Optimization tab of the General Settings screen and make sure Include Emissions Constraints is selected.
-
You can also specify Transformation processes to model energy storage. These special types of processes are represented in the LEAP Tree by a battery icon (). Energy storage modeling is only supported when doing optimization. It is not supported when using LEAP's accounting and simulation methods. Energy storage processes also require some additional data to be specified such as Starting Charge, Minimum Charge, and Full Load Hours.
-
When using full energy system optimization in a multi-region model, you can also optional model transmission networks and pipelines connecting those regions. More information here on setting up transmission modeling. Note that optional transmission modeling is not supported in scenarios that use simulation modeling or partial optimization modeling.
Note that you can set up multiple scenarios, each of which can calculate optimized expansion pathways with different assumptions. For example, different pathways may make different assumptions about economic growth, fuel price inflation and mitigation targets or may impose different constraints such as a Renewable Target. You can even use different solvers in different scenarios, which can be a useful way of checking their results against each other.
Viewing Results
Once you have followed the above steps you may now go to the Results View to see results for this scenario. LEAP will automatically interface with your chosen framework and solver as needed during calculations. If the optimization calculations fail to solve (i.e. they fail to find an optimal pathway) then LEAP’s calculations will be halted, an error message will be displayed and you will be given an opportunity to review the detailed debugging messages from the solver.