skip to main content
RiverWare Policy Language
Initialization Rules
In accounting models, values set by initialization rules were not correctly used. To fix this, the timing of initialization rule execution was moved to the very end of the initialization phase. In addition, diagnostics for initialization rules can now be found only in the Simulation and Rulebased Simulation Settings. For more information on initialization rules, see section 5.1.2 of the Simulation portion of the RiverWare help.
RPL Editor Displays
FOR EACH changed to FOR
To be consistent, the FOR EACH statement was changed to be the FOR statement
New Display Colors
Two new display colors were added to the RPL Display Settings dialog:
• Expressions - the color for key words in expressions (like IF, THEN, AND, OR, etc) The default color is dark purple.
• Expressions background - the color used for the background of the bounding rectangle for expressions. The default color is pale gray. Note, this color was added to better show bounding rectangles for each expression in a block. If you do not wish to see it, you can change the Expression Background color to match the Background color. This duplicates previous behavior.
Open Slots and Objects from RPL dialogs
Within RPL expressions, the following items were added to the right-click context menu when an expression is selected:
• Open Object...
• Open Slot...
• When the selected item is a valid object or slot, then the appropriate menu item is enabled, and when activated will open the appropriate dialog. Note that this only works for expressions for which the object can be determined without evaluation.
RPL WITH Statement
A new RPL statement, WITH, was added:
WITH ( <type> variable = <expr> ) DO
<statements>
END WITH
This evaluates the expression, assigns the result to a local variable with the given name and type, then evaluates the contained statements, which may reference the variable. This statement is analogous to the With expression, but can be used across statements.
Revised: 07/05/2022