pypsa-meets-earth / pypsa-distribution

GNU General Public License v3.0
10 stars 8 forks source link

PyPSA-Distribution

Development Status: Under development, contributors are welcome to join

Status Linux Size License: GPL v3 Code style: black pre-commit.ci status Discord Google Drive Documentation Status

PyPSA-Distribution is a multi-energy model for small scale applications in high spatial and temporal resolution. It leverages on the open-source tool PyPSA-Earth and aims at addressing the optimization of small-scale applications. Currently it focuses on electric off-grid applications as it is at an infant state.

Get involved

There are multiple ways to get involved and learn more about our work. Please, checkout the PyPSA-Earth list

The recurrent meeting on PyPSA-Distribution is every second Tuesday at 15:00 AM (CEST time) on Discord, please reach out and join! A calendar invitation may be found here.

Installation

  1. For Windows users. Please, that windows is supported using WSL (Windows Subsystem Linux), due Issue 392 Snakemake Windows users may install the WSL as discussed in this link, also including the setup of Visual Studio Code.

  2. Open your terminal at a location where you want to install pypsa-earth. Type the following in your terminal to download the package from GitHub:

      .../some/path/without/spaces % git clone --recurse-submodules https://github.com/pypsa-meets-earth/pypsa-distribution.git
  3. The python package requirements are curated in the pypsa-earth/envs/environment.yaml file. The environment can be installed using:

      .../pypsa-distribution % conda env create -f pypsa-earth/envs/environment.yaml

    If the above takes longer than 30min, you might want to try mamba for faster installation:

     (base) conda install -c conda-forge mamba
    
     .../pypsa-distribution % mamba env create -f pypsa-earth/envs/environment.yaml
  4. For running the optimization one has to install the solver. We can recommend the open source HiGHs solver which installation manual is given here.

  5. To use jupyter lab (new jupyter notebooks) continue with the ipython kernel installation and test if your jupyter lab works:

      .../pypsa-earth % ipython kernel install --user --name=pypsa-earth
      .../pypsa-earth % jupyter lab
  6. Verify or install a java redistribution from the official website or equivalent. To verify the successfull installation the following code can be tested from bash:

      .../pypsa-distribution % java -version

    The expected output should resemble the following:

      java version "1.8.0_341"
      Java(TM) SE Runtime Environment (build 1.8.0_341-b10)
      Java HotSpot(TM) 64-Bit Server VM (build 25.341-b10, mixed mode)
  7. Extra python package requirements are satisfied by manually installing them. Currently the ramp package is added to existing pypsa-earth environment by using:

      .../pypsa-distribution % conda activate pypsa-earth
      (pypsa-earth) pip install rampdemand

Test run

Training

Questions and Issues

Collaborators