Sie sind auf Seite 1von 6

GUI_Automation

Page 1 of 6

Reproducing User Actions


A sequence of PSSE actions for batch commands may be recorded in a Python script (*.py, *.pyc, or *.pyw)
or Response file (*.idv). See Section 23.2, Creating Program Automation Files for details on specific types
of files.

I/O Control > Start recording

A file selector window opens for specification of the type of file to record and the file name.

I/O Control > Stop recording

When done recording, select I/O Control > Stop recording to close the file.

Creating Program Automation Files


Response File
IDEV

I/O Control > Start recording

An experienced user can create a response file using a text editor. The simplest and most robust way, however,
is to select the I/O Control > Start recording option. Note that this is equivalent to executing activity ECHO in
previous versions of PSSE.
Having selected a file, the user executes the required sequence of activities or operations using the menu and
toolbar functions in the interface. The resulting response file will contain, in Response File form, a series of
commands reflecting the users sequence of activities. The user can to tailor this basic Response File for
subsequent runs by editing the created response file by changing some of the filenames and bus numbers
specifying faulted nodes, switched branches, and so on.
As an example it can be assumed that, using the savnw.sav power flow case, the user wishes to open one
circuit between buses 151 and 152, solve the case, and then display the power flow results for bus 151.
Using the interface:

Right-click the branch in [Diagram] and select Switch from the pop-up menu.

Employ the Power Flow > Solution > Solve option or the Solve toolbar button.

Select the Bus Based Output toolbar button and, subsequently, bus number 151.

If this series of operations were recorded, a response file would be constructed (see Figure 23-1 Created
Response File).

mk:@MSITStore:C:\Program%20Files\PTI\PSSE33\PSSBIN\PSSE_OnlineHelp.chm::/G... 28/05/2015

GUI_Automation

Page 2 of 6

Created Response File


It can be seen that the Response file contains PSSE batch (BAT_) commands. Consequently, the manual
creation of a Response File, which could be done with the text editor, requires an intimate familiarity with the
PSSE batch commands. These commands are described in the PSSE API Manual.
Additional Information

PSSE Program Operation Manual,


Section 15.12, Running a Response File

Python and IPLAN Files


The process described in the previous section for creating a Response file can also be used to create a Python
file (*.py) by selecting this file type instead of the Response file type (*.idv). The file type is selected. The
program records the sequence of events selected by the user in the same manner.
Alternatively the user can
more sophisticated control
Standard concepts such as
language refer to a Python

create a Python file using the Python programming language. This will facilitate a
of PSSE by enabling looping and decision making based on results of analyses.
looping and subroutine calling are available. For details on the Python programming
reference book or http://www.python.org.

It is not possible to construct an IPLAN file using the PSSE recording facility. The file must be created
manually and compiled. It is very beneficial to be familiar with at least one programming language and the
standard programming concepts such as assignment statements, looping and subroutine calls.
For details on the IPLAN programming language, the IPLAN language interface to the PSSE working case and
dynamics data, and the IPLAN compiler, refer to the IPLAN Program Manual.
Additional Information

PSSE Program Operation Manual,


Section 15.4, Python Programs

Executing Automation Files


Run Automation File

I/O Control > Run program Automation file

