skip to main content
RPL
The following changes have been made to the RiverWare Policy Language (RPL).
New or Modified RPL Predefined Functions
GetTraceNumber
The GetTraceNumber() RPL predefined function has been added. This function is similar to GetRunIndex, but differs as follows.
A multiple run is configured to simulate N traces, and GetRunIndex() always returns 1..N. If the multiple run is configured to begin with trace 1, GetTraceNumber() also returns traces 1..N. If the multiple run is configured to begin with trace M, GetTraceNumber() returns traces M..(M+N-1).
Hypothetical Target Simulation
Previously, a run would stop due to a table interpolation error during hypothetical target simulation.
The RPL predefined functions for hypothetical target simulation, HypTargetSim and HypTargetSimWith-Status, attempt to find a control slot value that leads to a desired target slot value. Two numeric parameters to these functions provide minimum and maximum control slot values, and these bounds constrain the search for a satisfying control slot value. The search algorithm first computes the target value associated with each of these values by conducting a hypothetical simulation using each of these values on the control slot. If dispatching fails during either of these simulations, an error is issued and the run stops. This behavior is problematic when the dispatch failure is due to a control slot bound that is too extreme, leading to a table interpolation error. This was the case with the model run analyzed, and in this situation it is preferable to continue the search instead of stopping the run.
The hypothetical target simulation has been modified to achieve this increased flexibility for the input control slot by relaxing the internal search algorithm requirement that the target interval be unbounded. That is, if either the minimum or maximum control values fails to lead to a valid target value—because the simulation failed to dispatch successfully with that control value—the search algorithm effectively treats that bound as infinite and continues the search until either the interval becomes bounded and a satisfying control value is found, or the maximum iteration limit is reached.
RPL Set Comparison Tool
The RPL Set Comparison Tool has been reimplemented to be more consistent with the Model Comparison Tool. The search, filter, and other usability features have been improved, and many of the RiverWare 8.1 Model Comparison Tool improvements have also been applied, including the new Copy Properties feature. See Copy Properties for details.
RPL Slot Viewer Buttons
New RPL Slot Viewer buttons have been added to the workspace to allow you to more easily access open RPL Viewers. See Slot Viewers and RPL Viewers Workspace Buttons for details.
Representation of RPL Slot Values
When slot values are accessed in RPL, a standard number, scale, and unit are used. There were previously three ways to represent a slot value as a RPL numeric value:
• std—uses a scale of 1.0 and the slot’s internal unit.
• user—uses the slot’s user scale and user unit.
• mixed—uses the slot’s user scale and standard unit.
The mixed approach was used exclusively through RiverWare 5.2, but it was not ideal because of the use of user scale. As a result, the other two options were added in RiverWare 6.0, and the --rplslotvalunits command line argument was added to allow users to control this behavior. The user option provided some benefit, but the results of a run could change if user units changed. For these reasons, the std scheme is preferred.
In RiverWare 8.1, the user and mixed options have been removed; the std approach is the only one available. With this change, RPL evaluation should not be affected by changing slot units.
In rare circumstances, this change could lead to different numerical results. In testing performed by CADSWES, the only differences were insignificant.
Revised: 07/05/2022