RiverWare Policy Language
Diagnostics and Debugging
WITH Statement Diagnostics
For WITH statements, the variable name is shown in the rule execution diagnostics.
Index vs Priority
The term index is now used to indicate the order of RPL rules/methods when the order of the rule/method in the set does not determine the priority or when there is no priority associated with the rule. The index is displayed in a new Index column of the RPL set editor for the following RPL sets:
• The Iterative MRM Rules set
• Object-level User Defined Accounting Method sets
The RPL set editor no longer displays the priority column for sets to which the concept of priority does not apply:
• The Iterative MRM Rules set
• Object-level User Defined Accounting Method sets
Initialization Rule Changes
The approach used by Initialization rules was modified to show which rule set a particular slot value. The Initialization Rules set editor now shows an Index, Flag and Priority column display.
• The Index is a unique identifier of the rule as described above.
• The Flag column indicates the flag which will be associated with the values set by that rule, R or Z, according to the rule configuration.
• The Priority column shows one of the following
– 0 if the rule is configured to set the DMI Input (Z) flag,
– IR if the rule is configured to set the Rules (R) flag. IR will be shown on the slot values indicating it was set by an Init Rule.
You can now see a tool tip on any slot value display showing the Rule or Initialization Rule that set that value. See
Series Slot Value Information for more information.
RPL Expression Editing
Canceling Empty Expression
Canceling editing of an empty expression is easier to cancel. You can now cancel these edits by pressing Esc, Enter or clicking away from the in-line editor menu.
Slot Lookups are Easier to Edit
When a slot lookup expression is selected, Slot[ ], Slot [E,E], or Slot [E], the slot expression is automatically selected, so you can immediately select the slot without an additional click.
Slot Name Selector
The RPL Palette Slot Selector now preserves your filter settings and prior selections.
RPL Comment Wrapping
The wrapping from the comment editor dialog is now retained and shown in the RPL editors. That is, when you hit enter in the comment editor OR the line wraps, the comment in the RPL editor will appear the same. See
Comments in RiverWare Policy Language (RPL) for more information.
RPL Object Display
The display of OBJECTS in RPL was improved not to show the % symbol or quotation marks.
Predefined Functions
ColumnLabels and RowLabels
The following functions were added. They return a list containing all of the column or row labels of the input slot, respectively.
GetColumnIndex and ColumnLabel
The following functions now support Agg Series slots:
Get3DTableVals
A new function, Get3DTableVals was added. The function returns the values from a 3D table in a list. For more information, see
Get3DTableVals in RiverWare Policy Language (RPL).
HasRuleFiredSuccessfully
The HasRuleFiredSuccessfully was enhanced to behave as follows:
• Rulebased Simulation rules: has rule fired in current timestep.
• Initialization Rules: has rule fired in current single run.
• MRM rules: has rule fired in current MRM iteration (single run).
• Global functions set: the behavior for the caller's application.
• Other: not applicable, abort with an error message.
RPL User Interface
Add to Report Group
RPL set and group editors have a new Add To Report Group... operation. A RPL object selector is presented for you to identify the destination Report Group.
Move RPL item to the first priority
When dragging at item to the first item within the list, the confirmation dialog now provides an additional option to place the dragged item in the first position.
RPL Object Selector
A name filter was added to the RPL Object Selector dialog. This dialog is used when selecting rules/goals from diagnostics and when selecting RPL objects in a model report.
RPL Set Analysis Tool
Index and Flag columns were added to the RPL set analysis tool under the Window Columns menu
RPL Set Name Colors
You can now change the color of the text shown for RPL Objects (Rule, Group, Function, etc) in a RPL set. Rules and functions inherit their color from the group unless they are explicitly changed.