Existing Python scripts (*.py), Response files (*.idv), IPLAN programs (*.irf) and PSAS/PSEB (*.psa/*.pse)
command files may be executed from within the user interface. PSSE will open a file selector window and
prompt for the appropriate filename to execute. Figure 23-2 Select Program Automation File Dialog shows
the dialog for selecting an Automation File:

mk:@MSITStore:C:\Program%20Files\PTI\PSSE33\PSSBIN\PSSE_OnlineHelp.chm::/G... 28/05/2015

GUI_Automation

Page 3 of 6

Select Program Automation File Dialog


Only five file types are shown. This is because command line input and batch commands can be assembled in
the same file, so the Response File file type (*.idv) is used for either (or both). When the selected file is
opened, the processes packaged in the Response file or programmed into the IPLAN or Python file will be
initiated.
A [Terminal Read] dialog (Figure 23-3 Terminal Read Dialog for Automated Activity) allows specification
of data output to a file. Clicking [OK] without specifying a filename sends the data to a Report tab.

mk:@MSITStore:C:\Program%20Files\PTI\PSSE33\PSSBIN\PSSE_OnlineHelp.chm::/G... 28/05/2015

GUI_Automation

Page 4 of 6

Terminal Read Dialog for Automated Activity

IPLAN Program File


EXEC
Requirements / Prerequisites
IPLAN Executable Program File generated by IPLAN language compiler program.

Select the desired IPLAN File (*.irf) from [Select Program Automation File to Run].
For details on the IPLAN programming language, the IPLAN language interface to the PSSE working case and
dynamics data, and the IPLAN compiler, refer to the IPLAN Program Manual.
Additional Information

PSSE Program Operation Manual,


Section 15.16, Launching an IPLAN Program File

PSEB Command File, Power Flow Calculation


PSEB
Requirements / Prerequisites
PSEB Command file (*.pse)

Select the desired PSEB Command File (*.pse) from [Select Program Automation File to Run].
Additional Information

PSSE Program Operation Manual,


Section 15.14, Building a Response File, Power Flow Calculation

PSAS Command File, Dynamic Simulation


PSAS

mk:@MSITStore:C:\Program%20Files\PTI\PSSE33\PSSBIN\PSSE_OnlineHelp.chm::/G... 28/05/2015

GUI_Automation

Page 5 of 6

Requirements / Prerequisites
PSAS Command file (*.psa)

Select the desired PSAS Command File (*.psa) from [Select Program Automation File to Run].
Additional Information

PSSE Program Operation Manual,


Section 15.15, Building a Response File, Dynamic Simulation

Argument Passing
These actions allow arguments to be passed to a response file. Highlight the desired file on [Select Program
Automation File to Run] (Figure 23-2 Select Program Automation File Dialog). Click [Arguments]. The
[Automation Arguments] dialog (Figure 23-4 Automation Arguments Dialog) allows a single line of
arguments to be input.
Enter the argument string in the text box provided, and click [OK]. Click [Open] to run the automation file.
The response file will be executed within the PSSE user interface with results being displayed appropriately to
[Spreadsheet] and Report and Progress tabs.

Automation Arguments Dialog


Additional Information

PSSE Program Operation Manual,


Section 15.7.1, Arguments in Python Files
Section 15.7.2, Arguments in Response Files
Section 15.7.3, Arguments in IPLAN Files

Re-Run Last Automation File

I/O Control > Re-run program Automation file

When the re-run option is selected, the last-run automation file will run again without reselecting it from a file
selector window. The [Terminal Read] dialog (Figure 23-3 Terminal Read Dialog for Automated Activity)
allows specification of data output to a file. Clicking [OK] without specifying a filename sends the data to a
Report tab.

Editing an Automation File

mk:@MSITStore:C:\Program%20Files\PTI\PSSE33\PSSBIN\PSSE_OnlineHelp.chm::/G... 28/05/2015

GUI_Automation

Page 6 of 6

I/O Control > Edit last recorded program Automation file

If a text editor has been defined in the [Preferences] dialog (see Changing Program Preferences), selecting
this option will display the last Automation file recorded by the program. If this is selected, the text editor will
display the file as it is created. You may have to refresh the view in the text editor to see the changes in the
file.

I/O Control > Edit last run program Automation file

If a text editor has been defined in the [Preferences] dialog, selecting this option will display the last
Automation file run by the program. If this is selected, the text editor will display the last Automation file run
by the program. Selecting this item will re-run the last selected program automation file without forcing you to
re-select it.
Additional Information

PSSE Program Operation Manual,


Section 15.13, Recording User Actions

Inserting Comments into the Progress Output


TEXT
Misc > Insert text into the Progress stream (TEXT)

During the operation of PSSE, a variety of information is sent to the Progress tab. This function provides a
mechanism for inserting descriptive comments. Comments can be directed to any output device selected for
recording the work session (see OPEN). A comment or message is entered directly into the input field in the
dialog.

Insert Text into the Progress Stream Dialog


Additional Information

PSSE Program Operation Manual,


Section 17.16, Inserting Comments into the Progress Output

This page intentionally left blank.

mk:@MSITStore:C:\Program%20Files\PTI\PSSE33\PSSBIN\PSSE_OnlineHelp.chm::/G... 28/05/2015

Das könnte Ihnen auch gefallen