简体   繁体   English

使用Python 2.7为PSS / E创建应急解决方案输出文件

[英]Creating Contingency Solution Output File for PSS/E using Python 2.7

I'm using python to interact with PSS/E (siemens software) and I'm trying to create *.acc file for pss/e, from python. 我正在使用python与PSS / E(西门子软件)进行交互,并且试图通过python为pss / e创建* .acc文件。 I can do this easily using pss/e itself: 我可以使用pss / e本身轻松地做到这一点:

1 - create *.sub, *.mon, *.con files 1-创建* .sub,*。mon,*。con文件

2 - create respective *.dfx file 2-创建相应的* .dfx文件

3 - and finally create *.acc file 3-最终创建* .acc文件

The idea is to perform all these 3 tasks automatically, using python. 这个想法是使用python自动执行所有这三个任务。 So, using the record tool from pss/e I get this code: 因此,使用pss / e中的记录工具,我得到以下代码:

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

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.dfax([1,1],R “” “PATH \\ reports.sub” “”,R “” “PATH \\ reports.mon” “”,R “” “PATH \\ reports.con” “”,R “” “路径\\ reports.dfx” “”)

psspy.accc_with_dsp_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.accc_with_dsp_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.accc_single_run_report_4([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""") psspy.accc_single_run_report_4([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 accc_single_run_report_4() reports an error. 碰巧当我在python上运行此代码时,未创建* .sub,*。mon,*。con和* .dfx文件,因此API accc_single_run_report_4()报告了错误。 Can anyone tell me why these files aren't being created with this code? 谁能告诉我为什么没有用此代码创建这些文件?

Thanks in advance for your time 在此先感谢您的时间

@Magalhaes, the auxiliary files *.sub, *.mon and *.con are input files. @Magalhaes,辅助文件* .sub,*。mon和* .con是输入文件。 You have to write them; 你必须写它们; PSSE doesn't generate them. PSSE不会生成它们。 Your recording shows that you defined a bus subsystem twice, generated a *.dfx from existing auxiliary files, ran an AC contingency solution, then generated an *.acc report. 记录显示您定义了两次总线子系统,从现有辅助文件生成了* .dfx,运行了AC应急方案,然后生成了* .acc报告。 So when you did this recording, you must have started with already existing auxiliary files. 因此,在执行此录制时,必须先从已经存在的辅助文件开始。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM