/power-grid-model-workshop

Workshop assignments on power-grid-model: A distribution power system analysis library

Primary LanguageJupyter NotebookMozilla Public License 2.0MPL-2.0

Power Grid Model Workshop

The steps for workshop are to follow Power Flow Example.ipynb and Power Flow Assignment.ipynb simultaneously. To complete the workshop on your own, go through Power Flow Example notebook while completing the respective assignment from at each checkpoint.

Pre-knowledge

Participants are expected to have knowledge of Juypter Notebook and numpy.

It is recommended to read the numpy structured array documentation.

Preparation

Please create the relevant environment before the workshop. If you encounter problems, please raise a question in the discussion board

Preparation for Windows (beginners guide)

  1. Download (or checkout) this workshop/repository and remember the destination location. For example: C:\Users\YourUserName\Downloads\power-grid-model-workshop.

  2. Install the latest Python version. You probably want the Windows installer (64-bit) under Stable Release.

  3. Now open a terminal (Windows-Key + R, type cmd, press OK) and use the cd (change dir) command to navigate to the folder where you downloaded the workshop. For example:

    C:\Users\YourUserName> cd Downloads\power-grid-model-workshop
    C:\Users\YourUserName\Downloads\power-grid-model-workshop>_
  4. Optional: Create and activate a virtual environment. You can skip this step, but it helps you to keep your system clean, as we will be installing about 70 Python packages in the next step.

    > python -m venv venv
    > venv\Scripts\activate
  5. install Power Grid Model and some other packages we'll use for this workshop:

    > pip install power-grid-model jupyter pandas matplotlib
  6. Now run jupyter notebook. It will probably (depending on your system) automatically open a browser at http://localhost:8888. If not, the console output will tell you where to find the jupyter notebook server.

    > jupyter notebook
  7. Try any of the .ipynb files, for example Power Flow Example.ipynb and press the >> button to run the entire file. Note that the last section in the Power Flow Example is about error handling, so don't get scared if you see some error messages there.

Next time, pick up where you left off

  1. Open a terminal (Windows-Key + R, type cmd, press OK) and use the cd (change dir) command to navigate to the folder where you downloaded the workshop. For example:
    C:\Users\YourUserName> cd Downloads\power-grid-model-workshop
    C:\Users\YourUserName\Downloads\power-grid-model-workshop>_
  2. Optional: Activate the virtual environment (if you created one initially).
    > venv\Scripts\activate
  3. Run jupyter notebook. It will probably (depending on your system) automatically open a browser at http://localhost:8888. If not, the console output will tell you where to find the jupyter notebook server.
    > jupyter notebook

Preparation for WSL2 or Linux (for advanced users)

If you know WSL2/Linux you should be able to configure environment yourself.

> pip install power-grid-model jupyter pandas
> jupyter notebook

Open the jupyter notebook Power Flow Example.ipynb, try to run it.

License

This project is licensed under the Mozilla Public License, version 2.0 - see LICENSE for details.

Contributing

Please read CODE_OF_CONDUCT and CONTRIBUTING for details on the process for submitting pull requests to us.

Visit Contribute for a list of good first issues in this repo.

Contact

Please read SUPPORT for how to connect and get into contact with the Power Gird Model project.