U.S. Energy Information Administration logo
Skip to sub-navigation

2024 was a year of notable accomplishments. Check out the highlights of EIA products and programs this year.

‹ Analysis & Projections

Annual Energy Outlook 2023

Release date: March 16, 2023   |  Next release date:  Spring 2025   |  AEO Narrative  |  AEO Narrative Figures  

Download the National Energy Modeling System (NEMS)

Overview

NEMS is an integrated model of the U.S. energy system. For an overview of NEMS, see The National Energy Modeling System: An Overview 2018 (April 2019). More detailed documentation of NEMS is also available.

The NEMS developer edition allows the public to replicate the Annual Energy Outlook 2023 (AEO2023) results and discloses the source code and inputs used. The developer edition does not include the executables of the model, which can be generated from the source code with the appropriate software. Users can also construct and analyze alternative cases with the NEMS developer edition, although these actions can require significant technical expertise and time.

Download NEMS (zip file)

NEMS is also available on GitHub.

Software description

NEMS is a computationally intensive 64-bit application, which runs on 64-bit Windows. Our servers that run NEMS have 128 GB of RAM to accommodate multiple runs and users simultaneously, but a single copy of NEMS may execute on a single-user system with 4 GB of RAM.

We run the integrated NEMS run in two parts simultaneously (in parallel) to speed run time, so we use two processor cores per integrated run. If a (non-integrated) run is done with modules off (for example, turning off coal, electricity, and renewables), then we need only one processor core per run. With a quad core processor, you can run two integrated parallel runs or four non-integrated runs with little speed loss, if sufficient memory is available. To run two integrated runs or four non-integrated runs in parallel, we suggest 16 GB of RAM. You can run NEMS as one process, but it requires about two hours more per cycle.

One run of all of the NEMS model, or a cycle, takes about four hours on our servers, purchased in 2018 (with dual Intel XEON Gold 6134 processors, 3.2 gigahertz), but most cases are solved by making a series of cycles. A four cycle NEMS run takes about 14–18 hours total. Runs of some individual parts of NEMS, such as the energy demand models, if run separately, can take only a few minutes. All files of a completed run, input and output, take up about 30 GB of storage, but they compress to about 15 GB once the run finishes.

Brief instructions for compiling the code, setting up a run, and replicating the AEO2023 Reference case are included in a readme.txt file included with the archive.

Support

We do not have a budget to support the external use of NEMS. For more details on NEMS, see Assumptions to AEO2023 or the Model Documentation. You can direct technical questions about the NEMS model to individual NEMS modelers, and you can send general NEMS questions to NEMSModel@eia.gov.

Installation

