Contingency Options: Result Storage
Added in Version 19, build on July 19, 2016
These options allow storing the results of a contingency run to file instead of in computer memory. These options are all available on the Contingency Analysis dialog under the Contingency Options tab under the Modeling grouping.
The options allow specification of the object types and fields that should be stored to file during the contingency run. Results are only stored for objects that are violations during the contingency run, but almost any object can be stored using Custom Monitors. Because files are written as the contingency run processes, post-contingency values that are not normally stored for violations can be stored without causing any additional computer memory to be used. This allows customization of results that is not possible when saving results in memory.
These options must be specified BEFORE the contingency analysis is run. Results cannot be saved to hard drive using these options upon completion of a run.
The following options are available on the Result Storage page.
Write to Hard Drive
Check this box to save results to file instead of computer memory. If saving to file, there will be no results in memory.
File Name
Directory location and prefix of the file name for the file to which results will be saved. Multiple files will be saved based on the Object Types used with the Result Storage object definitions. The given file name will be appended with the relevant Object Type for the results in the file. The file extension specified determines the type of files that will be saved. Using AUX as the extension will save a Simulator auxiliary file. Using any other extension will save a CSV (comma separated variable) file.
Use Column Headers
Check this box to identify the fields in the saved files using column headers. If not checked, the fields will be identified by variable name.
Add Defaults
Click this button to create default Result Storage objects. The default objects will define saving of violation results and fields for the ViolationCTG object. This includes the basic information that is stored for a violation including the contingency, violated element identification, violation value, and violation limit.
Result Storage Object Display
The Result Storage object display is a type of Case Information display and has the abilities common to this type of display. Objects can be added to this display by using the Insert option on the local menu. To update an existing object use the Show Dialog option on the local menu. Most of the fields cannot be updated directly in the display and can only be updated through the dialog.
Object Type
Type of object to store. A separate file will be created for each different type of object specified. When saving an auxiliary file, the object type used in the DATA section header in the file will always be ViolationCTG. Fields that are specified for different object types will be prepended with that object type enclosed in pipes, e.g. |Bus|, |Branch|, |Gen|, etc. This convention will allow the file to be loaded as an auxiliary file. The contents of the file will be loaded as contingency violations and any fields enclosed in the pipe symbols will be ignored because they are not available for contingency violations.
The following is an example of a file that was saved for the object type Branch. The fields that are Branch fields are prepended with the object type, but the fields that are ViolationCTG fields have no modification.
Restrict
If a field should only be included in a file for a specific object type, specify that object type here.
This is only useful when saving fields for the ViolationCTG object type. Fields specified for this object type will be stored with all files by default. If a field is only needed if the violation is a bus or a branch violation for example, it needs to be restricted to be only shown in that file and should not appear in the ViolationCTG file that contains all violations regardless of type.
Field Name
Variable name of the field to include in the saved file.
Order
Specifies the order of where a field should be placed in a saved file. For each type of file that is saved, all of the fields to include for that type are sorted from low order to high order to determine their placement.
Example
The following set of Result Storage objects will create three different files: _Bus, _Branch, and _ViolationCTG.
The branch file looks like the following. The ViolationCTG fields that are set to Restrict = Bus do not appear in this file, but do appear in the bus file.
The bus file looks like the following:
The violation file looks like the following: