[英]Creating a Case in PSSE
I have data in an excel file that I would like to use to create a case in PSSE. 我有一个Excel文件中的数据,我想用它在PSSE中创建案例。 The data is organized as it would appear in a case in PSSE (ie. for bus Bus number, name, base kV, and so on. Of course the data can be entered manually but I'm working with over 500 buses. I have tried copied and pasting, but that seems to works only sometimes. For machine data, it barely works.
数据的组织方式与PSSE中的情况相同(例如,总线的总线号,名称,基本kV等。当然可以手动输入数据,但我使用的是500辆以上的总线。尝试复制和粘贴,但这似乎仅在某些情况下有效,对于机器数据,它几乎不起作用。
Is there a way to import this data to PSSE from an excel file? 有没有办法将这些数据从Excel文件导入PSSE? I have recently started running PSSE with Python, and maybe there is a way to do this?
我最近开始用Python运行PSSE,也许有办法做到这一点?
-- MK. -MK。
If you have an Excel data file with exactly the same "format" and same "info" as the regular case file (.sav), try this: 如果您具有与常规案例文件(.sav)完全相同的“格式”和“信息”的Excel数据文件,请尝试以下操作:
Open any small example .sav file from the example sub-folder PSSE's installation folder 从示例子文件夹PSSE的安装文件夹中打开任何小的示例.sav文件
Copy the corresponding spreadsheet to the working case (shown in spreadsheet view) with the same "info" (say, bus, branch,etc.) in PSSE GUI 在PSSE GUI中使用相同的“信息”(例如,总线,分支等)将相应的电子表格复制到工作用例(在电子表格视图中显示)
After finishing copying everything, then save the edited working case in GUI as a new working case. 复制完所有内容后,然后将已编辑的工作案例保存在GUI中作为新的工作案例。
If this doesn't work, I suggest you to ask this question on forum of "Python for Power Systems": https://psspy.org/psse-help-forum/questions/ 如果这行不通,建议您在“ Python for Power Systems”论坛上提问: https : //psspy.org/psse-help-forum/questions/
Yes. 是。 You can import data from an excel file into PSSE using the python package xlrt, however, I would reccomend instead converting your excel file to csv before you import and use csv as it is much easier.
您可以使用python软件包xlrt将数据从excel文件导入PSSE,但是,我建议您在导入和使用csv之前先将excel文件转换为csv,因为这要容易得多。 Importing data using the API is not just a copy and paste job, into the nicely tabulated spreadsheet that PSSE has in its case data.
使用API导入数据不仅是复制和粘贴作业,而且还包含到PSSE案例数据中的表格中。
Refer to the API documentation for PSSE, chapter II. 请参阅PSSE的API文档,第二章。 Search this function, BUS_DATA_2.
搜索此功能BUS_DATA_2。 You will see that you can create buses with this function.
您将看到可以使用此功能创建总线。
So your job should be three fold. 因此,您的工作应该是三方面的。
Import the csv file data with each line being a list of each data parameter for your bus. 导入csv文件数据,每行是您的总线的每个数据参数的列表。 Like voltage, name, baseKV, PU etc. Store it to another list.
如电压,名称,baseKV,PU等。将其存储到另一个列表中。
Iterate through the new list you just created and call: 遍历刚创建的新列表并调用:
ierr = bus_data_2(i, intgar, realar, name)
and pass in your data from the csv file. 并从csv文件中传入您的数据。 (see PSSE API documentation on how to do this) This will effectively load data from the csv file to your case ( in the form of nodes or buses).
(有关如何执行操作,请参阅PSSE API文档。)这将有效地将csv文件中的数据加载到您的案例中(以节点或总线的形式)。
Note: there are functions to load in line data, fix shunt data, generator data etc. 注意:具有加载线路数据,修复并联数据,发电机数据等功能。
Your other option is to call up the PTI folks as they can give you training. 您的另一个选择是致电PTI人员,因为他们可以为您提供培训。
Good luck 祝好运
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.