简体   繁体   English

如何通过 Python 代码访问 PSSE 工作案例变量

[英]How to access PSSE working case variables by Python a code

I am a transmission planning engineer and trying to automate the execution of PSSE 100 times or more at one go through a Python code.我是一名传输规划工程师,并试图通过 Python 代码一次自动执行 PSSE 100 次或更多次。 I already runs, change loads, reruns psse and write bus based summary report to *.csv file.我已经运行、更改负载、重新运行 psse 并将基于总线的摘要报告写入 *.csv 文件。 What I really want to do is select the first active power load variable of a PSSE case and increase it by 1 MW.我真正想做的是选择 PSSE 案例的第一个有功功率负载变量并将其增加 1 MW。 Then run psse, write results to a csv file.然后运行 ​​psse,将结果写入 csv 文件。 Change the selected load back to its original value and move on to the next active load to do the same again and again until I have done same for all load busses.将选定的负载更改回其原始值,然后转到下一个活动负载,一遍又一遍地执行相同的操作,直到我对所有负载总线都做了相同的操作。

This will help me to calculate transmission loss factors for entire network with one go.这将帮助我一次性计算整个网络的传输损耗因子。

Thanks谢谢

@dsmtlk, if you're experienced in Python, you can readily find the information you need in the PSSE API Manual located in your PSSE program folder (mine is in C:\\Program Files (x86)\\PTI\\PSSE33\\DOCS). @dsmtlk,如果您有 Python 经验,您可以在 PSSE 程序文件夹中的 PSSE API 手册中轻松找到所需的信息(我的位于 C:\\Program Files (x86)\\PTI\\PSSE33\\DOCS)。 The API routines for getting bus data are in section 8.6.用于获取总线数据的 API 例程在 8.6 节中。 The routine for changing bus data—viz., psspy.load_data_4() —is in section 2.21.更改总线数据的例程——即psspy.load_data_4() ——在 2.21 节中。

If you're new to Python, here are a couple links I found helpful when I first started:如果您是 Python 新手,以下是我在刚开始时发现有用的几个链接:

https://docs.python.org/2/tutorial/ https://docs.python.org/2/tutorial/

http://www.tutorialspoint.com/python/ http://www.tutorialspoint.com/python/

I am new to PSSE as well as Python. 我是PSSE和Python的新手。 I am trying to do exactly what you have done by using Python in order to calculate the transmission losses. 我正在尝试使用Python来做您所做的事情,以便计算出传输损耗。 Is it possible to share with me your code in Python and any advice or guide in that regard will be highly appreciated. 是否可以与我分享您在Python中的代码,在这方面的任何建议或指南将受到高度赞赏。

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

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