Powerflow Command Language (PCL)

Introduction

The commands listed below are those currently available in the Powerflow Command Language (PCL). This language was developed to meet the needs of communication between the GUI and the Powerflow server (ipfsrv), but is also available for direct user entry via the Command Dialog in the GUI or loading of a PCL command file in the GUI, and via the ipfbat command line process, by invoking the same command file. However, since ipfsrv is expecting these commands to have been generated by another program, it expects them to be syntactically perfect and legally ordered. There is no checking of input, or confirmation procedure, or chance to edit and re-enter commands. A typo can easily crash the program.

The GUI process sends these commands in response to various button pushes, and all checking, etc. is done before a command is ever sent. The generated text strings are placed in a buffer which is sent over an interprocess communications channel open to the server process (ipfsrv). The server process on its end interprets these commands and responds by changing its memory resident case data, querying the case data, sending data back to the GUI, etc. CFLOW library routines also send and receive these commands in the same manner.

PCL has some overlap with the PFC command language used in the batch Powerflow (bpf) program. For those commands which do the same things (e.g. OLD_BASE, CHANGES, etc.) the syntax is identical. However, many of the batch commands are not available in PCL, and of course PCL contains many commands which are not needed by bpf. The same conventions on case and spacing apply to both languages.

  • Upper, lower, or mixed case are legal: OLD_BASE, Old_Base, oldbase.

  • Spaces between command elements are ignored: /oldbase,file=std.bse and /   OLD_base  ,   File   =   std.bse are equivalent.

  • Underscore may be used within command words if desired: oldbase, old_base, O_L_D__B_A_S_E.

Table 61 IPC Commands Quick Descriptions

Command

Description

Section

(END)

Terminates a data stream following a command.

(END)

*[EOM]

Used in the Command Dialog to launch a command stream.

*[EOM]

