LoadContingencies Function (version 9)

Concept Link IconSee Also

 

The LoadContingencies function can be used to read a set of predefined contingencies from a PowerWorldâ Auxiliary Contingency file. Thus once you have defined a set of contingencies in Simulator and saved the list to a PowerWorldâ Auxiliary file, you can specify the filename with this function and the Simulator Automation Server will load the contingencies into memory.

LoadContingencies(fileName, EString, {tAppend})

 

Parameter Definitions

Filename : String The name of the PowerWorldâ Auxiliary file containing the defined contingencies. If the file cannot be found, and error will be returned through EString.

EString : Variant This parameter must be assigned a variable declared as a Variant. This parameter is for a return value only, and will assign the passed variable a string representing an error that may have occurred in the Simulator Automation Server. If no error occurred, the EString variable will return an empty string.

TAppend : Boolean This parameter is optional. If you have more than one list of contingencies in separate files, you can append the lists together in the Simulator Automation Client by passing the Boolean value True in this parameter. The default if not passed is False, meaning any existing contingencies in the Simulator Automation Client would be cleared prior to loading the new list.

Example

LoadContingencies("c:\my files\ctgfile.aux", EString, True)

This function call will load a previously created list of contingencies that was saved in the PowerWorld Auxiliary file format. The file name string identifies the location and name of the auxiliary file. By passing the value True in the optional parameter tAppend, Simulator will read the list of contingencies and add them to any existing contingencies already loaded in Simulator. Contingencies in the list existing list with the same name as contingencies in the appending list will be replaced by the records in the appending list.