0

DIgSILENT Powerfactory and Python scripts

I've heard of some people using Python with DIgSILENT's PowerFactory product (A competitor for PSS/E).

So my question is have you ever used Python and PowerFactory, or would you want to?

If you can, post some example code that you might run.

(edit) I have seen that PowerFactory has their own language that is used for scripting, what does that look like?

JervisW's avatar
1.3k
JervisW
asked 2012-10-23 19:13:08 -0500, updated 2012-10-23 19:14:16 -0500
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

4 Answers

2

I have used Python with PowerFactory, but only since the recently released Version 15.1.

You can run python scripts from within and outside PowerFactory. Outside you first get Python to start PowerFactory.

From within PowerFactory the scripts are quite straight forward. For example:

import powerfactory
app = powerfactory.GetApplication()
app.PrintPlain('Hello World')

Will write "Hello World' to the output box in PowerFactory. Running Python from the outside to run PowerFactory is a little more complicated, but not too bad.

PowerFactory's own language is called DLP. It is like C, but not quite. It can be a little restrictive. You are limited to its inbuilt data types which aren't particularly comprehensive.

Theoretically it can be interfaced with to outside PowerFactory, but this is limited - you cannot run DLLs that open dialog boxes.

mgb158's avatar
36
mgb158
answered 2014-02-09 05:41:49 -0500
JervisW's avatar
1.3k
JervisW
updated 2014-02-10 03:54:43 -0500
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments
1

I've just started playing with the python module in Digsilent Powerfactory

You'll have to figure out the following link. My karma is too low apparently.

github.com/cmoman/thrreadingdigsilent/blob/master/threadingex1.py

The script above is written in PyQt and is used to drive PowerFactory from an external script. I was tinkering with threading so that my GUI would remain responsive while PowerFactory was solving a load flow etc. It is more complicated that it needs to be.

It's helpful to keep the DigSilent object alive (instantiate it the main loop) since the logging in and setting up the model takes quite a bit of time. If you read my code you'll see I instantiated in the main loop and then pass it to the MainWindow and all the way to the thread.

Cheers Chris

cmoman's avatar
11
cmoman
answered 2014-11-08 05:15:25 -0500
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments
0

I want to use phyton and PowerFactory

rdavid_455_87's avatar
1
rdavid_455_87
answered 2014-02-07 18:23:26 -0500
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments
0

Dear friend

Can you help me on the topic monitoring, any information you can help me solve my problem. The raises the question, whether the software has the ability to connect directly to a smart grid and all the network information that exists in every moment to be online display and can automatically analyze the network at any moment. Whether it has the ability to get the information To be online ? In my opinion this is a powerful software should have the ability !! Please do not hesitate to help me.

Majid Saeedi Curious researcher

majid saeedi's avatar
1
majid saeedi
answered 2015-08-22 10:04:34 -0500
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments

Your Answer

Login/Signup to Answer