Ask Your Question
3

How do I change the loads on PSSE?

asked 2012-07-10 08:05:38 -0500

AaronH gravatar image

updated 2012-07-10 08:07:58 -0500

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

edit retag flag offensive close merge delete

Comments

How do I edit my question?

AaronH gravatar imageAaronH ( 2012-07-10 08:07:22 -0500 )edit

Ok I found how to edit thanks

AaronH gravatar imageAaronH ( 2012-07-10 08:07:39 -0500 )edit

2 answers

Sort by ยป oldest newest most voted
2

answered 2012-07-10 20:20:27 -0500

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.

edit flag offensive delete link more
1

answered 2012-07-11 03:21:34 -0500

AaronH gravatar image

updated 2012-07-11 03:26:51 -0500

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!

edit flag offensive delete link more

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 ( 2012-07-12 00:23:34 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

[hide preview]

Question Tools

Stats

Asked: 2012-07-10 08:05:38 -0500

Seen: 2,958 times

Last updated: Jul 11 '12