Python_Program

Share Embed Donate


Short Description

Download Python_Program...

Description

Scripting in PowerFactory with Python Python is a powerful tool, which is integrated into the standard PowerFactory application. It is commonly used to automate the execution of time-consuming simulations, but its application extends far beyond that. It may be used to process results, or to implement a routine that applies sequential changes to the network and calls PowerFactory’s analysis functions in each step. This seminar provides a compact and efficient introduction to the fundamental aspects of writing a scripts inside of PowerFactory by using Python. The course includes basic concepts, syntax, accessing and modification of objects from within the code, automation of a series of calculations and presentation of the results etc. Participants will be provided with numerous examples of Python scripts, which they may use for ideas, or adapt to suit their particular requirements. The number of participants is limited to 10. Each participant will have access to a workstation which will be used for the completion of exercises. Each participant should be familiar with the general handling of the PowerFactory software, acquired through our load flow and short circuit seminar, a PowerFactory basic training course or through relevant experience in the use of PowerFactory. Programming experience is a prerequisite.

DIgSILENT PowerFactory Training’s Program

1

Scripting in PowerFactory with Python

Time Schedule 2 Days Training. 19-20 November

Start of the training 1st Coffee break Lunch break 2nd Coffee break End of the training

Time

Duration

9:00 10:30 12:30 15:00 17:00

30 min 60 min 30 min -

Program Introduction • Welcome • Presentation

1

Basic Python Scripting in PowerFactory

Purpose:

Familiarisation with the general handling of the Python Programming Language in PowerFactory, e.g. How to create Python script in PowerFactory and how to access PowerFactory data by using Python.

Contents:

Creating a Python scripts in PowerFactory. Python PowerFactory module. ComPython Object. Simple Python Script examples.

Level:

Basic.

DIgSILENT PowerFactory Training’s Program

2

2

PowerFactory Objects access with Python

Purpose:

Learn to access objects of different classes and their attributes.

Contents:

Creating a Python scripts in PowerFactory. Basics of Object classes in PowerFactory. Object access. Read/Write of Objects attribute.

Level:

Basic.

3

Execution of the PowerFactory Commands with Python

Purpose:

Execute of calculation commands by using Python.

Contents:

Basics of Python methods in PowerFactory. Scripted execution of commands. Modify command attributes. Basic.

Level:

4

Report Results, Subroutines and Modules

Purpose:

Learn how to output customised results in the output window, use subroutines, keep the script readable by avoiding long code.

Contents:

Report Results in PowerFactory output window. Import modules. reloading modules. use of exceptions. Study case sweep.

Level:

Intermediate.

DIgSILENT PowerFactory Training’s Program

3

5

Results File

Purpose:

Get familiarised with the Result File element (ElmRes) and learn how to write it and read from it.

Contents:

Result file Handling. Writing/reading a Result File.

Level:

Intermediate.

6

Graphical Representation

Purpose:

Get familiarised with graphical representation in PowerFactory and learn how to create a plot.

Contents:

Virtual Instruments. Graphic Board. Create a plot and change its variables.

Level:

Intermediate.

7

Graphical User Interface

Purpose:

Get familiarised with graphical user interface build in library that Python offers, and implementation of the this library in PowerFactory.

Contents:

tkinter module. Tkinter objects widgets.

Level:

Advanced.

DIgSILENT PowerFactory Training’s Program

4

8

External File Access

Purpose:

Access an external file to read the date into PowerFactory or to write date out of PowerFactory into file.

Contents:

Write in an external csv file. read from an external csv file.

Level:

Advanced.

9

Component Object Models (Optional)

Purpose:

Presentation of one of many Python interfaces to Excel.

Contents:

basic of how to write data from PowerFactory to Excel.

Level:

Advanced.

DIgSILENT PowerFactory Training’s Program

5

View more...

Comments

Copyright ©2017 KUPDF Inc.
SUPPORT KUPDF