Installation#
The subsequently described installation steps are demonstrated as shell commands, where the path before the % sign denotes the
directory in which the commands following the % should be entered.
Option A: Windows Installer (Recommended for Windows)#
For Windows users, the easiest way to install Open-TYNDP is using the automated installer. Download the latest installer executable (e.g., open-tyndp-0.4.0-pixi-Windows-x86_64.exe) from the GitHub releases page and run it.
The installer will:
Install pixi package manager to
%LOCALAPPDATA%\open-tyndpExtract the repository files to your chosen installation directory
Set up the conda environment automatically via
pixi installCreate Start Menu shortcuts for easy access:
Open-TYNDP PowerShell - Launch PowerShell with environment activated
Open-TYNDP Command Prompt - Launch Command Prompt with environment activated
For more details about the installer, see utils/windows-installer/README.md in the repository.
Note
If you prefer manual installation or need more control over the setup process, follow the instructions below for cloning the repository and installing dependencies manually.
Option B: Manual installation (All Platforms)#
Clone the Repository#
First of all, clone the Open-TYNDP repository using the version control system git in the command line.
$ git clone https://github.com/open-energy-transition/open-tyndp.git
Install Python Dependencies#
Preferred method: pixi#
PyPSA-Eur, and consequently Open-TYNDP, relies on a set of other Python packages to function. We manage these using pixi. Once pixi is installed, you can activate the project environment for your operating system and have access to all the PyPSA-Eur dependencies from the command line:
$ pixi shell -e open-tyndp
Tip
You can also set up automatic shell activation in several popular editors (e.g. in VSCode or Zed).
Refer to the pixi documentation for the most up-to-date options.
Note
We don’t currently support linux operating systems using ARM processors since certain packages, such as PySCIPOpt, require being built from source.
Legacy method: conda#
If you cannot access pixi on your machine, you can also install using conda (or mamba/micromamba).
To do so, we highly recommend you install from one of our platform-specific environment files:
For Intel/AMD processors:
Linux:
envs/default_linux-64.pin.txtmacOS:
envs/default_osx-64.pin.txtWindows:
envs/default_win-64.pin.txt
For ARM processors:
macOS (Apple Silicon):
envs/default_osx-arm64.pin.txtLinux (ARM): Currently not supported via lock files; requires building certain packages, such as
PySCIPOpt, from source
$ conda update conda
$ conda create -n open-tyndp -f envs/default_linux-64.pin.txt # select the appropriate file for your platform
$ conda activate open-tyndp
These platform-specific files have locked dependencies, to ensure reproducibility. If you are having difficulties with the above files, you can also install directly from the un-locked environment YAML file (not recommended):
$ conda update conda
$ conda env create -n open-tyndp -f envs/environment.yaml
$ conda activate open-tyndp
Install a Solver#
PyPSA passes the PyPSA-Eur network model to an external solver for performing the optimisation. PyPSA is known to work with the free software
and the non-free, commercial software (for some of which free academic licenses are available)
For installation instructions of these solvers for your operating system, follow the links above. Commercial solvers such as Gurobi and CPLEX currently significantly outperform open-source solvers for large-scale problems, and it might be the case that you can only retrieve solutions by using a commercial solver. Nevertheless, you can still use open-source solvers for smaller problems.
Note
The rules cluster_network solves a mixed-integer quadratic optimisation problem for clustering.
The open-source solvers HiGHS, Cbc and GlPK cannot handle this. A fallback to SCIP is implemented in this case, which is included in the standard environment specifications.
For an open-source solver setup install for example HiGHS and SCIP in your conda environment on OSX/Linux.
To install the default solver Gurobi, run
$ conda activate open-tyndp
$ conda install -c gurobi gurobi"=12.0.1"
Additionally, you need to setup your Gurobi license.
To use Xpress, install the xpress Python package and ensure you have:
XPRESSDIRenvironment variable pointing to your Xpress installationXPAUTH_PATHenvironment variable pointing to your license directoryA valid Xpress license file
Then configure the solver in your config file:
solving:
solver:
name: xpress
options: xpress-default
For GPU-accelerated solving, use:
solving:
solver:
name: xpress
options: xpress-gpu