First time here? We are a friendly community of Power Systems Engineers. Check out the FAQ!

Ask Your Question
3

How do I change the loads on PSSE?

asked Jul 10 '12

AaronH gravatar image

updated Jul 10 '12

I have 5 loads attached to one bus. I need to increase the P and Q for all of the loads. How can I do that using Python and PSSE? I already know how to do this by clicking on the grid editor inside of PSSE.

Must I use lodint from the psspy manual?

Thanks ahead

Aaron

Comments

How do I edit my question?

AaronH gravatar imageAaronH (Jul 10 '12)

Ok I found how to edit thanks

AaronH gravatar imageAaronH (Jul 10 '12)

2 answers

Sort by » oldest newest most voted
2

answered Jul 11 '12

Daniel_Hillier gravatar image

To change (or create) a load using psspy, use the load_data_3 function. lodint is used to retrieve the values already set at a particular load.

The load_data_3 function can be used as:

ierr = load_data_3(i, id, intgar, realar)

where, i is the bus the load is attached to and id is the load id. These are used to uniquely specify the load you wish to alter.

The arguments intgar and realar are arrays containing the values of the load you wish to change.

Instead of specifying every value in the intgar or realar arrays, the API lets you just specify the elements of intgar and realar that are changing. This makes your code much more readable and easier to work with.

For instance, for the load '1' at bus 5, if I wanted to just change intgar4 (area number), realar1 (const. power active load) and realar5 (const. admittance active load), I would issue this command:

ierr = load_data_3(5, '1', intgar4=11, realar1=60, realar5=12.67)

A listing of all the parameters that can be set using load_data_3 can be found in the load_data_3 section of Chapter 2 of the PSSE Python API document. Chapter 2 also describes the functions for creating or altering other power flow element types.

See this answer about calling psspy functions without listing every argument.

link
1

answered Jul 11 '12

AaronH gravatar image

updated Jul 11 '12

Thank you daniel. It works for me but. I had to change the bus numbers to get it working properly.

I had to write this for it to work

load_data_3(1043, '1', [_i, _i, _i, _i], [2.3, _f, _f, _f, _f, _f])

but then I get a new error:

NameError _i not found. I think there is a problem with the solution. Can it be fixed?

Thanks ahead!

link

Comments

2

`_i` and `_f` are apart of the psspy module. Access them by `psspy._i` or `psspy._f`. Using arrays of `_i` and `_f` values makes your code hard to read. An equivalent call to what you have above is: `load_data_3(1043, '1', realar1=2.3)`. See the link at the end of my answer for more info.

Daniel_Hillier gravatar imageDaniel_Hillier (Jul 12 '12)

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.
Want to format code in your answer? Here is a one minute demo on Youtube

Add Answer

[hide preview]

Question Tools

Stats

Asked: Jul 10 '12

Seen: 3,839 times

Last updated: Jul 11 '12