Installing NEMO

NEMO can be installed in two ways: with an installer program and manually via GitHub.

Installer program

The installer program is the easiest way to install NEMO. It sets up all of NEMO's files and ensures an appropriate version of Julia, the language NEMO is programmed in, is installed. You can download a copy of the installer program through the LEAP website (note that you must register for the site to access the download link).

Once you've downloaded the installer, run it and follow the prompts.

NEMO installer welcome screen with setup wizard interface. The window displays the title "Welcome to the NEMO - Next Energy Modeling system for Optimization Setup Wizard" at the top. On the left side is a blue icon featuring a box and wireless signal symbol. The main content area contains introductory text explaining that this will install NEMO and recommends closing other applications before continuing. Instructions prompt the user to click Next to continue or Cancel to exit setup. Two buttons at the bottom right labeled Next and Cancel allow navigation.

One of the files that the installer delivers is a pre-compiled session environment (system image) for Julia that includes support for NEMO. Ordinarily, Julia compiles programs like NEMO at run-time, a feature that impairs performance when a program is started. The NEMO system image avoids this performance penalty by providing NEMO in a pre-compiled form. This is a significant advantage, but there's one caveat: if you make any customizations to NEMO's code, they won't take effect unless you restore the default Julia system image as described below.

Note

At present, an installer is only available for Windows 10 and 11 64-bit. Users on other platforms should refer to GitHub installation.

Uninstalling NEMO

If you installed NEMO with the installer program, you should be able to reverse the installation using your operating system's normal uninstall function. In Windows, go to Start -> Add or remove programs, and choose to uninstall NEMO.

Updating NEMO

If you installed with the installer program and want to update to a new version of NEMO, simply run the new installer. It's not necessary to uninstall the old version of NEMO first.

Troubleshooting problems with installer program

If the installer program throws an error, check its log file for more information about the problem. You can find installer log files in the temporary directory for your operating system user (in Windows, this is the directory mapped to the TEMP environment variable, accessible in the File Explorer by navigating to %temp%). The file names of installer log files start with "Setup Log". If you and your local IT support cannot resolve the problem you encountered, please email Jason Veysey for assistance. Include a copy of the installer log file in your message.

Restoring default Julia system image

If you install Julia with the NEMO installer program and need to restore the default Julia system image, follow these steps.

Steps in Windows

  • Close any Julia windows or processes.
  • Open the Julia library directory (typically %ProgramData%\Julia\<Julia version>\lib\julia).
  • Replace sys.dll with sys.dll.nemo_backup.

Once you do this, there will be a performance penalty when starting NEMO, but any customizations you make to the NEMO code will take effect.

Tip

It's a good practice to back up the NEMO system image before overwriting it. That way, you'll be able to restore it if desired.

GitHub installation

To install NEMO from GitHub, you must first have a working Julia installation on your computer. The NEMO team has verified NEMO's compatibility with Julia 1.12.4; other versions of Julia may not work correctly.

Once Julia is set up, start a Julia session and add the NEMO package (named NemoMod):

julia> ]

pkg> add https://github.com/sei-international/NemoMod.jl

This will install the latest NEMO code from GitHub (which may include pre-release code). To install a particular version of NEMO, find its commit hash on the NEMO GitHub releases page and insert it at the end of the add command after a # sign. For example, for NEMO 1.0.5:

pkg> add https://github.com/sei-international/NemoMod.jl#84705cc0b56435a1a2e7c2d3d0e91afc5b46922d

Solver compatibility

When you calculate a scenario in NEMO, the tool formulates an optimization problem that must be solved by a compatible solver. In general, this process yields a conventional linear programming (LP) problem, but certain run-time options can change the problem type.

Note

NEMO generates an ordinary LP optimization problem when calculating a scenario unless you do one of the following:

Optimization operations in NEMO are carried out with version 1.29.4 of the JuMP package. In principle, NEMO is compatible with any solver that can be called through JuMP, but you must ensure the selected solver can handle the problem you're presenting (LP/MILP/quadratic). For a list of solvers that work with JuMP, see the JuMP documentation.

A solver can be specified when calculating a scenario in NEMO by passing a JuMP Model object that references the solver to NEMO's calculatescenario method. For example:

julia> NemoMod.calculatescenario("c:/temp/scenario_db.sqlite"; jumpmodel = Model(optimizer_with_attributes(GLPK.Optimizer, "presolve" => true)))

Note that in order to do this, you must have the corresponding Julia interface (package) for the solver installed on your computer.

NEMO has been tested for compatibility with the following solver packages (which in turn support the listed versions of the associated solvers).

SolverJulia package versionSolver program versions
Cbc1.3.02.10.12
CPLEX1.1.112.10 - 22.1
GLPK1.2.15.0
Gurobi1.9.29.0 - 13.0.1
HiGHS1.21.01.13.0
Mosek11.0.111.0.30
Xpress0.17.28.4 - 9.8
Tip

Older versions of NEMO may be compatible with older versions of these solvers. For example, NEMO 1.2 is compatible with CPLEX 12.8 - 12.9 and Gurobi 7 - 8.

If you install NEMO with the NEMO installer, all of the preceding solver packages will be installed as well. Some of the packages come with the underlying solver programs (solver binaries), and some require separately installed licenses as described below.

  • Solver program installed with solver's Julia package, no separate license required - Cbc, GLPK, HiGHS. Once their Julia packages are installed, these solvers can be used immediately.
  • Solver program installed with solver's Julia package, separate license required - Gurobi, Mosek. See the documentation for these solvers for information on licensing.
  • Solver program not installed with solver's Julia package, separate license required - CPLEX, Xpress. See the documentation for these solvers for information on licensing and installing the solver program. If you install one of these solvers and it does not work with NEMO, try reinstalling NEMO.
Warning

NEMO may not be compatible with solvers and solver versions not listed above. The NEMO team generally does not provide support to troubleshoot issues with such solvers or versions.

NEMO package directory

NEMO's source code and some other NEMO-specific files (e.g., a sample configuration file and scenario databases) are stored in a directory for NEMO's Julia package. If you installed NEMO from GitHub, you can find this directory by running these Julia commands:

julia> using NemoMod

julia> println(normpath(joinpath(pathof(NemoMod), "..", "..")))

If you installed NEMO with the installer program, the NEMO package directory should be the first subdirectory in %ProgramData%\NEMO\depot\packages\NemoMod.