3

How do I change the loads on PSSE?

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

AaronH's avatar
45
AaronH
asked 2012-07-10 08:05:38 -0500, updated 2012-07-10 08:07:58 -0500
edit flag offensive 0 remove flag close merge delete

Comments

How do I edit my question?

AaronH's avatar AaronH (2012-07-10 08:07:22 -0500) edit

Ok I found how to edit thanks

AaronH's avatar AaronH (2012-07-10 08:07:39 -0500) edit
add a comment see more comments

2 Answers

2

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.

Daniel_Hillier's avatar
462
Daniel_Hillier
answered 2012-07-10 20:20:27 -0500
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments
1

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!

AaronH's avatar
45
AaronH
answered 2012-07-11 03:21:34 -0500, updated 2012-07-11 03:26:51 -0500
edit flag offensive 0 remove flag delete 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's avatar Daniel_Hillier (2012-07-12 00:23:34 -0500) edit
add a comment see more comments

Your Answer

Login/Signup to Answer