Ask Your Question
0

Creating Contingency Solution Output File for PSS/E

asked 2016-02-03 06:59:42 -0500

Magalhaes gravatar image

updated 2016-02-03 07:01:06 -0500

Hi everyone, I'm trying to create *.acc file for pss/e using python. I can do this easily using pss/e itself:

1 - create *.sub, *.mon, *.con files

2 - create respective *.dfx file

3 - and finally create *.acc file

The idea is to perform all these 3 tasks automatically, using python. So, using the record tool from psse I get this code:

psspy.bsys(0,0,[ 230., 230.],1,[1],0,[],0,[],0,[])

psspy.bsys(0,0,[ 230., 230.],1,[1],0,[],0,[],0,[])

psspy.dfax([1,1],r"""PATH\reports.sub""",r"""PATH\reports.mon""",r"""PATH\reports.con""",r"""PATH\reports.dfx""")

psspy.acccwithdsp_3( 0.5,[0,0,0,1,1,2,0,0,0,0,0],r"""IEEE""",r"""PATH\reports.dfx""",r"""PATH\reports.acc""","","","")

psspy.acccsinglerunreport4([1,1,2,1,1,0,1,0,0,0,0,0],[0,0,0,0,6000],[ 0.5, 5.0, 100.0,0.0,0.0,0.0, 99999.],r"""PATH\reports.acc""")

It happens that when I run this code on python, the *.sub, *.mon, *.con and *.dfx files are not created thus the API acccsinglerunreport4 reports an error. Can anyone tell me why these files aren't being created with this code?

Thanks in advance for your time

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
0

answered 2016-02-03 12:58:32 -0500

jconto gravatar image

In v. 33, perform step 1 from GUI, not from a script (the python code created by the recording function does not work properly on this task). Load your case, open 'Power Flow' then 'Linear Network' then 'Create/Modify SUB, MON, CON configuration files'. Select your settings and then 'GO'. The output are the corresponding SUB, MON, CON configuration files.

You can use these SUB, MON, CON configuration files as seed for other run by changing its content using python, like changing an area number in the SUB file, a voltage range in the MON file or contingencies in the CON file.

Before step 2, check that step 1 was done without errors. Step 2 and 3 should work OK.

edit flag offensive delete link more
0

answered 2016-02-03 14:13:10 -0500

Magalhaes gravatar image

basically, step 1 can't be done form python right? I was afraid of that, thanks anyway :)

edit flag offensive delete link more

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

1 follower

Stats

Asked: 2016-02-03 06:59:42 -0500

Seen: 3,712 times

Last updated: Feb 03 '16