Ask Your Question

Daniel_Hillier's profile - activity

2023-10-25 12:00:09 -0500 received badge  Good Question (source)
2023-10-23 12:24:36 -0500 received badge  Great Answer (source)
2023-10-23 12:24:36 -0500 received badge  Guru (source)
2017-08-07 21:23:13 -0500 received badge  Good Answer (source)
2016-05-09 21:11:58 -0500 marked best answer What does ierr8 (three-winding transformer table is full) for the three winding transformer mean?

I am trying to add a series of three winding transformers to a case and I received this error and the PSSEAPI documentation is not exactly verbose on this error:

"IERR = 8 three-winding transformer table is full"

What is the problem behind this error message and how do I avoid it?

2016-04-11 00:40:01 -0500 marked best answer How do I import the psspy module in a Python script?

I've been running PSSE from the Graphical interface for a while now, but a colleague told me I could automate some tasks by using Python to run the show. I'm familiar with Python and I've tried importing the psspy module by issuing,

import psspy

at the start of the script but I am getting this error:

Traceback (most recent call last):
  File "qv.py", line 1, in <module>
    import psspy
ImportError: No module named psspy

What am I missing?

2016-04-11 00:40:01 -0500 marked best answer How do I call a psspy function without listing every argument?

Many psspy functions take an enormous number of arguments. In most cases I am using the defaults except for one or two arguments that I actually wish to specify. How can I make my code easier to read by calling the functions with only the arguments I want.

In particular, I am looking for the methodology to take the arguments I want to specify from the Python PSSE API document (normally listed under OPTIONS, INTGAR, etc.) for a particular function and only passing them to the function in my code.

Here is an example piece of API documentation:

1.61 FNSL Use this API to apply the Newton-Raphson power flow calculation (activity FNSL).
...
Python Syntax:
ierr = fnsl(options)
...
where:

Integer OPTIONS(8) Is an array of eight elements specifying solution options (input).
The values are as follows:

OPTIONS(1) tap adjustment flag (use tap adjustment option setting by default).
OPTIONS(1) = 0 disable.
OPTIONS(1) = 1 enable stepping adjustment.
OPTIONS(1) = 2 enable direct adjustment.
OPTIONS(2) area interchange adjustment flag (use area interchange adjustment option setting by default).
OPTIONS(2) = 0 disable.
OPTIONS(2) = 1 enable using tie line flows only in calculating area interchange.
etc...

How would I call this function with only issuing keyword arguments for, say, only OPTIONS(2) and not specifying OPTIONS(1)?

2016-04-11 00:40:01 -0500 marked best answer How do I create a bus using psspy?

What function should I use to create a new bus. I have seen the functions psspy.ltap, psspy.splt and probably others to create a new bus from an existing element on the network, but I am not familiar with the function to create a bus from nothing.

2016-04-11 00:39:59 -0500 marked best answer How do I find all in-service branches connected to out of service buses?

While trying to solve a case PSSE presented me (rather quietly) with:

ERROR:  1 IN-SERVICE BRANCHES CONNECTED TO TYPE  4 BUS  65960 [CNOR011E    11.000]

So it is pretty obvious what I have done wrong here: I have an in-service branch connected to an out of service bus.

My question is how do I find the branch (and preferably any other offending buses and branches) using Python?

2016-04-11 00:39:58 -0500 marked best answer How do I find an available bus number?

I am looking to add a bus to an existing network. Ignoring any numbering conventions my colleagues may have, how do I find a available bus number to use?

2016-04-11 00:39:57 -0500 marked best answer Is it possible to have two versions of PSSE installed simultaneously?

Is it possible to have PSSE32 and PSSE33 (or any two different versions) installed simultaneously?

2016-04-11 00:39:57 -0500 marked best answer How do I delete a bus from a working case?

In a previous question I learnt how to add a bus to a working case (psspy.bus_data_2(...)), now I would like to know how to completely remove a bus from a working case?

2013-08-05 16:56:45 -0500 marked best answer What is the purpose for the default type values _i, _f, _s and _o?

The title says it all. What do psspy._i, psspy._f, psspy._s and psspy._o do and why are they necessary. I have repeatedly been seeing a string of these guys being passed to calls to the PSSE API (particularly when examining the PSSE Python recorder output).

For example,

psspy.solution_parameters_3(
    [_i,200,_i],
    [_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f])
2013-08-05 16:51:54 -0500 received badge  Famous Question (source)
2013-08-05 16:50:37 -0500 received badge  Good Answer (source)
2013-08-05 16:50:37 -0500 received badge  Enlightened (source)
2013-04-19 06:52:01 -0500 received badge  Famous Question (source)
2013-04-12 21:34:44 -0500 received badge  Famous Question (source)
2013-04-12 21:34:44 -0500 received badge  Notable Question (source)
2013-04-12 21:34:44 -0500 received badge  Popular Question (source)
2013-04-12 21:30:47 -0500 received badge  Famous Question (source)
2013-04-05 17:10:12 -0500 commented answer PSSPY.(what?) Reactive power

yep the second argument is a string, I believe you can still use `load_data_3` in PSSE33 is that right? So unless I make a mistake in my code (it isn't tested) it should work fine. so my function `add_load_to` is a wrapper for `load_data_x` where `x` can be 3 or 4.

2013-04-05 08:44:22 -0500 commented answer PSSPY.(what?) Reactive power

ierr = psspy.load_data_4(x, 1, [1,1,1,1,0,0], [20,20,0,0,0,0]) File ".\psspy.py", line 22150, in load_data_4 TypeError: must be string, not int I don't understand what argument should be a string. In the API document for `load_data_4` there is no string.

2013-04-05 08:43:14 -0500 commented answer PSSPY.(what?) Reactive power

That's good. I have to define "`add_load_to`" for Python, isn't it? Now I have found the function "`load_data_4`" from PSSE to do the same. I am using it but id does not work. I get this in the prompt:

2013-02-15 13:01:42 -0500 received badge  Famous Question (source)
2013-02-15 13:01:42 -0500 received badge  Notable Question (source)
2012-11-21 06:15:41 -0500 received badge  Notable Question (source)
2012-10-23 00:46:35 -0500 received badge  Famous Question (source)
2012-10-11 14:19:28 -0500 received badge  Notable Question (source)
2012-10-11 14:19:28 -0500 received badge  Famous Question (source)