String Expressions

 

Simulator allows you to define String Expressions to generate a string from other fields. These String Expressions can then be shown as a column in a Case Information Display. To define string expressions, right-click in a Case Information Display table and choose Define String Expression from the local menu or choose Expressions Menu > Define String Expression from the case information toolbar.. This brings up the Define String Expressions dialog. When you bring up the dialog you will only see expressions that have been defined for the type of object shown on the Case Information Display (e.g. Bus, Generator, Interface, etc.).

To define a new expression click New.

You can name the expression for easy identification in the list of fields for the object by filling in the Expression Name field.

To define the expression, first specify which fields you would like to use in the expression and assign them to the variables x1, x2, …, x8. Fields can be chosen that apply to the type of object for which the expression is being defined or a Model Field that is a field associated with a specific object, Model Expression, or Model String Expression can be chosen.

The string expression is then defined in terms of the variables x1, x2, ..., x8. Different elements of the expression are concatenated with a + symbol. A number of different types of elements can be combined.

 

For example

"This string expression displays the bus name (" + x1 + ") and per unit voltage (" + Str(x2, 3, 2) + ")"

 

For a complete list of functions and operators that are available to you for numeric expressions, see Functions and Operators Available.

Once the String Expression has been defined, clicking OK will save the string expression and close the dialog. A prompt will ask if the string expression should be added to the case information display. The string expression can also be added or removed later using the options to update columns found in the Configuring the Case Information Displays topic.