RPL
This section describes changes to the RiverWare Policy Language (RPL).
Alert and Notice Statements
Two new statements were added to RPL:
• Alert
• Notice
These two statements post a message to the diagnostic output window just like the Warning statement. All three statements (Warning, Notice, and Alert) have unique colors as described under
Notice, Warning, and Alert Messages in Debugging and Analysis.
Figure 10.5 shows a sample use of an Alert statement. A Notice can be used in the same manner.
Figure 10.5 Sample use of RPL Alert statement and resulting diagnostic message
New Statement Menu on RPL Block Dialogs
Within RPL block dialogs (Rules, Goals, Methods), the operations to add statements were moved to a separate Statement menu.
Figure 10.6 Statement menu in a RPL Viewer dialog
New RPL Predefined Functions
The following RPL Predefined functions were added.
GetTextSlotValueAsString
This function gets the value from a Text Series Slot at the specified datetime and returns a string.
GetSlotNameAndCol
Given a slot, this function return the slot name portion of the full name, combined with the column label when the input slot is an aggregate series slot or a column of an aggregate series slot.
StringToTextSlotNumeric
This function converts a string into a numeric that can be set on a Text Series Slot.
TextSlotNumericToString
The function converts a Text Series Slot encoded text (a numeric) into a string.
Text Series Slots Reading and Writing
Text Series Slots store text strings as a series of encoded numeric data. The RiverWare Policy Language (RPL) was improved to read Text Series Slots with any RPL set and set Text Series Slots from Rulebased Simulation Rules and Initialization Rules. To support this, three new predefined RPL functions were added: two for reading text slots and one for writing text slots.