``CFLOW`

Launches a CFLOW program.

CFLOW

CHANGES

Introduces system data change records.

CHANGES

GET_DATA

Fetches data from the Powerflow process.

GET_DATA

GET_DATA, TYPE = A_DATA

Retrieves all type A input data records in WSCC format.

GET_DATA, TYPE = A_DATA

GET_DATA, TYPE = AREA_DATA

Initializes the user analysis arrays.

pcl-get-data-area-data

GET_DATA, TYPE = AREA_LIST

Loads the area list dialog into the Network Data Edit Dialog and the Reports Dialog.

GET_DATA, TYPE = AREA_LIST

GET_DATA, TYPE = BSEKV_LIST

Loads the base kV list dialog into the Network Data Edit Dialog and Reports Dialog.

GET_DATA, TYPE = BSEKV_LIST

GET_DATA, TYPE = BUS_EXISTS

Inquires whether a given bus exists.

GET_DATA, TYPE = BUS_EXISTS

GET_DATA, TYPE = BUS_LIST

Loads the bus list dialog in the Alpha Search, Network Data Edit, and Reports Dialogs.

GET_DATA, TYPE = BUS_LIST

GET_DATA, TYPE = BUS_VOLTAGES

Returns a list of all bus voltages.

GET_DATA, TYPE = BUS_VOLTAGES

GET_DATA, TYPE = CONNECTION

Retrieves the network connection diagram for a given set of buses.

GET_DATA, TYPE = COUNT

Computes the number of network data records satisfying the filter criteria in a NETWORK_DATA command.

GET_DATA, TYPE = FILE_EXISTS

Inquires whether a named files exists.

GET_DATA, TYPE = INITIALIZE_DEF

Initializes the user analysis arrays.

GET_DATA, TYPE = INPUT

Retrieves the full network data for a bus.

GET_DATA, TYPE = I_DATA

Retrieves all I type data in WSCC format.

GET_DATA, TYPE = LINE_IMPEDANCE_CALCULATION

Computes transmission line impedance data given tower geometry and conductor characteristics.

GET_DATA, TYPE = LOAD_AREA

Initializes arrays associated with area interchange data.

GET_DATA, TYPE = SUB_DEFINE

Loads the user analysis arrays.

GET_DATA, TYPE = LOAD_REF_AREA

Initializes arrays associated with area interchange data.

GET_DATA, TYPE = LOAD_REF_BASE

Loads a reference base case history file for the purpose of base case comparison or plot comparisons.

GET_DATA, TYPE = NETWORK_DATA

Filters network data records.

GET_DATA, TYPE = OUTAGES

Retrieves the list of outaged data for the Report Dialog.

GET_DATA, TYPE = OUTPUT

General purpose command for accessing virtually the entire network data base.

GET_DATA, TYPE = OWNER_LIST

Loads the ownership list dialog into the Reports Dialog and the Network Data Edit Dialog.

GET_DATA, TYPE = RECORD_LIST

Loads the record type list dialog into the Reports Dialog and the Network Data Edit Dialog.

GET_DATA, TYPE = COMMENTS

Obtains the area interchange output data from the WSCC-formatted input area records.

GET_DATA, TYPE = REF_OUTPUT

General purpose command for accessing virtually the entire network data base.

GET_DATA, TYPE = STATUS

Retrieves the case description.

GET_DATA, TYPE = SUB_DEFINE

Performs character string substitution using computed base case quantities.

GET_DATA, TYPE = COMMENTS

Retrieves all IPF system parameters describing the case in residence.

GET_DATA, TYPE = ZONE_LIST

Loads the zone list dialog into the Reports Dialog and the Network Data Edit Dialog.

INITIALIZE

Starts up powerflow engine.

NETWORK_DATA

Specifies that a network data file is to be loaded into the powerflow engine.

NEW_BASE

Saves the solved, resident base case.

OLD_BASE

Loads a previously solved powerflow case file.

PLOT

Plots a powerflow coordinate file

PUT_DATA, TYPE = COMMENTS

Defines IPF system parameters which either describe the case in residence or modify parameters which will influence certain processes (solution, debugging).

QUIT, EXIT

Executes closing procedures and exits the powerflow engine.

REPORTS, SELECT AI_SUMMARY

Retrieves filtered area interchange output data.

REPORTS, SELECT BUS_BR_INPUT

Retrieves filtered WSCC-formatted bus and branch input data records.

REPORTS, SELECT BUS_BR_OUTPUT

Retrieves filtered bus and branch output records.

REPORTS, SELECT BUS_INPUT

Retrieves filtered WSCC-formatted bus input data records.

REPORTS, SELECT BUS_UVOV

Retrieves filtered under/over voltage bus output data.

REPORTS, SELECT LINE_COMPARISON

Retrieves filtered line loading differences between the base case in residence and a selected base case history data file.

REPORTS, SELECT NETWORK_CHANGES

Retrieves the list of all accumulated changes performed on the base case in residence.

REPORTS, SELECT NETWORK_DELETIONS

Retrieves the list of all deleted network data in WSCC format.

REPORTS, SELECT OVERLOADED_LINES

Retrieves filtered overloaded branch output data.

REPORTS, SELECT OVERLOADED_TXS

Retrieves filtered overloaded transformer output data.

REPORTS, SELECT PHASE_SHIFTER

Retrieves the phase shifter report.

REPORTS, SELECT TIE_LINE_SUMMARY

Retrieves filtered area tie line flows.

REPORTS, SELECT VOLTAGE_COMPARISON

Retrieves filtered voltage differences between the resident base case and a selected base case history data file.

SAVE_FILE

Saves the solved resident base case in a named file.

SOLUTION

Causes the powerflow engine to solve the currently resident base case.

SYSCAL

Passes a system command to the operating system.

General

(END)

Use this command to terminate a data stream following a command in a PCL command file. Some commands which would be followed by data are /CHANGES, FILE=* and /PLOT.

Example:

/Network_Data, File = *
B ARAPAHOA115.
BS ARAP1 13.8 3.5 45. 1.05
B SHERIDAN115. 41.5 11.8
T ARAPAHOA115. ARAP1 13.8 .00672.14684.00064-00313115.5 13.2
L ARAPAHOA115. SHERIDAN115. .00261.00657 .0004
(end)

*[EOM]

This is used when entering commands in the Command Dialog of the GUI, to indicated that the line or lines you have entered into the buffer should be send to ipfsrv. When the GUI generates this “End of Message” string, it has all six characters; however, the first two characters are all that are required to be entered.

For Command Dialog usage, this also serves in place of the (END) command above. But unlike it, this must be entered after every command, when using the Command Dialog.

INITIALIZE

This command starts up the powerflow engine, and therefore will never be entered by a GUI user, but is required at the beginning of every ipfbat command file. It calls p_pfinit.f with the following parameters.:

integer function p_pfinit (in_buffer, out_buffer)
parameter (MAXBUFFER = 6600)
character in_buffer * (MAXBUFFER)
character out_buffer * (MAXBUFFER)

The character array in_buffer contains the following information.:

/INITIALIZE

QUIT, EXIT

This command in either form executes closing procedures and exits the powerflow engine. It calls p_pfexit.f with the following parameters.:

integer function p_pfexit (in_buffer, out_buffer)
parameter (MAXBUFFER = 6600)
character in_buffer * (MAXBUFFER)
character out_buffer * (MAXBUFFER)

The character array in_buffer contains either of the following lines of information.:

/QUIT
/EXIT

SYSCAL

This command passes a string to the operating system for execution. It is used by the GUI to send a plot to the currently selected print destination, but it will pass any command string.

Example:

/SYSCAL
lp -d COMPAQ20 -T ps 0102hw1.ps
(END)

Warning

This command is effectively a command line injection vulnerability if running separate client and server.

File Opening and Saving

NETWORK_DATA

This command specifies that a network data file is to be loaded into the ipfsrv. It calls p_gtnetdat.f with the following parameters.:

integer function p_gtnetdat (in_buffer, out_buffer)
parameter (MAXBUFFER = 6600)
character in_buffer * (MAXBUFFER)
character out_buffer * (MAXBUFFER)

Example:

/NETWORK_DATA, FILE=0102hw1.net

For a full description of the command /NETWORK_DATA, see the NETWORK_DATA. Successful execution should return an IPF state of 2.

NEW_BASE

This command saves the solved base case in residence in the named file. It calls p_newbse.f with the following parameters.:

integer function p_newbse (in_buffer, out_buffer)
parameter (MAXBUFFER = 6600)
character in_buffer * (MAXBUFFER)
character out_buffer * (MAXBUFFER)

The character array in_buffer contains the following information:

/NEW_BASE, FILE = <filename>
C < case comments - three records maximum >
C < case comments - three records maximum >
C < case comments - three records maximum >

The comment records in the above command are optional. Successful execution should return an IPF state of 6.

OLD_BASE

This command specifies that a previously solved power flow case is to be loaded from the specified file and used as the base system for the current request. It calls p_gtbase.f with the following parameters.:

integer function p_gtbase (in_buffer, out_buffer)
parameter (MAXBUFFER = 6600)
character in_buffer * (MAXBUFFER)
character out_buffer * (MAXBUFFER)

Example:

/OLD_BASE, FILE = 97hs1a.bse

Successful execution should return an IPF state of 6.

SAVE_FILE

This command saves the solved base case in residence in the named file in one of four forms. One of these forms is NEW_BASE, described previously, and admits a redundancy into the command procedure.

This command calls p_svfile.f with the following parameters.:

integer function p_svfile (in_buffer, out_buffer)
parameter (MAXBUFFER = 6600)
character in_buffer * (MAXBUFFER)
character out_buffer * (MAXBUFFER)

The character array in_buffer contains any of following information.:

/SAVE_FILE, TYPE = SYSTEM_CHANGES, FILE = <filename>

/SAVE_FILE, TYPE = NEW_BASE, FILE = <filename>

/SAVE_FILE, TYPE = NETWORK_DATA, FILE = <filename>, ...

/SAVE_FILE, TYPE = WSCC_BINARY_STABILITY, FILE = <filename>
                   WSCC_ASCII_STABILITY

 /SAVE_FILE, TYPE = NETWORK_DATA,
  FILE = < filename >,
  DIALECT = < value >, BPA | WSCC | WSCC1 | PTI
  RATINGS = < value >, EXTENDED | NOMINAL | MINIMUM
  SIZE = < value >, 120 | 80

See ipfnet, for a complete description of the Dialect, Ratings, and Size options when saving a network data file.

Processes

CFLOW

This command launches a CFLOW program if it is in your directory search path. The following works on a VAX VMS system if <program name> is defined as a foreign command::

/CFLOW
PROGRAM = my_cflow_program
<program name>:== $dev:[dir]file.exe

ARGS = is required only if the CFLOW program requires command line arguments other than the socket number. Any I/O that the CFLOW program does to standard input or standard output will be to and from the same terminal window that the ipfbat program is run from (intermixed with any I/O from the ipfbat program).

CHANGES

This command introduces system data change records. It calls p_change.f with the following parameters.:

integer function p_change (in_buffer, out_buffer)
parameter (MAXBUFFER = 6600)
character in_buffer * (MAXBUFFER)
character out_buffer * (MAXBUFFER)

Examples::

/CHANGES, FILE = 0102hw1.chg
/changes, file = *
B D ARAPAHOA115.
BEM ARAP1 13.8 1.05
T M ARAPAHO 115. ARAP1 13.8 .00672.
(end)

PLOT

This command creates a PostScript diagram (map) file, using a coordinate file and the currently loaded base case. It calls plot_load.f, which is the main routine for the batch program ipfplot. The batch program takes three parameters, as shown below, and uses the second case, if provided, to produce difference plots.:

subroutine plot_load (coord_file, base1_file, base2_file)
character * 60 coord-file, base1_file, base2_file

Difference plots are not available from the GUI or ipfbat. The parameters required in the PCL formulation are a coordinate file and the name of a PostScript output file. Records which follow these two file names are interpreted as comments to be placed on the map, following any comments (C records) which occur in the coordinate file. However, if a comment begins with an ampersand (&) or an “at” symbol (@), it will not be printed. The & precedes the name of at most one auxiliary coordinate file to be included on the map. The @ signals the presence of a plot option which will override that option in the coordinate file. See Network Diagrams for complete information on plotting diagrams. See ipfplot for detailed information on use of the ipfplot program.

Example::

/plot
hvmap.cor
98hw3_study.ps
Transfer Study for PAST
Prepared by A. P. Planner
&transfer.cor
@OP Offset=12.7 18.9
(end)

SOLUTION

This command causes the powerflow engine to solve the currently resident base case. It calls p_solton.f with the following parameters.:

integer function p_solton (in_buffer, out_buffer)
parameter (MAXBUFFER = 6600)
character in_buffer * (MAXBUFFER)
character out_buffer * (MAXBUFFER)

The character array in_buffer contains the following information. Normal defaults are shown; optional items are in [ ].:

/SOLUTION
> BASE_SOLUTION ]
> DEBUG,TX=OFF,BUS=OFF,AI=OFF,DCMODEL=OFF           [ON]
> LTC = ON               [OFF, ON_NV, ON_NPS, ON_DCONLY]
> AI_CONTROL = CONtrol          [MON, OFF]
> MISC_CNTRL, -
    X_BUS = BPA,-               [WSCC]
    PHASE_SHIFTER_BIAS = BPA,-  [WSCC]
    DCLP = ON, -                [OFF]
    VFLATSTART = ON, -          [OFF]
    ITER_SUM = OFF, -           [ON]
    TSTART = 0.5, -
    NUMVSTEPS = 3
> SOL_ITER, DECOUPLED = 2, NEWTON = 30
> LIMITS,QRES=0.01,PHA=45.0,DEL_ANG=1.0,DEL_VOLT=0.15
> TOLERANCE, BUSV = 0.005, AIPOWER = 0.001, TX = 0.001, Q = 0.005

GET_DATA

This command with its many different forms fetches data from the powerflow engine. It calls p_gtdata.f with the following parameters.:

integer function p_gtdata (in_buffer, out_buffer)
parameter (MAXBUFFER = 6600)
character in_buffer * (MAXBUFFER)
character out_buffer * (MAXBUFFER)

The character array in_buffer contains any of the following commands.:

/GET_DATA, TYPE = A_DATA
/GET_DATA, TYPE = AREA_DATA
/GET_DATA, TYPE = AREA_LIST
/GET_DATA, TYPE = BSEKV_LIST
/GET_DATA, TYPE = BUS_EXISTS
/GET_DATA, TYPE = BUS_LIST
/GET_DATA, TYPE = BUS_VOLTAGES
/GET_DATA, TYPE = COMMENTS
/GET_DATA, TYPE = CONNECTION
/GET_DATA, TYPE = COUNT
/GET_DATA, TYPE = FILE_EXISTS
/GET_DATA, TYPE = I_DATA
/GET_DATA, TYPE = INITIALIZE_DEF
/GET_DATA, TYPE = INPUT
/GET_DATA, TYPE = LINE_IMPEDANCE_CALCULATION
/GET_DATA, TYPE = LOAD_AREA
/GET_DATA, TYPE = LOAD_DEFINE
/GET_DATA, TYPE = LOAD_REF_AREA
/GET_DATA, TYPE = LOAD_REF_BASE
/GET_DATA, TYPE = NETWORK_DATA
/GET_DATA, TYPE = OUTAGES
/GET_DATA, TYPE = OUTPUT
/GET_DATA, TYPE = OWNER_LIST
/GET_DATA, TYPE = RECORD_LIST
/GET_DATA, TYPE = REF_AREA_DATA
/GET_DATA, TYPE = REF_OUTPUT
/GET_DATA, TYPE = SOL_PAR
/GET_DATA, TYPE = STATUS
/GET_DATA, TYPE = SUB_DEFINE
/GET_DATA, TYPE = SYSTEM
/GET_DATA, TYPE = ZONE_LIST

The routine p_gtdata.f parses these commands and calls a subroutine to perform the specific task, according to the type of data indicated.

GET_DATA, TYPE = A_DATA

This command retrieves in out_buffer all type A input data records in WSCC format. It calls a_data.f with the following parameters.:

integer function a_data (in_buffer, out_buffer)
parameter (MAXBUFFER = 6600)
character in_buffer * (MAXBUFFER)
character out_buffer * (MAXBUFFER)

The character array in_buffer contains the following information.:

/GET_DATA, TYPE = A_DATA

Note that no areas are specified in in_buffer; this command just gets a list of the areas in the case.:

.. _pcl-get-data-area-data:

GET_DATA, TYPE = AREA_DATA

This command obtains the area interchange output data from the WSCC-formatted input area records. This command should be preceded with a prior command GET_AREA, TYPE=LOAD_AREA. It calls p_gtbase.f with the following parameters.:

integer function p_gtdata (in_buffer, out_buffer)
parameter (MAXBUFFER = 6600)
character in_buffer * (MAXBUFFER)
character out_buffer * (MAXBUFFER)

The character array in_buffer contains the following information.:

/GET_DATA, TYPE = AREA_DATA
A <areaname>

GET_DATA, TYPE = AREA_LIST

This command loads the area list filter window in the Network Data Edit Dialog and the Report Dialog of the GUI. It returns in out_buffer the list of area names in the following format.:

<areaname> LINEFEED

where <areaname> is the area name in A10 format.

It calls area_list.f with the following parameters.:

integer function area_list (in_buffer, out_buffer)
parameter (MAXBUFFER = 6600)
character in_buffer * (MAXBUFFER)
character out_buffer * (MAXBUFFER)

The character array in_buffer contains optional filter data in the following command.:

/GET_DATA, TYPE = AREA_LIST [ FROM BUS_DATA ]
                  WHERE AREAS = <area1>, <area2>, etc AND
                  ZONES = <zone1>, <zone2>, etc AND
                  OWNERS = <own1>, <own2>, etc AND
                  BASEKV = base1
                           < base ( example < 115.0 means all base
                                   kv's less than or equal to 115.0)
                           > base ( example > 115.0 means all base
                                   kv's greater than or equal to 115.0)
                           base1 < base2 (all bases between base1 and
                                           base 2)
                           base2 > base1 (same as above)
                  TYPE = '* ', 'A*', 'A?', 'I ', 'B*', 'L*', 'B?',
                         'B ', 'BE', 'BS', 'BC', 'BD', 'BV', 'BQ',
                         'BG', 'BT', 'BX', 'BM', 'BF', '+ ', 'X ',
                         'Q ', 'LD', 'LM', 'E ', 'T ', 'TP', 'R ',
                         'RZ'
                  ALL

Details of the filter are found in Dynamic Filters.

GET_DATA, TYPE = BSEKV_LIST

This command loads the base kV filter window in the Network Data Edit Dialog and the Reports Dialog of the GUI. It returns in out_buffer the list of filtered base kVs in the following format.:

<basekv> LINEFEED

where <basekv> is the base kV in F6.1 format.

It calls bsekvltt.f with the following parameters.:

integer function bsekvlst (in_buffer, out_buffer)
parameter (MAXBUFFER = 6600)
character in_buffer * (MAXBUFFER)
character out_buffer * (MAXBUFFER)

The character array in_buffer contains optional filter data in the following command.:

/GET_DATA, TYPE = BSEKV_LIST [ FROM BUS_DATA ]
                  WHERE AREAS = <area1>, <area2>, etc AND
                        ZONES = <zone1>, <zone2>, etc AND
                        OWNERS = <own1>, <own2>, etc AND
                        BASEKV = base1
                                 < base ( example < 115.0 means all base
                                        kv's less than or equal to 115.0)
                                 > base ( example > 115.0 means all base
                                         kv's greater than or equal to 115.0)
                                 base1 < base2 (all bases between base1 and
                                               base 2)
                                 base2 > base1 (same as above)
                        TYPE = '* ', 'A*', 'A?', 'I ', 'B*', 'L*', 'B?',
                               'B ', 'BE', 'BS', 'BC', 'BD', 'BV', 'BQ',
                               'BG', 'BT', 'BX', 'BM', 'BF', '+ ', 'X ',
                               'Q ', 'LD', 'LM', 'E ', 'T ', 'TP', 'R ',
                               'RZ'
                        BUS = "<busname>" (quotes are necessary)
                        ALL
                        LOADING = (<min> <max>)

Details of the filter are found in Dynamic Filters.

GET_DATA, TYPE = BUS_EXISTS

This command inquires whether a given bus exists. It calls ex_bus.f with the following parameters.:

integer function ex_bus (in_buffer, out_buffer)
parameter (MAXBUFFER = 6600)
character in_buffer * (MAXBUFFER)
character out_buffer * (MAXBUFFER)

The character array in_buffer contains the following information.:

/GET_DATA, TYPE = BUS_EXISTS, BUS = bus_name base_kv

bus_name is an eight character name (blank filled to eight characters) followed by a Fortran F4.0 or F6.1 base kV.

The return status is 0 if the bus exists in the current case or 1 if it does not exist.

GET_DATA, TYPE = BUS_LIST

This command loads the bus list dialog in the Alpha Search Dialog, the Network Data Edit Dialog, and the Reports Dialog of the GUI. It returns in out_buffer the list of filtered bus names and base kVs in the following format.:

<busname><base kv> LINEFEED

where <busname> is the bus name in A8 format; <basekv> is the base kV in F6.1 format.

It calls bus_list.f with the following parameters.:

integer function bus_list (in_buffer, out_buffer)
parameter (MAXBUFFER = 6600)
character in_buffer * (MAXBUFFER)
character out_buffer * (MAXBUFFER)

The character array in_buffer contains optional filter data in the following command.:

/GET_DATA, TYPE = BUS_LIST [ FROM BUS_DATA ]
                  WHERE AREAS = <area1>, <area2>, etc AND
                  ZONES = <zone1>, <zone2>, etc AND
                  OWNERS = <own1>, <own2>, etc AND
                  BASEKV = base1
                           < base ( example < 115.0 means all base
                                  kv's less than or equal to 115.0)
                           > base ( example > 115.0 means all base
                                  kv's greater than or equal to 115.0)
                           base1 < base2 (all bases between base1 and
                                         base 2)
                           base2 > base1 (same as above)
                  TYPE = '* ', 'A*', 'A?', 'I ', 'B*', 'L*', 'B?',
                         'B ', 'BE', 'BS', 'BC', 'BD', 'BV', 'BQ',
                         'BG', 'BT', 'BX', 'BM', 'BF', '+ ', 'X ',
                         'Q ', 'LD', 'LM', 'E ', 'T ', 'TP', 'R ',
                         'RZ'
                  BUS = "<busname>" (quotes are necessary)
                  AFTER_BUS = "<busname>"
                  ALL
                  LOADING = (<min> <max>)

Details of the filter are found in Dynamic Filters.

GET_DATA, TYPE = BUS_VOLTAGES

This command returns in out_buffer the list of all bus voltages in the following format.:

<busname><base kv><voltage><angle> LINEFEED

where <busname> is the bus name in (A8),
      <basekv> is the base kV in (F4.0),
      <voltage> is the actual voltage magnitude in kV in (I4), and
      <angle> is the angle in degrees in (I4).

It calls gtbsvolt.f with the following parameters.:

integer function gtbsvolt (in_buffer, out_buffer)
parameter (MAXBUFFER = 6600)
character in_buffer * (MAXBUFFER)
character out_buffer * (MAXBUFFER)

The character array in_buffer contains the following information.:

/GET_DATA, TYPE = BUS_VOLTAGES

GET_DATA, TYPE = COMMENTS

This command obtains case comments, along with case ID, project name, and headers.

There is a related command:

/PUT_DATA, TYPE = COMMENTS

which modifies the corresponding data except for header 1 which is not modifiable. Header 1 is formatted to include case name, case description, program version, date, etc. Up to 20 comments are returned. The three header records are always returned.

The returned values are encoded in the character array out_buffer in free field, C-formatted strings. The quantities enclosed in angle brackets “< … >” denote variables returned. Headers may be up to 130 characters; comments may be up to 120 characters, not including the H or C in column 1.:

/GET_DATA, TYPE = COMMENTS
CASE_ID = "< case name >"               10 chars
CASE_DS = "< case description >"        20 chars
H< header 1 information >
H< header 2 information >
H< header 3 information >
C< comment text >
...
C< comment text >
return status: status = 0 : success
                        1 : error

GET_DATA, TYPE = CONNECTION

This command retrieves network connection information for given buses. Its main usage is to draw the display network diagram. It calls gtconnect.f with the following parameters.:

integer function gtconnect (in_buffer, out_buffer)
parameter (MAXBUFFER = 6600)
character in_buffer * (MAXBUFFER)
character out_buffer * (MAXBUFFER)

The character array in_buffer contains the following information.:

/GET_DATA, TYPE = CONNECTION
B     <busname, etc> returns all connection data associated with bus
B     <busname, etc> returns all connection data associated with bus

The connection data is returned in out_buffer in the following format.:

B <busname><basekv> LINEFEED
L <busname><basekv> <busname><basekv> LINEFEED
T <busname><basekv> <busname><basekv> LINEFEED

Specifically,:

"B" records: (1:2) = "B "
             (3:14) = <bus1><base1>.
"L" records: (1:2) = "L "
             (3:14) = <bus1><basekv1>
             (16:27) = <bus2><base2>.
             (28:29) = <number of parallel circuits>
"T" records: (1:2) = "T "
             (3:14) = <bus1><basekv1>
             (16:27) = <bus2><base2>.
             (28:29) = <number of parallel circuits>

GET_DATA, TYPE = COUNT

This command computes the number of network data records that would be retrieved using a subsequent /GET_DATA,TYPE=NETWORK_DATA command using the same filter which is defined with this command. The output appears in a dialog field in the Network Data Edit Dialog of the GUI. It returns the count in out_buffer in the following format.:

count = cccccc

cccccc is the count in I6 format. This command calls gtcount.f with the following parameters.:

integer function gtcount (in_buffer, out_buffer)
parameter (MAXBUFFER = 6600)
character in_buffer * (MAXBUFFER)
character out_buffer * (MAXBUFFER)

The character array in_buffer contains filter data in the following command.:

/GET_DATA, TYPE = COUNT [ FROM BUS_DATA ]
                  WHERE AREAS = <area1>, <area2>, etc AND
                  ZONES = <zone1>, <zone2>, etc AND
                  OWNERS = <own1>, <own2>, etc AND
                  BASEKV = base1
                           < base ( example < 115.0 means all base
                                  kv's less than or equal to 115.0)
                           > base ( example > 115.0 means all base
                                  kv's greater than or equal to 115.0)
                           base1 < base2 (all bases between base1 and
                                          base 2)
                           base2 > base1 (same as above)
                  TYPE = '* ', 'A*', 'A?', 'I ', 'B*', 'L*', 'B?',
                         'B ', 'BE', 'BS', 'BC', 'BD', 'BV', 'BQ',
                         'BG', 'BT', 'BX', 'BM', 'BF', '+ ', 'X ',
                         'Q ', 'LD', 'LM', 'E ', 'T ', 'TP', 'R ',
                         'RZ'
                  BUS = "<busname>" (quotes are necessary)
                  AFTER_BUS = "<busname>"
                  ALL
                  LOADING = (<min> <max>)

GET_DATA, TYPE = FILE_EXISTS

This command inquires whether a named file exists on the platform where ipvsrv is running. It calls ex_file.f with the following parameters.:

integer function ex_file (in_buffer, out_buffer)
parameter (MAXBUFFER = 6600)
character in_buffer * (MAXBUFFER)
character out_buffer * (MAXBUFFER)

The character array in_buffer contains the following information.:

/GET_DATA, TYPE = FILE_EXISTS, FILE = <file_name>

The return status is 0 if the bus exists, or 1 if it does not exist.

GET_DATA, TYPE = I_DATA

This command retrieves in out_buffer all type I records in WSCC format. It calls i_data.f with the following parameters.:

integer function i_data (in_buffer, out_buffer)
parameter (MAXBUFFER = 6600)
character in_buffer * (MAXBUFFER)
character out_buffer * (MAXBUFFER)

The character array in_buffer contains the following information:

/GET_DATA, TYPE = I_DATA

GET_DATA, TYPE = INITIALIZE_DEF

This command initializes the user analysis arrays. It should be called prior to a USER_ANALYSIS command. It calls p_initdef.f with the following parameters.:

integer function p_initdef (in_buffer, out_buffer)
parameter (MAXBUFFER = 6600)
character in_buffer * (MAXBUFFER)
character out_buffer * (MAXBUFFER)

The character array in_buffer contains the following information.:

/GET_DATA, TYPE = INITIALIZE_DEF

GET_DATA, TYPE = INPUT

This command retrieves the full network data given the identification of that record in WSCC format. If the record is type B, all data relevant to that bus is retrieved. It calls gtinput.f with the following parameters.:

integer function gtinput (in_buffer, out_buffer)
parameter (MAXBUFFER = 6600)
character in_buffer * (MAXBUFFER)
character out_buffer * (MAXBUFFER)

The character array in_buffer contains WSCC-formatted records following the command /GET_DATA.:

/GET_DATA, TYPE = INPUT
A <areaname>
I <area1 area2>
B <busname, etc> returns all data associated with bus
+ <busname, etc> returns all data if id fields have wild cards
                 (type - column 2, owner, columns 3-5, and code-year
                 columns 20-21)
X <busname, etc>
L <bus1 bus2, etc> returns all parallels if id is wild card (*)
                   returns all sections if section is 0
T <bus1 bus2, etc>
R <bus1 bus2, etc>
E <bus1 bus2, etc>

The character array in_buffer is passed through p_gtdata.f to gtinput.f.

GET_DATA, TYPE = LINE_IMPEDANCE_CALCULATION

This command computes transmission line impedance data given tower geometry and conductor characteristics. It calls a stand-alone module p_lic.f and associated routines, which are completely separate from the powerflow data base. (It was added to ipfsrv to keep the GUI free from any FORTRAN modules.):

integer function p_lic (in_buffer, out_buffer)
parameter (MAXBUFFER = 6600)
character in_buffer * (MAXBUFFER)
character out_buffer * (MAXBUFFER)

The character array in_buffer contains the following information:

/GET_DATA, TYPE = LINE_IMPEDANCE_CALCULATION
           UNITS = < ENGLISH | METRIC >,
           DISTANCE = < miles | km >
           BASEKV = <basekv>,
           BASEMVA = <basemva>,
           FREQUENCY = <freq>
CONDUCTOR = 1 .3636 .05215 1.602 -20.75 50. 50. 0.0 0.0 0
CONDUCTOR = 1 .3636 .05215 1.602 -19.25 50. 50. 0.0 0.0 0
CONDUCTOR = 2 .3636 .05215 1.602 -0.75 77.5 77.5 0.0 0.0 0
CONDUCTOR = 2 .3636 .05215 1.602 0.75 77.5 77.5 0.0 0.0 0
CONDUCTOR = 3 .3636 .05215 1.602 19.25 50. 50. 0.0 0.0 0
CONDUCTOR = 3 .3636 .05215 1.602 20.75 50. 50. 0.0 0.0 0
CONDUCTOR = 0 .5 2.61 0.386 -12.9 98.5 98.5 0.0 0.0 0
CONDUCTOR = 0 .5 2.61 0.386 12.9 98.5 98.5 0.0 0.0 0

The returned line impedance data in character array out_buffer has the following format.:

LIC = <r> <x> <g/2> <b/2>

<r>, <x>, <g/2>, and <b/2> are the corresponding per unit line quantities encoded as F14.8 fields.

GET_DATA, TYPE = LOAD_AREA

This command initializes arrays associated with area interchange data. It should be called prior to any requests for area output. It calls ldardata.f with the following parameters,:

integer function ldardata (in_buffer, out_buffer)
parameter (MAXBUFFER = 6600)
character in_buffer * (MAXBUFFER)
character out_buffer * (MAXBUFFER)

The character array in_buffer contains the following information.:

/GET_DATA, TYPE = LOAD_AREA

GET_DATA, TYPE = LOAD_DEFINE

This command loads the user analysis arrays. It calls p_loaddef.f with the following parameters.:

integer function p_loaddef (in_buffer, out_buffer)
parameter (MAXBUFFER = 6600)
character in_buffer * (MAXBUFFER)
character out_buffer * (MAXBUFFER)

The character array in_buffer contains the following information.:

/GET_DATA, TYPE = LOAD_DEFINE
> DEFINE ...
> DEFINE ...
> DEFINE ...
C ...
C ...
C ...

GET_DATA, TYPE = LOAD_REF_AREA

This command initializes arrays associated with area interchange data using the data from the reference base case. Prior to this call, the reference base case should be loaded. It calls P_ldxardta.f with the following parameters.:

integer function p_ldxardta (in_buffer, out_buffer)
parameter (MAXBUFFER = 6600)
character in_buffer * (MAXBUFFER)
character out_buffer * (MAXBUFFER)

The character array in_buffer contains the following information.:

/GET_DATA, TYPE = LOAD_REF_AREA

GET_DATA, TYPE = LOAD_REF_BASE

This command loads a reference base case history file for the purpose of base case comparison or plot comparisons. The requested base case must be in the IPF format. It calls p_gtdata.f with the following parameters.:

integer function p_gtdata (in_buffer, out_buffer)
parameter (MAXBUFFER = 6600)
character in_buffer * (MAXBUFFER)
character out_buffer * (MAXBUFFER)

The character array in_buffer contains the following information:

/GET_DATA, TYPE = LOAD_REF_BASE, FILE = <file_name>

GET_DATA, TYPE = NETWORK_DATA

This command gets filtered network data records. The output appears in the scrollable edit list on the Network Data Edit Dialog in the GUI. This command calls gtnetdat.f with the following parameters.:

integer function gtnetdat (in_buffer, out_buffer)
parameter (MAXBUFFER = 6600)
character in_buffer * (MAXBUFFER)
character out_buffer * (MAXBUFFER)

The character array in_buffer contains filter data in the following command.:

/GET_DATA, TYPE = NETWORK_DATA [ FROM BUS_DATA ]
                  WHERE AREAS = <area1>, <area2>, etc AND
                        ZONES = <zone1>, <zone2>, etc AND
                        OWNERS = <own1>, <own2>, etc AND
                        BASEKV = base1
                                 < base ( example < 115.0 means all base
                                        kv's less than or equal to 115.0)
                                 > base ( example > 115.0 means all base
                                        kv's greater than or equal to 115.0)
                                 base1 < base2 (all bases between base1 and
                                               base 2)
                                 base2 > base1 (same as above)
                        TYPE = '* ', 'A*', 'A?', 'I ', 'B*', 'L*', 'B?',
                               'B ', 'BE', 'BS', 'BC', 'BD', 'BV', 'BQ',
                               'BG', 'BT', 'BX', 'BM', 'BF', '+ ', 'X ',
                               'Q ', 'LD', 'LM', 'E ', 'T ', 'TP', 'R ',
                               'RZ'
                        BUS = "<busname>" (quotes are necessary)
                        AFTER_BUS = "<busname>"
                        ALL
                        LOADING = (<min> <max>)

Details of the filter are found in Dynamic Filters.

GET_DATA, TYPE = OUTAGES

This command retrieves the list of outaged data for the Report Dialog (under Bone Pile). It calls gtoutage.f with the following parameters.:

integer function gtoutage (in_buffer, out_buffer)
parameter (MAXBUFFER = 6600)
character in_buffer * (MAXBUFFER)
character out_buffer * (MAXBUFFER)

The character array in_buffer contains the following information.:

/GET_DATA, TYPE = OUTAGES

The returned outage data returned in character array out_buffer is WSCC-formatted network data that has been deleted.

GET_DATA, TYPE = OUTPUT

This command can access virtually the entire network data base. It calls gtoutput.f with the following parameters.:

integer function gtoutput (in_buffer, out_buffer)
parameter (MAXBUFFER = 6600)
character in_buffer * (MAXBUFFER)
character out_buffer * (MAXBUFFER)

The character array in_buffer contains the following information.:

/GET_DATA, TYPE = OUTPUT
A <areaname> returns all data associated with area
I <area1 area2> returns all intertie data between the areas
B <busname, etc> returns all data associated with bus
+ <busname, etc> returns all data if id fields have wild cards
                 (type - column 2, owner, columns 3-5, and code-year
                 columns 20-21)
X <busname, etc>
L <bus1 bus2, etc> returns all parallels if id is wild card (*)
                   returns all sections if section is wild card (0)
T <bus1 bus2, etc>
R <bus1 bus2, etc>
E <bus1 bus2, etc>

The returned values in out_buffer correspond with the input record in in_buffer.

Table 62 Area A Record

Column

Format

Description

1

A1

A — Area Identifier

2

1X

Blank

3-12

A10

Area name

13

1X

Blank

14-28

E15.7

Total Area Generation (MW)

29-43

E15.7

Total Area Load (MW)

44-58

E15.7

Total Area Losses (MW)

59-73

E15.7

Net Area Export (MW)

Table 63 AC Buses (Types B, BE, BS, BC, BD, BV, BQ, BG, BT, BX)

Column

Format

Description

1

A1

Bus code “B”

2

A1

Bus type (” “, “E”, “S”, “D”, etc.)

3

1X

(Not used)

4-6

A3

Ownership

7-14

A8

Bus name

15-18

F4.0

Bus base KV

19-20

A2

Zone

21-35

E15.7

P_gen (MW)

36-50

E15.7

Q_gen (MVAR)

51-65

E15.7

Voltage (KV)

66-80

E15.7

Angle (degrees)

81-95

E15.7

P_load (MW)

96-110

E15.7

Q_load (MVAR)

111-125

E15.7

B_shunt used (MVAR)

126-140

E15.7

B_shunt scheduled (MVAR)

141-155

E15.7

B_shunt (capacitors) used (MVAR)

156-170

E15.7

B_shunt (capacitors) scheduled (MVAR)

171-185

E15.7

B_shunt (reactors) used (MVAR)

186-200

E15.7

B_shunt (reactors) scheduled (MVAR)

201-215

E15.7

Q unscheduled (MVAR)

Table 64 DC Buses (Type BD and BM)

Column

Format

Description

1

A1

Bus code “B”

2

A1

Bus type (“D” or “M”)

3

1X

(Not used)

4-6

A3

Ownership

7-14

A8

Bus name

15-18

F4.0

Bus base KV

19-20

A2

Zone

21-35

E15.7

P_d-c (MW)

36-50

E15.7

Q_d-c (MVAR)

51-65

E15.7

D_C Voltage (KV)

66-80

E15.7

Converter angle (degrees)

81-95

E15.7

P_valve losses (MW)

96-110

E15.7

Q_valve losses (MVAR)

2-6 5X (Not used) 4-6 A3 Ownership 7-14 A8 Bus name 15-18 F4.0 Bus base KV 19-20 2X (not used) 21 I1 Group No. 1 scheduled units 22 I1 Group No. 1 used units 23-37 E15.7 Group No. 1 reactance (MVAR) / unit 38 I1 Group No. 2 scheduled units 39 I1 Group No. 2 used units 40-54 E15.7 Group No. 2 reactance (MVAR) / unit 55 I1 Group No. 3 scheduled units 56 I1 Group No. 3 used units 57-71 E15.7 Group No.3 reactance (MVAR) / unit 72 I1 Group No. 4 scheduled units 73 I1 Group No. 4 used units 74-88 E15.7 Group No. 4 reactance (MVAR) / unit 89 I1 Group No. 5 scheduled units 90 I1 Group No.5 used units 91-105 E15.7 Group No. 5 reactance (MVAR) / unit 106 I1 Group No. 6 scheduled units 107 I1 Group No. 6 used units 108-122 E15.7 Group No. 6 reactance (MVAR) / unit 123 I1 Group No. 7 scheduled units 124 I1 Group No. 7 scheduled units 125-139 E15.7 Group No. 7 reactance (MVAR) / unit 140 I1 Group No. 8 scheduled units 141 I1 Group No. 8 used units 142-156 E15.7 Group No. 8 reactance (MVAR) / unit

2 A1 Continuation bus subtype (A,C,F,I,N,P,S) 3 1X (Not used) 4-6 A3 Ownership 7-14 A8 Bus name 15-18 F4.0 Bus base KV 19-20 A2 Classification code year, * I — constant current loads, * Z — constant impedance loads, * P — constant MVA loads, 21-35 E15.7 P_gen (MW) 36-50 E15.7 Q_gen (MVAR) 51-65 E15.7 P_load (MW) 66-80 E15.7 Q_load(MVAR) 81-95 E15.7 G_shunt (MW) 96-110 E15.7 B_shunt (MVAR)

2 A1 Line subtype (LD, LM, or TP) 3 1X (Not used) 4-6 A3 Ownership 7-14 A8 Bus1 name 15-18 F4.0 Bus1 base KV 19 I1 Interchange metering point (0, 1, or 2) 20-27 A8 Bus 2 name 28-31 F4.0 Bus 2 base KV 32 A1 Parallel ID ( * (asterisk) means all parallels) 33 I1 Number of circuits 34-48 E15.7 P_in (MW) 49-63 E15.7 Q_in (MVAR) 64-78 E15.7 P_out (MW) 79-93 E15.7 Q_out (MVAR) 94-108 E15.7 P_loss (MW) 109-123 E15.7 Q_loss (MW) 124-138 E15.7 Critical line loading (amps) 139-146 F8.1 Critical line rating (amps) 147 A1 Critical line rating code (N,T,B) 148 I1 Critical line loading terminal (0,1,2) 149-163 E15.7 Critical transformer loading (MVA) 164-171 F8.1 Critical transformer rating (MVA) 172 A1 Critical transformer rating code (N,T,E,B) 173 I1 Critical transformer loading terminal (0,1,2) 174-188 E15.7 Total Line loading (percent) 189-203 E15.7 Total Line loading (amps) 204-218 E15.7 Total Transformer loading (percent) 219-233 E15.7 Total Transformer loading (MVA) 234-241 F8.2 Tap1 in kV (Type T or TP) or %Compensation (L or E.) 242-249 F8.2 Tap2 in kV 250-256 A7 (Reserved for difference plotting)

GET_DATA, TYPE = OWNER_LIST

This command loads the ownership list dialog in the Reports Dialog and in the Network Data Edit Dialog of the GUI. It returns in out_buffer the list of filtered ownership names in the following format. <ownership>LINEFEED <ownership> is the ownership name in A3 format. It calls owner_list.f with the following parameters. integer function owner_list (in_buffer, out_buffer) parameter (MAXBUFFER = 6600) character in_buffer * (MAXBUFFER) character out_buffer * (MAXBUFFER) The character array in_buffer contains optional filter data in the following command. /GET_DATA, TYPE = OWNER_LIST [ FROM BUS_DATA ]

WHERE AREAS = <area1>, <area2>, etc AND ZONES = <zone1>, <zone2>, etc AND OWNERS = <own1>, <own2>, etc AND BASEKV = base1 < base ( example < 115.0 means all base kv’s less than or equal to 115.0) > base ( example > 115.0 means all base kv’s greater than or equal to 115.0) base1 < base2 (all bases between base1 and base 2) base2 > base1 (same as above) TYPE = ’* ’, ’A*’, ’A?’, ’I ’, ’B*’, ’L*’, ’B?’,

’B ’, ’BE’, ’BS’, ’BC’, ’BD’, ’BV’, ’BQ’,

’BG’, ’BT’, ’BX’, ’BM’, ’BF’, ’+ ’, ’X ’, ’Q ’, ’LD’, ’LM’, ’E ’, ’T ’, ’TP’, ’R ’, ’RZ’ BUS = “<busname>” (quotes are necessary) AFTER_BUS = “<busname>” ALL LOADING = (<min> <max>)

Details of the filter are found in Dynamic Filters.

GET_DATA, TYPE = RECORD_LIST

This command loads the record type list dialog in the Reports Dialog and in the Network Data Edit Dialogof the GUI. It returns in out_buffer the hard-coded list of various record type codes in the following format. <record_type>LINEFEED <record_type> is the record type code in A2 format. This command calls type_list.f with the following parameters. integer function type_list (in_buffer, out_buffer) parameter (MAXBUFFER = 6600) character in_buffer * (MAXBUFFER) character out_buffer * (MAXBUFFER) The character array in_buffer contains optional filter data in the following command. /GET_DATA, TYPE = RECORD_LIST [ FROM BUS_DATA ]

WHERE AREAS = <area1>, <area2>, etc AND ZONES = <zone1>, <zone2>, etc AND OWNERS = <own1>, <own2>, etc AND BASEKV = base1 < base ( example < 115.0 means all base kv’s less than or equal to 115.0) > base ( example > 115.0 means all base kv’s greater than or equal to 115.0) base1 < base2 (all bases between base1 and base 2) base2 > base1 (same as above) TYPE = ’* ’, ’A*’, ’A?’, ’I ’, ’B*’, ’L*’, ’B?’,

’B ’, ’BE’, ’BS’, ’BC’, ’BD’, ’BV’, ’BQ’,

’BG’, ’BT’, ’BX’, ’BM’, ’BF’, ’+ ’, ’X ’, ’Q ’, ’LD’, ’LM’, ’E ’, ’T ’, ’TP’, ’R ’, ’RZ’ BUS = “<busname>” (quotes are necessary) AFTER_BUS = “<busname>” ALL LOADING = (<min> <max>)

In this instance only, the filter has no impact upon the contents of the returned data. Details of the filter are found in the IPF Basic User’s Guide under the section on “Dynamic Filters.” GET_DATA, TYPE = REF_AREA_DATA This command obtains the area interchange output data from the WSCC-formatted input area records using the reference base case data. This command should be preceded with a prior command GET_AREA, TYPE=LOAD_REF_AREA. It calls p_gtxardta.f with the following parameters. integer function p_gtxardta (in_buffer, out_buffer) parameter (MAXBUFFER = 6600) character in_buffer * (MAXBUFFER) character out_buffer * (MAXBUFFER) The character array in_buffer contains the following information. /GET_DATA, TYPE = AREA_REF_DATA A <areaname>

GET_DATA, TYPE = REF_OUTPUT This command can access virtually the entire network data from the reference base. It calls gtaltopt.f with the following parameters. integer function gtaltopt (in_buffer, out_buffer) parameter (MAXBUFFER = 6600) character in_buffer * (MAXBUFFER) character out_buffer * (MAXBUFFER) The character array in_buffer contains the following information. /GET_DATA, TYPE = OUTPUT A <areaname> returns all data associated with area I <area1 area2> returns all interties between the two areas B <busname, etc> returns all data associated with bus + <busname, etc> returns all data if id fields have wild cards

(type - column 2, owner, columns 3-5, and code-year columns 20-21)

X <busname, etc> L <bus1 bus2, etc> returns all parallels if id is wild card (*)

returns all sections if section is wild card (0)

T <bus1 bus2, etc> R <bus1 bus2, etc> E <bus1 bus2, etc> The returned values in out_buffer correspond with the input record in in_buffer.

2 1X Blank 3-12 A10 Area name 13 1X Blank 14-28 E15.7 Total Area Generation (MW) 29-43 E15.7 Total Area Load (MW) 44-58 E15.7 Total Area Losses (MW) 59-73 E15.7 Net Area Export (MW)

2 1X Blank 3-12 A10 Area 1 name 13 1X Blank 14-23 A10 Area 2 name 24 1X Blank 25-39 E15.7 Scheduled Area1-Area2 Export (MW) 40-54 E15.7 Actual Area1-Area2 Export (MW) 55-69 E15.7 “Circulating” Flow (MW) 70 1X Blank 71 I1 0 — No Area1-Area2 I record exists 1 — Area1-Area2 I record exists

2 A1 Bus type 3 1X (Not used) 4-6 A3 Ownership 7-14 A8 Bus name 15-18 F4.0 Bus base KV 19-20 A2 Zone 21-35 E15.7 P_gen (MW) 36-50 E15.7 Q_gen (MVAR) 51-65 E15.7 Voltage (KV)) 66-80 E15.7 Angle (degrees) 81-95 E15.7 P_load (MW) 96-110 E15.7 Q_load (MVAR) 111-125 E15.7 B_shunt used (MVAR) 126-140 E15.7 B_shunt scheduled (MVAR) 141-155 E15.7 B_shunt (capacitors) used (MVAR) 156-170 E15.7 B_shunt (capacitors) scheduled (MVAR) 171-185 E15.7 B_shunt (reactors) used (MVAR) 186-200 E15.7 B_shunt (reactors) scheduled (MVAR) 201-215 E15.7 Q unscheduled (MVAR)

2 A1 Bus type (“D” or “M)” 3 1X (Not used) 4-6 A3 Ownership 7-14 A8 Bus name 15-18 F4.0 Bus base KV 19-20 A2 Zone 21-35 E15.7 P_d-c (MW) 36-50 E15.7 Q_d-c (MVAR) 51-65 E15.7 D_C Voltage (KV) 66-80 E15.7 Converter angle (degrees) 81-95 E15.7 P_valve losses (MW) 96-110 E15.7 Q_valve losses (MVAR)

2-6 5X (Not used) 4-6 A3 Ownership 7-14 A8 Bus name 15-18 F4.0 Bus base kV 19-20 2X (not used) 21 I1 Group No. 1 scheduled units 22 I1 Group No. 1 used units 23-37 E15.7 Group No. 1 reactance (MVAR) / unit 38 I1 Group No. 2 scheduled units 39 I1 Group No. 2 used units 40-54 E15.7 Group No. 2 reactance (MVAR) / unit 55 I1 Group No. 3 scheduled units 56 I1 Group No. 3 used units 57-71 E15.7 Group No.3 reactance (MVAR) / unit 72 I1 Group No. 4 scheduled units 73 I1 Group No. 4 used units 74-88 E15.7 Group No. 4 reactance (MVAR) / unit 89 I1 Group No. 5 scheduled units 90 I1 Group No.5 used units 91-105 E15.7 Group No. 5 reactance (MVAR) / unit 106 I1 Group No. 6 scheduled units 107 I1 Group No. 6 used units 108-122 E15.7 Group No. 6 reactance (MVAR) / unit 123 I1 Group No. 7 scheduled units 124 I1 Group No. 7 scheduled units 125-139 E15.7 Group No. 7 reactance (MVAR) / unit 91 I1 Group No. 8 scheduled units 92 I1 Group No. 8 used units 93-100 E15.7 Group No. 8 reactance (MVAR) / unit

2 A1 Continuation bus subtype (A,C,F,I,N,P,S) 3 1X (Not used) 4-6 A3 Ownership 7-14 A8 Bus name 15-18 F4.0 Bus base KV 19-20 A2 Classification code year, *I — constant current loads, *Z — constant impedance loads, *P — constant MVA loads, 21-35 E15.7 P_gen (MW) 36-50 E15.7 Q_gen (MVAR) 51-65 E15.7 P_load (MW) 66-80 E15.7 Q_load(MVAR) 81-95 E15.7 G_shunt (MW) 96-110 E15.7 B_shunt (MVAR)

2 A1 Line subtype (LD, LM, or TP) 3 1X (Not used) 4-6 A3 Ownership 7-14 A8 Bus1 name 15-18 F4.0 Bus1 base KV 19 I1 Interchange metering point (0, 1, or 2) 20-27 A8 Bus 2 name 28-31 F4.0 Bus 2 base KV 32 A1 Parallel ID ( * (asterisk) means all parallels) 33 I1 Number of circuits 34-48 E15.7 P_in (MW) 49-63 E15.7 Q_in (MVAR) 64-78 E15.7 P_out (MW) 79-93 E15.7 Q_out (MVAR) 94-108 E15.7 P_loss (MW) 109-123 E15.7 Q_loss (MW) 124-138 E15.7 Critical line loading (amps) 139-146 F8.1 Critical line rating (amps) 147 A1 Critical line rating code (N,T,B) 148 I1 Critical line loading terminal (0,1,2) 149-163 E15.7 Critical transformer loading (MVA) 164-171 F8.1 Critical transformer rating (MVA) 172 A1 Critical transformer rating code (N,T,E,B) 173 I1 Critical transformer loading terminal (0,1,2) 174-188 E15.7 Total Line loading (percent) 189-203 E15.7 Total Line loading (amps) 204-218 E15.7 Total Transformer loading (percent) 219-233 E15.7 Total Transformer loading (MVA) 234-241 F8.2 Tap1 in kV (Type T or TP) or %Compensation (L or E.) 242-249 F8.2 Tap2 in kV 250-256 A7 (Reserved for difference plotting)

GET_DATA, TYPE = SOL_PAR This command obtains solution tolerances, controls, or switches that influence the processing of the case in residence. The obtained system data is identical to the set of data modified by the related command /SOLUTION. The returned values are encoded in the character array in_buffer in free field, C-formatted strings. The quantities enclosed in angle brackets “< … >” denote variables quantitied; < status > denotes a logical on or off; < value > denotes an integer, floating point, or character quantity. /GET_DATA, TYPE = SOL_PAR, > AI_CONTROL = < value > { CON | MOD | OFF } > BASE_SOLUTION = < status > > DEBUG_TX = < status > > DEBUG_BUS = < status > > DEBUG_AI = < status > > DEBUG_DC = < status > > LIMITS_QRES = < value > > LIMITS_PHA = < value > > LIMITS_DA = < value > > LIMITS_DV = < value > > LTC = < value> { ON | ON_NV | ON_NPS | OFF | ON_DCONLY } > MISC_XBUS = < value > { BPA | VMAX | WSCC } > MISC_DCLP = < status > > MISC_VFLAT = < status > > MISC_TSTART = < value > > MISC_ITER_SUM = < status > > MISC_PHA_SHIFT_BIAS = < value > { BPA | WSCC } > SOL_ITER_DECOUP = < value > > SOL_ITER_NEWTON = < value > > TOL_BUSV = < value > > TOL_AIPOWER = < value > > TOL_TX = < value > > TOL_Q = < value > return status: status = 0 : success 1 : errors GET_DATA, TYPE = SUB_DEFINE This command performs character string substitution using computed base case quantities upon the tokens defined with the >DEFINE statement within comment records in the USER_ANALYSIS command. It calls p_subdef.f with the following parameters. integer function p_subdef (in_buffer, out_buffer) parameter (MAXBUFFER = 6600) character in_buffer * (MAXBUFFER) character out_buffer * (MAXBUFFER) The character array in_buffer contains the following information. /GET_DATA, TYPE = SUB_DEFINE, SOURCE = BASE

ALTERNATE_BASE

GET_DATA, TYPE = STATUS This command retrieves the case description. It calls gtstatus.f with the following parameters. integer function gtstatus out_buffer) parameter (MAXBUFFER = 6600) character in_buffer * (MAXBUFFER) character out_buffer * (MAXBUFFER) The character array in_buffer contains the following information. /GET_DATA, TYPE = STATUS The character array out_buffer contains the following information. c c Program: <n> version <n> date <n> c Program size: max buses <n> max branches c Case: <name> status <n> base file <n> c <n> buses <n> branches <n> areas <n> d-c lines c <n> changes c c comments c c comments c c comments c

GET_DATA, TYPE = SYSTEM This command obtains system-specific information pertaining to parameters which describe general characteristics of the base case in residence. The returned values are encoded in the character array out_buffer in free field, C-formatted strings. The quantities enclosed in angle brackets “< … >” denote variables returned; < status > denotes a logical on or off and < value > denotes an integer or floating point quantity. /GET_DATA, TYPE = SYSTEM, CASE_DT = < case date > OLD_BASE = < file name > NEW_BASE = < file name > OLD_NETD = < file name > NEW_NETD = < file name > OLD_CHGF = < file name > NEW_CHGF = < file name > PRG_VERS = < program version > BASE_MVA = < base MVA > NUM_DC_SYS = < number of DC systems > NUM_AREA = < number of areas> NUM_ITIE = < number of interties> NUM_ZONE = < number of zones> NUM_OWN = < number of owners> NUM_BUS = < number of buses > NUM_AREA_SBUS = < number of area slack buses> NUM_DC_BUS = < number of DC buses > NUM_AGC_BUS = < number of AGC buses> NUM_BX_BUS = < number of BX buses> NUM_ADJ_BUS = < number of adjustable buses > NUM_PCT_VAR_BUS = < number of % VAR controlled buses > NUM_BRN = < number of branch records> NUM_CKT = < number of circuits > NUM_DC_LINE = < number of DC lines > NUM_LTC = < number of LTC transformers > NUM_PHAS = < number of phase shifters > SOLN_STATUS = < solution status > NUM_KV = < number of different KVs > NUM_REC_TYP = < number of record types > return status: status = 0 : success 1 : errors GET_DATA, TYPE = ZONE_LIST This command loads the zone list dialog in the Reports Dialog and the Network Data Edit Dialog. See the IPF Basic User’s Guide. It returns in out_buffer the list of filtered zones in the following format. <zone>LINEFEED

<zone> is the zone name in A2 format. It calls zone_list.f with the following parameters. integer function zone_list (in_buffer, out_buffer) parameter (MAXBUFFER = 6600) character in_buffer * (MAXBUFFER) character out_buffer * (MAXBUFFER) The character array in_buffer contains optional filter data in the following command. /GET_DATA, TYPE = ZONE_LIST [ FROM BUS_DATA ]

WHERE AREAS = <area1>, <area2>, etc AND ZONES = <zone1>, <zone2>, etc AND OWNERS = <own1>, <own2>, etc AND BASEKV = base1 < base ( example < 115.0 means all base kv’s less than or equal to 115.0) > base ( example > 115.0 means all base kv’s greater than or equal to 115.0) base1 < base2 (all bases between base1 and base 2) base2 > base1 (same as above) TYPE = ’* ’, ’A*’, ’A?’, ’I ’, ’B*’, ’L*’, ’B?’,

’B ’, ’BE’, ’BS’, ’BC’, ’BD’, ’BV’, ’BQ’,

’BG’, ’BT’, ’BX’, ’BM’, ’BF’, ’+ ’, ’X ’, ’Q ’, ’LD’, ’LM’, ’E ’, ’T ’, ’TP’, ’R ’, ’RZ’ BUS = “<busname>” (quotes are necessary) AFTER_BUS = “<busname>” ALL LOADING = (<min> <max>)

Details of the filter are found in the IPF Basic User’s Guide under the section on “Dynamic Filters.”

PUT_DATA

PUT_DATA, TYPE = COMMENTS This command replaces case comments, along with caseid, case description, and headers. There is a related command

/GET_DATA, TYPE = COMMENTS

which obtains the corresponding data including header 1 which is not modifiable. Header 1 is formatted to include case name, case description, program version, date, etc. Up to 20 comments are allowed. The two header records must be present even if blank. For all blank “H” or “C” records (blank “C” records are accepted, but optional) include at least one blank character after the “H” or “C”. The sent values are encoded in the character array out_buffer in free field, C-formatted strings. The quantities enclosed in angle brackets “< … >” denote variables. Headers may be up to 130 characters; comments may be up to 120 characters, not including the “H” or “C” in column 1. /PUT_DATA, TYPE = COMMENTS CASE_ID = “< case name >” 10 chars CASE_DS = “< case description >” 20 chars H< header 2 information > H< header 3 information > C< comment text > … C< comment text >

Report Generation

The /REPORTS command with its many different forms fetches data from the Powerflow process for display in the Reports Dialog. It calls p_report.f with the following parameters. integer function p_report (in_buffer, out_buffer) parameter (MAXBUFFER = 6600) character in_buffer * (MAXBUFFER) character out_buffer * (MAXBUFFER) The character array in_buffer contains any of the following commands. /REPORTS, SELECT AI_SUMMARY /REPORTS, SELECT BUS_INPUT /REPORTS, SELECT BUS_BR_INPUT /REPORTS, SELECT BUS_BR_OUTPUT /REPORTS, SELECT BUS_UVOV /REPORTS, SELECT LINE_COMPARISON /REPORTS, SELECT NETWORK_CHANGES /REPORTS, SELECT NETWORK_DELETIONS /REPORTS, SELECT OVERLOADED_LINES /REPORTS, SELECT OVERLOADED_TXS /REPORTS, SELECT PHASE_SHIFTER /REPORTS, SELECT TIE_LINE_SUMMARY /REPORTS, SELECT VOLTAGE_COMPARISON The routine p_report.f parses these command and calls a subroutine to perform the specific task. The modules are listed below.

REPORTS, SELECT AI_SUMMARY

This command retrieves filtered area interchange output data. It calls areaintrpt.f with the following parameters. integer function areaintrpt (in_buffer, out_buffer) parameter (MAXBUFFER = 6600) character in_buffer * (MAXBUFFER) character out_buffer * (MAXBUFFER) in_buffer is positioned to the first character following the string AI_SUMMARY. The character array in_buffer contains the following information. /REPORTS, SELECT AI_SUMMARY

[ OUTPUT = <filename> ]

The output is placed in out_buffer. The report dialog is shown below.

../_images/Area_Interchange_Summary_Report_Dialog.png

Fig. 68 Area Interchange Summary Report Dialog

REPORTS, SELECT BUS_INPUT

This command retrieves filtered WSCC-formatted bus input data records. It calls businrpt.f with the following parameters. integer function businrpt(in_buffer, out_buffer) parameter (MAXBUFFER = 6600) character in_buffer * (MAXBUFFER) character out_buffer * (MAXBUFFER) in_buffer is positioned to the first character following the string BUS_INPUT. The character array in_buffer contains the following information. /REPORTS, SELECT BUS_INPUT [ FROM BUS_DATA ]

[ OUTPUT = <filename> ] WHERE (repeat filter from BUS_LIST)

The output is placed in out_buffer. The report dialog is shown below.

../_images/Bus_Input_Data_Report_Example.png

Fig. 69 Bus Input Data Report Dialog

REPORTS, SELECT BUS_BR_INPUT

This command retrieves filtered WSCC-formatted bus and branch input data records. It calls busbrinrpt.f with the following parameters. integer function busbrinrpt(in_buffer, out_buffer) parameter (MAXBUFFER = 6600) character in_buffer * (MAXBUFFER) character out_buffer * (MAXBUFFER) in_buffer is positioned to the first character following the string BUS_BR_INPUT. The character array in_buffer contains the following information. /REPORTS, SELECT BUS_BR_INPUT [ FROM BUS_DATA ]

[ OUTPUT = <filename> ] WHERE (repeat filter from BUS_LIST)

The output is placed in out_buffer. The report dialog is shown below.

../_images/Bus_Branch_Input_Example2.png

Fig. 70 Bus Branch Input Report Dialog

REPORTS, SELECT BUS_BR_OUTPUT

This command retrieves filtered bus and branch output records. It calls busbrotrpt.f with the following parameters. integer function busbrotrpt(in_buffer, out_buffer) parameter (MAXBUFFER = 6600) character in_buffer * (MAXBUFFER) character out_buffer * (MAXBUFFER) in_buffer is positioned to the first character following the string BUS_BR_OUTPUT. The character array in_buffer contains the following information. /REPORTS, SELECT BUS_BR_OUTPUT [ FROM BUS_DATA ]

[ OUTPUT = <filename> ] WHERE (repeat filter from BUS_LIST)

The output is placed in out_buffer.The report dialog is shown below.

../_images/Bus_Branch_Output_Example2.png

Fig. 71 Bus Branch Output Report Dialog

REPORTS, SELECT BUS_UVOV

This command retrieves filtered under/over voltage bus output data. It calls busuvovrpt.f with the following parameters. integer function busuvovrpt (in_buffer, out_buffer) parameter (MAXBUFFER = 6600) character in_buffer * (MAXBUFFER) character out_buffer * (MAXBUFFER) in_buffer positioned to the first character following the string BUS_UVOV. The character array in_buffer contains the following information. /REPORTS, SELECT BUS_UVOV [ FROM BUS_DATA ]

[ OUTPUT = <filename> ] WHERE (repeat filter from BUS_LIST)

The output is placed in out_buffer.The report dialog is shown below.

img/Overvoltage_Undervoltage_Report_Dialog.png.png

Fig. 72 Overvoltage Undervoltage Report Dialog

REPORTS, SELECT LINE_COMPARISON

This command retrieves filtered line loading differences between the base case in residence and a selected base case history data file. It calls lfodifrpt.f with the following parameters. (Not currently working.) integer function lfodifrpt (in_buffer, out_buffer) parameter (MAXBUFFER = 6600) character in_buffer * (MAXBUFFER) character out_buffer * (MAXBUFFER) in_buffer is positioned to the first character following the string LINE_COMPARISON. The character array in_buffer contains the following information. /REPORTS, SELECT LINE_COMPARISON

[ OUTPUT = <filename> ] FILE = <filename> WHERE (repeat filter from BUS_LIST)

The output is placed in out_buffer.

REPORTS, SELECT NETWORK_CHANGES

This command retrieves the list of all accumulated changes performed on the base case in residence. It calls chglisrpt.f with the following parameters. integer function chglilsrpt (in_buffer, out_buffer) parameter (MAXBUFFER = 6600) character in_buffer * (MAXBUFFER) character out_buffer * (MAXBUFFER) in_buffer is positioned to the first character following the string NETWORK_CHANGES. The character array in_buffer contains the following information. /REPORTS, SELECT NETWORK_CHANGES

[ OUTPUT = <filename> ]

The output is placed in out_buffer.The report dialog is shown below.

../_images/Network_Changes_Report_Dialog.png

Fig. 73 Network Changes Remote Dialog

REPORTS, SELECT NETWORK_DELETIONS

This command retrieves the list of all deleted network data in WSCC format. It calls deleterpt.f with the following parameters. integer function deleterpt (in_buffer, out_buffer) parameter (MAXBUFFER = 6600) character in_buffer * (MAXBUFFER) character out_buffer * (MAXBUFFER) in_buffer is positioned to the first character following the string NETWORK_DELETIONS. The character array in_buffer contains the following information. /REPORTS, SELECT NETWORK_DELETIONS

[ OUTPUT = <filename> ]

The output is placed in out_buffer.The report dialog is shown below. (This is the report accessed under Bone Pile.)

../_images/Bonepile_Output_Report_Dialog.png

Fig. 74 Bonepile Output Report Dialog

REPORTS, SELECT OVERLOADED_LINES

This command retrieves filtered overloaded branch output data. It calls ovldlnsrpt.f with the following parameters. integer function ovldlnsrpt (in_buffer, out_buffer) parameter (MAXBUFFER = 6600) character in_buffer * (MAXBUFFER) character out_buffer * (MAXBUFFER) in_buffer positioned to the first character following the string OVERLOADED_LINES. The character array in_buffer contains the following information. /REPORTS, SELECT OVERLOADED_LINES [ FROM BUS_DATA ]

[ OUTPUT = <filename> ] WHERE (repeat filter from BUS_LIST)

The output is placed in out_buffer.The report dialog is shown below.

../_images/Overvoltage_Lines_Report_Dialog.png

Fig. 75 Overvoltage Lines Report Dialog

REPORTS, SELECT OVERLOADED_TXS

This command retrieves filtered overloaded transformer output data. It calls ovldtxsrpt.f with the following parameters. integer function ovldtxsrpt (in_buffer, out_buffer) parameter (MAXBUFFER = 6600) character in_buffer * (MAXBUFFER) character out_buffer * (MAXBUFFER) in_buffer is positioned to the first character following the string OVERLOADED_TXS. The character array in_buffer contains the following information. /REPORTS, SELECT OVERLOADED_TXS [ FROM BUS_DATA ]

[ OUTPUT = <filename> ] WHERE (repeat filter from BUS_LIST)

The output is placed in out_buffer.The report dialog is shown below

../_images/Overloaded_Transformers_Report_Dialog.png

Fig. 76 Overloaded Transformers Report Dialog

REPORTS, SELECT PHASE_SHIFTER

This command retrieves the phase shifter report. It calls phshftrpt.f with the following parameters. integer function phshftrpt (in_buffer, out_buffer) parameter (MAXBUFFER = 6600) character in_buffer * (MAXBUFFER) character out_buffer * (MAXBUFFER) in_buffer is positioned to the first character following the string PHASE_SHIFTER The character array in_buffer contains the following information. /REPORTS, SELECT PHASE_SHIFTER

[ OUTPUT = <filename> ]

The output is placed in out_buffer.The report dialog is shown below.

../_images/Phase_Shifter_Report_Dialog.png

Fig. 77 Phase Shifter Report Dialog

REPORTS, SELECT TIE_LINE_SUMMARY

This command retrieves filtered area tie line flows. It calls inttierpt.f with the following parameters. integer function inttierpt (in_buffer, out_buffer) parameter (MAXBUFFER = 6600) character in_buffer * (MAXBUFFER) character out_buffer * (MAXBUFFER) in_buffer is positioned to the first character following the string TIE_LINE_SUMMARY. The character array in_buffer contains the following information. /REPORTS, SELECT TIE_LINE_SUMMARY

[ OUTPUT = <filename> ] WHERE (repeat filter from BUS_LIST)

The output is placed in out_buffer.The report dialog is shown below.

../_images/Tie_Line_Summary_Report_Example2.png

Fig. 78 Tie Line Summary Report Dialog

REPORTS, SELECT VOLTAGE_COMPARISON

This command retrieves filtered voltage differences between the base case in residence and a selected base case history data file. It calls vltdifrpt.f with the following parameters. (Not currently working.) integer function vltdifrpt (in_buffer, out_buffer) parameter (MAXBUFFER = 6600) character in_buffer * (MAXBUFFER) character out_buffer * (MAXBUFFER) in_buffer is positioned to the first character following the string VOLTAGE_COMPARISON. The character array in_buffer contains the following information. /REPORTS, SELECT VOLTAGE_COMPARISON

[ OUTPUT = <filename> ] FILE = <filename> WHERE (repeat filter from BUS_LIST)

The output is placed in out_buffer.