Skip to content

DeniseGiub/pypsa-distribution

 
 

Repository files navigation

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

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

Installation

  1. 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
  2. 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
  3. For running the optimization one has to install the solver. We can recommend the open source HiGHs solver which installation manual is given here.

  4. 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
  5. 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)

Test run

  • In the folder open a terminal/command window to be located at this path ~/pypsa-distribution/

  • Activate the environment conda activate pypsa-earth

  • Run a dryrun of the Snakemake workflow by typing simply in the terminal:

    snakemake -j 1 solve_network -n

    Remove the -n to do a real run.

Training

  • We recently updated some hackathon material for PyPSA-Earth, which are relevant also for PyPSA-Distribution. The hackathon contains jupyter notebooks with exercises. After going through the 1 day theoretical and practical material you should have a suitable coding setup and feel confident about contributing.
  • The get a general feeling about the PyPSA functionality, we further recommend going through the PyPSA and Atlite examples.

Questions and Issues

  • We are happy to answer questions and help with issues if they are public. Through being public the wider community can benefit from the raised points. Some tips. Bugs and feature requests should be raised in the GitHub Issues. General workflow or user questions as well as discussion points should be posted at the GitHub Discussions tab. Happy coding.

Collaborators

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%