Python for PowerFactory - 10-12 May 2021, Perth

This two day seminar provides an introduction to Python, a programming language available with PowerFactory which can be used for developing automated scripts within PowerFactory and greatly increasing productivity. The first day of the course introduces participants to the Python programming language, and the second and third days cover application of Python with PowerFactory simulation software. The seminar includes relevant examples and exercises, and covers the following key topics:

Important Links

Seminar rates

Register online now

Course Information

PY-1-01 - Python Introduction

  • Introduction to the Python language
  • Variables and assignment
  • Python as a calculator
  • Getting help
  • Functions in Python
  • Writing a Python script
  • Errors
  • Indentation

PY-1-02 - Python strings and lists

  • Basic strings in Python
  • String methods
  • String slices
  • String % operator
  • Lists
  • List 'for' 'in' syntax
  • List operations

PY-1-03 - Python sorting, dictionaries and files

  • Sorting
  • Sort key functions
  • Sorting dictionaries by key values
  • Dictionaries
  • Tuples
  • File access

PY-1-04 - Python for PowerFactory

  • Engine mode vs Internal mode
  • Script setup when using Python with PowerFactory
  • Internal mode PowerFactory setup
  • Getting started with Python and PowerFactory
  • Running a load-flow and printing results

PY-1-05 - Integration with the PowerFactory GUI

  • PowerFactory short circuit calculations from Python
  • Using selections from the GUI within a Python script
  • Buttons in the SLD
  • Clearing the PowerFactory output window
  • Errors and exception handling in Python

PY-1-06 - Data analysis with Python and PowerFactory

  • Reading a CSV file
  • Creating a operation scneario in PowerFactory using Python
  • Plotting using matplotlib

PY-1-07 - Custom GUIs with Tkinter

  • Setting up the graphical window using Tk
  • Using the button to run a load-flow command
  • Configuring a check box (widgets)
  • Text windows in Tkinter

PY-1-08 - Object orientated programming in Python

  • More on variable and function scope
  • Class instantiation
  • Classes in Python
  • Iterators and generators

PY-1-09 - Python regular expressions

  • Basic regular expression syntax
  • What are regular expressions
  • Python re module - search and match

PY-1-10 - Unit testing in Python

  • Good design practices
  • The unittest module

PY-1-11 - Getting to grips with NumPy

  • About NumPy
  • The NumPy array
  • Linear algebra
  • NumPy and matplotlib

PY-1-12 - Automating RMS simulations using Python

  • Accessing and running the simulation
  • Showing plot pages
  • Creating and configuring new plot pages
  • Exporting the plots as Windows metafiles (WMF)
  • Retrieving the simulation results

PY-1-13 - Using PowerFactory's internal Python methods

  • Generic object class methods
  • Application class methods
  • Specific object class methods
  • Optimisation using Python

PY-1-15 - Frequently used Python scripts

  • Create power system by script
  • Calculate voltage changes due to contingencies
  • Calculate reactive power capability at POC
  • Create variation and expansion stage for load changes
  • Develop critical fault clearance time script

Before attending this course, course attendees should be familiar with the basic use of PowerFactory such as how to perform load-flow and short circuit analysis and navigate around the database.

Note that places on the course are limited to 9 and allocated on a 'first come, first in' basis. A minimum of six participants is required for the course to run. The course will be confirmed via email no earlier than two weeks prior to the start date.