Skip to content

agoenergy/pypsa-h2-training

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

86 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PyPSA H₂ Training

🎯 Welcome to the training repository for simple hydrogen model using PyPSA.

🏗️ Installation

Step 1: Clone the Repository

First, clone the PyPSA H₂ Training repository using the Git version control system. Important: the path to the directory where the repository is cloned must not contain any spaces.

If Git is not installed on your system, please follow the Git installation instructions.

git clone https://github.com/agoenergy/pypsa-h2-training.git
cd pypsa-h2-training

Step 2: Install the environment

To create the environment, we recommend using Conda, a package and environment management system, to handle these dependencies.

Start by installing Miniconda, a lightweight version of Anaconda that includes only Conda and its core dependencies. If you already have Conda installed, you can skip this step. For installation instructions tailored to your operating system, refer to the official Conda installation guide.

The required Python packages for the exercises are listed in the environment.yaml file (which is called pypsa-h2-training) using the following commands in your terminal (for windows find Anaconda Prompt, for linux and mac you can use the normal terminal):

conda env create -f environment.yml
conda activate pypsa-h2-training

Step 3: Install a solver

The exercises in this repo is passed to an external solver to perform total annual system cost minimisation and obtain optimal power flows. PyPSA is compatible with several solvers that can be installed via Python.

By default of the latest PyPSA version already installed some common open-source solvers like Cbc or HiGHs. Therefore, after you activate the environment in this repository, you don't need to installed HiGHs or cbc solver manually. We use HiGHs as the default solver of this repository and all exercises in the repository can be solved via this solver.

Note

If the environment installation doesn't work for you, you can use run the excercise online using Binder available here.

Solver testing

After all the aboved installation steps are completed, you can try to run some testings to make sure that you get all packages installed correctly:

  1. To test your installed solver, you can change the solver variable inside test/test_solver.py (by default solver="highs"). And then in your terminal (with environment activated), run the command below. If the message shows SOLVER TESTING RESULTS: {YOUR_SOLVER_NAME} solved the network successfully., then the solve testing is passed!
python test/test_solver.py

📚 Resources

About

The training repository for simple hydrogen model using PyPSA.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors