PSSE Online

6
Reproducing User Actions A sequence of PSS®E 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 PSS®E. 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 user’s 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). Page 1 of 6 GUI_Automation 28/05/2015 mk:@MSITStore:C:\Program%20Files\PTI\PSSE33\PSSBIN\PSSE_OnlineHelp.chm::/G...

description

PSSE Online

Transcript of PSSE Online

  • 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).

    Page 1 of 6GUI_Automation

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

  • 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.

    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 create a Python file using the Python programming language. This will facilitate a more sophisticated control of PSSE by enabling looping and decision making based on results of analyses. Standard concepts such as looping and subroutine calling are available. For details on the Python programming language refer to a Python 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.

    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:

    Additional Information

    PSSE Program Operation Manual, Section 15.12, Running a Response File

    Additional Information

    PSSE Program Operation Manual, Section 15.4, Python Programs

    Page 2 of 6GUI_Automation

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

  • 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.

    Page 3 of 6GUI_Automation

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

  • Terminal Read Dialog for Automated Activity

    IPLAN Program File

    EXEC

    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.

    PSEB Command File, Power Flow Calculation

    PSEB

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

    PSAS Command File, Dynamic Simulation

    PSAS

    Requirements / Prerequisites

    IPLAN Executable Program File generated by IPLAN language compiler program.

    Additional Information

    PSSE Program Operation Manual, Section 15.16, Launching an IPLAN Program File

    Requirements / Prerequisites

    PSEB Command file (*.pse)

    Additional Information

    PSSE Program Operation Manual, Section 15.14, Building a Response File, Power Flow Calculation

    Page 4 of 6GUI_Automation

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

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

    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

    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

    Requirements / Prerequisites

    PSAS Command file (*.psa)

    Additional Information

    PSSE Program Operation Manual, Section 15.15, Building a Response File, Dynamic Simulation

    Additional Information

    PSSE Program Operation Manual, Section 15.7.1, Arguments in Python Files

    Section 15.7.2, Arguments in Response FilesSection 15.7.3, Arguments in IPLAN Files

    Page 5 of 6GUI_Automation

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

  • 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.

    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

    This page intentionally left blank.

    Additional Information

    PSSE Program Operation Manual, Section 15.13, Recording User Actions

    Additional Information

    PSSE Program Operation Manual,Section 17.16, Inserting Comments into the Progress Output

    Page 6 of 6GUI_Automation

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