Ask Your Question

Ascegan's profile - activity

2022-02-21 08:10:40 -0500 received badge  Famous Question (source)
2021-10-12 09:17:11 -0500 received badge  Student (source)
2020-05-05 21:47:24 -0500 received badge  Notable Question (source)
2020-04-29 09:23:25 -0500 received badge  Popular Question (source)
2020-04-18 18:56:03 -0500 commented question How to handle "takes no keyword arguments" Error

Use the interpreter help(), it's more detailed and sometimes the API.pdf has inaccuracies help(psspy.load_data_4) Help on function load_data_4 in module psspy: load_data_4(i=None, id=None, intgar=None, realar=None, **kwds)

2020-04-18 18:35:38 -0500 commented answer How do I call a psspy function without listing every argument?

the API documentation is poor at defining the keywords; I suggest always use the interpreter: help(psspy.machine_chng_2) example: psspy.machine_chng_2(ibus=123456, id = '1') gives error: FATAL: Bus <omitted value=""> not found but help(psspy.machine_chng_2) shows that 'ibus=' should be 'i='

2020-04-17 19:39:04 -0500 commented answer loop only through EXISTING buses

Thanks, I found the "500kV buses" solution, it creates a subsystem first then outputs the bus quantities into a list, I added the feature below or organize the bus quantities into tuples: sortlist = list(zip(*target_buses)) One flaw : even setting abusint flag =2 won't pick up bus types 4,5,6,7.

2020-04-17 07:51:38 -0500 asked a question Remove all unbound items from slider diagram

I equivalenced low voltage busses and I want to clean up all the unbound (pink) items from the slider diagram, without clicking and deleting each one individually. I don't see any functions listed in API or in sliderPy module, where else could I look?

2020-04-15 04:37:37 -0500 received badge  Famous Question (source)
2020-04-13 09:21:37 -0500 received badge  Popular Question (source)
2020-04-13 09:21:37 -0500 received badge  Notable Question (source)
2020-04-11 18:20:04 -0500 asked a question loop only through EXISTING buses

I want to evaluate each bus in the case for mismatch. Instead of looping through 0 - 999999, is there a way to identify only bus numbers that are actually in use in the case? Otherwise I'm operating (getting error flag) on bus numbers that don't exist.

2020-03-15 17:06:38 -0500 received badge  Famous Question (source)
2020-02-11 15:17:41 -0500 received badge  Famous Question (source)
2020-01-30 09:15:45 -0500 received badge  Notable Question (source)
2020-01-30 09:15:45 -0500 received badge  Famous Question (source)
2020-01-30 09:15:45 -0500 received badge  Popular Question (source)
2020-01-23 11:42:20 -0500 asked a question output solution_paramters

How to output existing solution paramters using CLI? The API allows modification but I don't see that it reports the values currently in the snapshot:

psspy.dynamicssolutionparam_5([INTGAR],[REALAR])

is it possible with class PropertyHolder(builtin.object) or GETDEFAULTINT? [POMv33, 16.8]

2020-01-22 04:37:58 -0500 received badge  Popular Question (source)
2020-01-22 04:37:58 -0500 received badge  Notable Question (source)
2020-01-20 18:39:42 -0500 commented answer PSS/E crashes if i do not use a small integration step with user model , should it just not converge during the simulation??

Agreed that software should not crash for minor parameter issues like this one

2020-01-18 12:02:28 -0500 received badge  Enthusiast
2020-01-17 10:57:18 -0500 answered a question Examples of problems in PDEV/ODEV output

Below is the best I came up with to get all output to one file, its dependent on the order of commands (specify report device first) and the "open file for append" on the prompt and progress commands:

#open with ISLCT = 2 for a file
psspy.report_output(2,outputname+".all.log",[0,0])  #set option (1) to overwrite for existing files. Must do this one first to write all successive otput with option = 2, open file for append APIv33 1.277
psspy.prompt_output(2,outputname+".all.log",[2,0])  #set option(1) to 2 for 'open file for append'
psspy.progress_output(2,outputname+".all.log",[2,0])  
#all of the above written to the same file "outputname.all.log"

