Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

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.