🎯 Welcome to the training repository for simple hydrogen model using PyPSA.
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-trainingTo 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-trainingThe 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.
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:
- To test your installed solver, you can change the
solvervariable insidetest/test_solver.py(by defaultsolver="highs"). And then in your terminal (with environment activated), run the command below. If the message showsSOLVER TESTING RESULTS: {YOUR_SOLVER_NAME} solved the network successfully., then the solve testing is passed!
python test/test_solver.py