To use NEMS, you must obtain the following non-EIA software packages directly from the vendors:

  1. Intel Visual Fortran Compiler Professional Edition for Windows, Version 18.0.1.156 Build 20171018, (now called the Intel® Parallel Studio XE 2018 Composer Edition for Fortran Windows) as a 64-bit application. (If version 18 is not the latest, it may still be available and should be installed for compatibility. Once you purchase Intel Fortran, you can download earlier versions through its support site.)
  2. OptimizaModeling Library (OML) license from Ketron Optimization with XpressMP barrier interface (optional). The Electricity Market Module (EMM) in NEMS uses the OML optimizer. The OML libraries are in the archive file.
  3. You must independently obtain the license key from:

    Ketron Optimization Support Services
    P.O. Box 71-1601
    Oak Hill, VA 20171-1601 USA Phone: 703-636-

    Once you have obtained the Ketron OML license files and key, you will need to copy all of the files to the MPSIII license folder. Typically for the normal OML install, the license folder would be at C:\MPSIII. Make sure an environmental variables path is set up for MPSIII.CFG. To set this environmental variable in Windows Server 2012:

    • Right-click Computer
    • Select Properties
    • Select Advanced System Settings
    • Select the Environmental Variables button under the Advanced tab

    If no MPS variable is defined under System Variables:

    • Select New
    • Add the variable name MPS
    • Define the value as C:\MPSIII\
  4. Fair-Isaac Corporation’s (FICO) Xpress optimizer. We use the Xpress optimizer 8.12 [1] to solve the EMM’s Electricity Capacity Planning linear program (LP); the Liquid Fuels Market Module LP; and the Carbon Transport, Utilization, and Storage mixed integer program (MIP). To purchase an Xpress license, please refer to FICO’s webpage.
  5. General Algebraic Modeling System (GAMS). GAMS is used for the Carbon Transport, Utilization, and Storage submodule and for the Liquid Fuels Market Module. We used GAMS version 35.1 for the AEO2023. Our GAMS implementation uses the Xpress solver mentioned above. The GAMS commercial and academic price schedules are available on the GAMS website. We purchased the development license (rather than the run-time license), which allows changes to the linear program matrix during execution of a NEMS run.
  6. Advanced Integrated Multidimensional Modeling Software (AIMMS). AIMMS is used for the Coal Market Module, the Natural Gas Market Module, and the Renewable and Electricity Storage submodule within EMM. We used AIMMS version 4 (release 4.76.11.11) for AEO2023 licensed with the CPLEX solver (AIMMS does not link with the Xpress solver). The AIMMS System Development Kit, which has a programming interface known as the AIMMSLINK library, has been installed at EIA and is also used with the NEMS Coal Market Module. The AIMMSLINK library invokes the AIMMS SDK and is linked in for NEMS runs. The AIMMS SDK is no longer supported by AIMMS.
  7. (Optional) We use the IHS Markit Macroeconomic Model as implemented with the EViews10 software package. We are currently using EViews10 standard edition, version 10, December 12, 2018, build. The IHS Markit macro module is executed as a subprocess to NEMS if the macro feedback switch in NEMS is turned on. You can elect to run NEMS without macro feedback, in which case the run uses static macroeconomic inputs taken as is. When the macro feedback switch is on, NEMS will attempt to call the macro model by executing EViews using the IHS Markit model's work files as the input to Eviews. These Eviews work files are not included in the archive, but you can obtain them from EIA after licensing the IHS Markit model. You must also get a copy of EViews to run the IHS Markit model. Contact IHS Markit Representative Patrick Joyce or Deron Tross for more information.

    If requested, we will send files for the proprietary IHS Markit macroeconomic model separately once we have received notification from the vendor that arrangements for licensing the model have been made.
  8. A Fortran-to-Sqlite library is included in this archive because a Sqlite database has been added to the NEMS Electricity Model that holds regional electricity data. Sqlite is not required for running NEMS with the default data provided.
  9. Git is a free and open-source distributed version control system. As part of launching a NEMS run, NEMS compares the current files against the files in a git repository.
  10. MKS Toolkit for Developers, Version 10.3. We currently use this version, but other versions may work, too. MKS Toolkit is a Windows software package that provides a Unix Korn shell emulation. Many NEMS utility programs are implemented as Korn shell scripts. Other alternatives are also available, including Cygwin and Windows Subsystem for Linux.
  11. Python 3.7. The NEMS validator (test suite) and the pyfiler utility are written in python. The following libraries are required.
  12. Package Version
    alabaster 0.7.12
    atomicwrites 1.4.0
    attrs 21.4.0
    Babel 2.9.1
    backcall 0.2.0
    Bottleneck 1.3.2
    certifi 2021.10.8
    charset-normalizer 2.0.12
    colorama 0.4.4
    cycler 0.11.0
    decorator 5.1.1
    docutils 0.16
    et-xmlfile 1.1.0
    idna 3.3
    imagesize 1.3.0
    importlib-metadata 4.11.3
    iniconfig 1.1.1
    ipython 7.32.0
    jdcal 1.4.1
    jedi 0.18.1
    Jinja2 2.11.2
    joblib 1.1.0
    kiwisolver 1.4.0
    line-profiler 3.0.2
    MarkupSafe 2.1.1
    matplotlib 3.3.2
    matplotlib-inline 0.1.3
    numexpr 2.7.2
    numpy 1.19.2+mkl
    openpyxl 3.0.4
    packaging 21.3
    pandas 1.3.3
    parso 0.8.3
    patsy 0.5.1
    pickleshare 0.7.5
    Pillow 9.0.1
    pip 20.1.1
    pluggy 0.13.1
    prompt-toolkit 3.0.28
    py 1.11.0
    Pygments 2.11.2
    pyodbc 4.0.30
    pyparsing 3.0.7
    pytest 6.1.1
    python-certifi-win32 1.6
    python-dateutil 2.8.2
    pytz 2021.3
    requests 2.27.1
    scikit-learn  0.23.2
    scipy 1.5.2
    setuptools 47.1.0
    setuptools-scm 6.4.2
    six 1.16.0
    snowballstemmer 2.2.0
    Sphinx 3.2.1
    sphinxcontrib-applehelp 1.0.2
    sphinxcontrib-devhelp 1.0.2
    sphinxcontrib-htmlhelp 2.0.0
    sphinxcontrib-jsmath 1.0.1
    sphinxcontrib-qthelp 1.0.3
    sphinxcontrib-serializinghtml 1.1.5
    statsmodels 0.12.0
    tables 3.6.1
    tabulate 0.8.7
    threadpoolctl 3.1.0
    toml 0.10.2
    tomli 2.0.1
    traitlets 5.1.1
    typing-extensions 4.1.1
    urllib3 1.26.9
    wcwidth 0.2.5
    wrapt 1.14.0
    xlrd 1.2.0
    XlsxWriter 1.3.6
    xlwt 1.3.0
    zipp 3.7.0