Installation

eDisGo is tested with Python 3.10–3.12 (the conda environment files pin >=3.9, <=3.11). The documentation is built with Python 3.11, which is a good default choice.

User installation

Install the latest release from PyPI. We highly recommend using a virtual environment and its pip:

python -m pip install edisgo

Linux

The command above works out of the box on most Linux systems. If installation of the geospatial stack (geopandas, shapely, pyproj, fiona, …) fails, install those packages from conda-forge first (see the Windows instructions) and then run pip install edisgo.

Windows

On Windows we recommend Anaconda and installing the geospatial stack from the conda-forge channel before installing eDisGo. You can use the provided eDisGo_env.yml:

conda env create -f path/to/eDisGo_env.yml
conda activate eDisGo_env

macOS

We have little experience with eDisGo on macOS. If you try it, please let us know how it went.

Developer installation

To work on the source code, clone the repository and install it in editable mode with the development extras (linters, test tools, documentation tools):

git clone https://github.com/openego/eDisGo.git
cd eDisGo
python3.11 -m venv .venv
source .venv/bin/activate
python -m pip install -e ".[dev]"
pre-commit install   # install the git pre-commit hooks

See Contributing for code standards, tests and how to build these docs.

Additional requirements for the optimal power flow

The multi-period optimal power flow used for the flexibility optimisation (Multi-period optimal power flow) is solved in Julia via PowerModels.jl with the Gurobi and Ipopt solvers. These are only needed if you call pm_optimize(); the rest of eDisGo works without them.

  1. Julia — install Julia (the bundled eDisGo_OPF.jl package targets Julia 1.6) from the Julia downloads page and make sure julia is on your system PATH.

  2. Solvers — install the Gurobi solver and a valid licence following the Gurobi getting-started guide. Gurobi covers the default SOC method; Ipopt (a dependency of the Julia package) is additionally required for the non-convex method (method="nc") and for warm_start=True.

Grid data

Beyond a working eDisGo installation you need grid topology data. eDisGo uses synthetic grids generated with ding0. You can

  • download ready-made example grids from Zenodo (choose the latest record), or

  • generate grids yourself following the ding0 documentation.

See Data sources for details on grid data and on the scenario data obtained from the OpenEnergy Platform.

License

eDisGo is licensed under the GNU Affero General Public License v3.0 or later (AGPL-3.0-or-later). Copyright (C) Reiner Lemoine Institut gGmbH. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY. See the GNU Affero General Public License for details.