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.
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 Wednesday at 9:00 AM (UK time) on Discord, please reach out and join! A calendar invitation may be found here.
-
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.
-
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
-
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
-
For running the optimization one has to install the solver. We can recommend the open source HiGHs solver which installation manual is given here.
-
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
-
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)
-
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.
- 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.
- 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.