skip to main content
Release Notes : Prior Release Notes : Release Notes Version 4.8 : Rulebased Simulation and RiverWare Policy Language (RPL)
Rulebased Simulation and RiverWare Policy Language (RPL)
RPL User Interface
Search and Replace
In the RiverWare Policy Language set editors, it is now possible to Search and Replace. The RPL search and replace dialog supports flexible replacement of strings within a RPL set. Within this dialog the user can search for all occurrences of a string and replace all or some of those occurances with another string. The screenshot below shows this dialog.
For more information see the RPL Search and Replace section of the Riverware’s Rulebased Simulation online help.
Import and Export of RPL blocks
Functionality has been added to allow the import and export of RPL blocks between rulesets, object level accounting methods, MRM rules, expression slot RPL sets and optimization ruleset. Now the user can export a rule, group, or the entire set. To export, the user shows the Export column using the View menu. The user then selects the rules and/or groups to be exported and then uses the File menu to initiate an export. The following screenshot shows the export column.
To import, the user selects import from the File menu on the set editor and selects a file to import. RiverWare opens the following dialog which allows the user to confirm the import and resolve any conflicts. More information is available in the RPL Editor Dialogs section of the RiverWare Rulebased Simulation help
Deleting RPL Blocks
A confirmation dialog is now presented when the user attempts to delete a group, rule, or function in the RPL Set Editors. This was added to prevent inadvertent deletion of RPL objects.
Predefined Function Diagnostics and Display
The user can now enable predefined function diagnostics before and after execution of the function. To enable this functionality, the display of predefined functions was also added to the RPL set editor. The user can now display predefined function groups using the View menu. Although not editable, opening a predefined function displays the name of the function, the arguments, and text saying that the function cannot be edited. Similar to user defined functions, the user can then specify to print Before Execution or After Execution diagnostics for each predefined function. Functionality was added to turn on and off all predefined function diagnostics from the main RPL set editor under the Ruleset -> Function Diagnostics menu. Below is a screenshot of a predefined function with function diagnostics enabled.
RPL Predefined Functions
Following is a brief description of new predefined functions 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.
HasRuleFiredSuccessfully
This function returns a boolean of whether the specified rule has fired successfully on the current timestep.
ComputeReservoirDiversions
This function is used to meet multiple water user demands using multiple reservoir diversions. It was developed for the U.S. Army Corp of Engineers to allocate diversions that come directly from one or more reservoirs.
MeetLowFlowRequirement
This function computes the necessary Low Flow Releases from contributing reservoirs to meet the low flow requirement at a specified control point. It was developed for the U.S. Army Corp of Engineers.
Revised: 07/05/2022