While adequate for simulation output, the above don't capture results of "DOCU" or "RAWD." IF anyone has a good writeup on PSSE output strategy, please share.

2020-01-17 08:58:22 -0500 received badge  Scholar (source)
2020-01-17 08:04:33 -0500 received badge  Notable Question (source)
2020-01-16 13:38:08 -0500 asked a question output starting channel index

Is there an API to output the starting channel index in v33? It's displayed, along with CONS, STATES, etc under "elements restored" after RSTR, and I know many functions use "-1" to automatically write to the next channel #, but I'd like to obtain the channel value itself.

2020-01-14 10:52:07 -0500 received badge  Popular Question (source)
2020-01-07 10:36:05 -0500 commented answer display pssarrays.iecs_currents as polar

Thanks. Also note iecs_currents() has to be re-run each time >>psspy.short_circuit_coordinates(0) # fmt=0 for rectangular (default), =1 for polar >>rlst=pssarrays.iecs_currents(1,0,1,0,0,0,0,0,0,0,1,1,0,0,0,1,0, 0.08333, 1.1,"","","") >>print rlst.flt3ph[0].ia1,"","","" (0.12169598043-3.092061281

2020-01-07 00:00:35 -0500 received badge  Notable Question (source)
2020-01-06 16:13:19 -0500 answered a question get bus number using facts device name

I ended up using a loop. It cycles through all FACTS devices to match a bus # to the name but there are ~ 10 in the case so it is quick. Inelegant escape from the way it exits: either return the bus # or just "not found"

def getname(busnum):
    ierr = psspy.inifax()
    ierr, nextfax = psspy.nxtfax()
    nextbus = ""
    while ierr ==0:
        ierr, nextbus = psspy.fcdint_2(nextfax, 'SEND')         
        if nextbus == busnum:
            #print "found it " + str(nextfax)
            return str(nextfax)
        else:
            ierr, nextfax = psspy.nxtfax()
    return "notfound"
2020-01-06 15:29:58 -0500 asked a question display pssarrays.iecs_currents as polar

After running pssarrays.iecs_currents(), rlst is returned with values in rectangular. After using the command, below, to change SC format to polar the results display in rectangular: What did I miss?

import pssarrays
psspy.bsys(1,0,[0.0,0.0],0,[],1,[9999],0,[],0,[])
rlst=pssarrays.iecs_currents(1,0,1,0,0,0,0,0,0,0,1,1,0,0,0,1,0, 0.08333, 1.1,"","","")

print rslt.scfmt
>rectangular
print rlst.flt3ph[0].ia1
>(0.12169598043-3.0920612812j)

rlst['scfmt'] = 'polar'

print rslt.scfmt
>polar
print rlst.flt3ph[0].ia1
>(0.12169598043-3.0920612812j)**
2020-01-06 11:48:12 -0500 received badge  Popular Question (source)
2020-01-02 14:33:03 -0500 asked a question get bus number using facts device name

I used the code below to get a list of FACTS device names (not dynamic model names). How can I retrieve the bus # for each loadflow model?

    ierr = psspy.inifax()
    ierr, nextfax = psspy.nxtfax()
    while ierr ==0:
        ierr, nextfax = psspy.nxtfax()
        print nextfax
    return      #exit out of the script
2019-12-31 12:42:17 -0500 commented answer Examples of problems in PDEV/ODEV output

How do you combine ODEV/PDEV output into a single file? I tried "append" to the first of the two files but the returned error is "file is in use"

2019-12-31 12:41:57 -0500 answered a question Examples of problems in PDEV/ODEV output

How do you combine ODEV/PDEV output into a single file? I tried "append" to the first of the two files but the returned error is "file is in use"