.. _tutorials:

Tutorials
=========

The tutorials are Jupyter notebooks which you can find `here <https://github.com/FraunhIEE-UniKassel-PowSysStability/powfacpy/blob/main/tutorials>`_
or click on the links below to go to a specific tutorial. 
You can use the PowerFactory project 'powfacpy_test' from `here <https://github.com/FraunhIEE-UniKassel-PowSysStability/powfacpy/tree/main/powerfactory_projects>`_ 
to run the commands in the tutorials locally. 

Getting started
---------------------------
Start here with the 
`getting started tutorial <https://github.com/FraunhIEE-UniKassel-PowSysStability/powfacpy/blob/main/tutorials/getting_started.ipynb>`_.
This tutorial gives an overview of the interaction with the *PowerFactory* 
database using *powfacpy*. The methods introduced in this tutorial serve as a basis to 
do more complex things and to write more readable code using less lines of code.

Dynamic Simulation and Plotting
----------------------------------------------
The `tutorial <https://github.com/FraunhIEE-UniKassel-PowSysStability/powfacpy/blob/main/tutorials/simulation_and_plotting.ipynb>`_ shows how to conveniently 
simulate and plot with a syntax similar to matplotlib. It is also depicted how to export data to csv format
and use external plotting libraries such as matplotlib. 

Study Cases
-----------------------
The `study cases tutorial <https://github.com/FraunhIEE-UniKassel-PowSysStability/powfacpy/blob/main/tutorials/study_cases.ipynb>`_ 
provides a flexible method to automatically create study cases from different data.