简体   繁体   English

在PSSE中创建案例

[英]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数据文件,请尝试以下操作:

  1. Open any small example .sav file from the example sub-folder PSSE's installation folder 从示例子文件夹PSSE的安装文件夹中打开任何小的示例.sav文件

  2. 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中使用相同的“信息”(例如,总线,分支等)将相应的电子表格复制到工作用例(在电子表格视图中显示)

  3. 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. 因此,您的工作应该是三方面的。

  1. 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等。将其存储到另一个列表中。

  2. 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文件中的数据加载到您的案例中(以节点或总线的形式)。

  1. After you are finished, you will need to call a function called psspy.save("Casename.sav") to save your work in a new PSSE case. 完成后,您将需要调用一个名为psspy.save(“ Casename.sav”)的函数,以将工作保存在新的PSSE情况下。

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.

相关问题 PSSE / Python导入excel值并从PSSE导出总线电压 - PSSE/Python import excel values and export bus voltages from PSSE Python / PSSE错误:TypeError:必须为整数 - Python/PSSE Error: TypeError: an integer is required 从 python 脚本在 PSSE 中编辑生成器 - Editing Generator in PSSE from python script 如何在PSSE上查找/修复属性错误? - How to find / fix attribute error on PSSE? 这是创建 python 元类的好案例吗? - Is this a good case for creating a python metaclass? 我正在创建一个字典,但我真的想要一个列表,这种情况下的语法是什么? - Im creating a dict but I really want a list, what is the syntax in this case? 创建新变量时将 Case=False 添加到我的代码中 - Add Case=False to my code when creating a new variable 创建一个能够根据给定参数生成函数对象(在这种情况下为分段函数)的脚本 - Creating a script capable of generating function objects (piecewise functions in this case) from given parameters 试图找到这种特殊情况的正则表达式? 我也可以在不创建组的情况下解析它吗? - Trying to find the regex for this particular case? Also can I parse this without creating groups? Pandas:如果预先存在的列包含某个值,则使用“是”创建一个新列,如果该列的值为“”,则创建一个“否” - Pandas: creating a new column with “Yes” in case a pre-existing column contains some value and “No” if the value of the column is ' '
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM