Ask Your Question
1

How to create a N-1 generator contingency list that enumerates every single generator in a subsystem?

asked 2014-08-13 21:55:18 -0600

ypwang gravatar image

Hello everyone,

I wanted to create a N-1 generator contingency list that enumerates every single generator in a subsystem in PSS\E GUI. But when creating .con file, the only relevant option "single contingency" just create a single branch contingency list for me. I don't know why it doesn't also give me a single generator contingency list. Did I miss checking some options while creating .con file?

After searching one manual called "POM.pdf", I found a useful command "SINGLE MACHINE IN SUBSYSTEM 'SUBSYSNAME' ". But the problem is that it only trip the generator with largest capacity in each bus in the specific subsystem, not tripping every single generator as I wanted.

Does anyone happen to know how to fix this problem?

Your advice and comment would be greatly appreciated. Sincerely, -YP

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2014-08-16 14:16:40 -0600

ypwang gravatar image

updated 2014-08-17 19:35:16 -0600

JervisW gravatar image

I figured out a way to create all N-1 generator contingency list by writing commands "REMOVE MACHINE [MCID] FROM BUS [BUSID]" explicitly one by one to the .con file. But my module I used in my problem is based on the possibility that you know how to associated a GUI defined subsystem label to a valid subsystem id (0~11). Right now, I use the whole working case as a subsystem, so that the subsystem id is equal to -1.

def createConFile(psspy, conFileName, subsysID, subSysLabel):

    # manipute with working case data- all returned data are in the same order
    ierr, (allMachID,) = psspy.amachchar(subsysID, 4, 'ID')   # return total number of machines in working case
    print "machID =", allMachID

    ierr, (busNums,) = psspy.amachint(subsysID, 4, 'NUMBER') 
    print "list of bus numbers ", busNums

    conFile = open(conFileName, 'w')

    # .con file header
    conFile.write("/PSS(R)E 33\n")
    conFile.write("COM\n")
    conFile.write("COM CONTINGENCY description file entry created by PSS(R)E Config File Builder \n")
    conFile.write("COM\n")
    conFile.write("SINGLE BRANCH IN SUBSYSTEM '%s' \n\n" % subSysLabel)

    # contingencies for removing each specified machine 
    for machid, busnum in zip(allMachID, busNums): 
        conFile.write("CONTINGENCY 'MACHINE %d-BUS%d' \n" %( int(machid), busnum))
        conFile.write('REMOVE MACHINE %s FROM BUS %d \n' %(machid, busNum))
        conFile.write('END \n\n')

    conFile.write('END')
    conFile.close()

Hope someone will find this helpful.

edit flag offensive delete link more

Comments

Looks like a good solution! I hope that one day PSS/e provides a direct API for this rather than requiring us to write out physical files.

JervisW gravatar imageJervisW ( 2014-08-17 19:38:27 -0600 )edit

I hope so too. This way will make PSS\E more friendly to users. And thanks so much for your neat editing of my code!

ypwang gravatar imageypwang ( 2014-08-17 20:34:07 -0600 )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: 2014-08-13 21:55:18 -0600

Seen: 4,787 times

Last updated: Aug 17 '14