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 Tuesday at 15:00 AM (CEST 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)
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
~/pypsa-distribution/
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.