skip to main content
Release Notes : Prior Release Notes : Release Notes Version 4.7 : Rulebased Simulation and RiverWare Policy Language (RPL)
Rulebased Simulation and RiverWare Policy Language (RPL)
RPL User Interface
RPL Palette Dialog Ported to Qt and enhanced
The RPL Palette was re-implemented in Qt. As a result, the dialog is much more compact and easier to use, especially on Windows. The palette has the same general layout with three tabs: Palette Buttons, User-Defined Functions, and Predefined Functions. On the two function tabs, the user is now able to sort the functions alphabetically by Return Type, Name, or Arguments. In addition, the columns can be rearranged more easily. For the functions, the user must now double-click a function on the palette to add it to the selected expression. For user-defined functions, a single click selects the function and shows the description in the Description window, if enabled. Finally, a search feature has been added to the bottom of the Palette so the user can more easily search the functions’ Names, Descriptions, and/or Definitions.
New RPL Palette Buttons
Two new buttons were added to the Conditional/Iterative section of the RPL palette, SUM and AVG. These two operators provide a preconfigured FOR loop to sum or average the values over the specified index.
Enable/Disable RPL Statements
It is now possible to enable/disable individual statements in RPL. For example, a user may disable one assignment statement in a rule. This is accomplished by right-clicking on the selected statement and toggling off Enable. This can also be performed through the Edit menu. The disabled statement changes color according to the user preferences in the Layout->Display dialog.
Enable/Disable Items in a RPL LIST
It is now possible to enable/disable individual items in a RPL List. For example, a user may have a list of reservoirs but wishes to disable the first reservoir. This is accomplished by right-clicking on the selected item in the list and toggling off Enable. This can also be performed through the Edit menu. The disabled item changes color according to the user preferences in the Layout->Display dialog.
Default Agenda Order
The default agenda order has been changed from “1, 2, 3...” to “... 3, 2, 1”. This only affects new policy sets and can be changed from the View ->Show Advanced Properties menu on the Ruleset Editor.
RPL Predefined Functions
Following is a brief description of a new predefined function available for use in the RiverWare Policy Language. Details on the use of these functions and the syntax involved are available in the Rulebased Simulation Documentation in the RiverWare Help.
HydropowerRelease
This function calculates the additional outflow necessary to meet an unmet load (energy requirement) while preventing additional downstream flooding. This function is dependent on having the predefined function FloodControl() and its associated methods execute first which sets up the network topology and checks for necessary data. The HydropowerRelease rule was developed specifically for the U.S. Army Corp of Engineers to implement their hydropower release operations.
Random, RandomNormal
Random(NUMERIC seed, NUMERIC index, NUMERIC units) returns a number from a random sequence of numbers uniformly distributed between 0.0 and 1.0. RandomNormal(NUMERIC seed, NUMERIC index, NUMERIC units) returns a number from a random sequence of numbers whose distribution is normal with a mean of 0 and a standard deviation of 1.
Revised: 07/05/2022