skip to main content
Rulebased Simulation
Hypothetical Simulation
New Argument
A new argument has been added to each of the hypothetical simulation functions. This argument indicates the number of timesteps before and after the current timestep which might be involved in the simulation. Hypothetical simulation involves making copies of all the objects in the subbasin and this new argument is used to determine how much data should be copied from each object. Users should set this argument equal to the number of timesteps before and after the current timestep which they would like to be considered in the hypothetical simulation. If no value is assigned to this argument, RiverWare will use a heuristic scheme to automatically assign a reasonable value to this argument the first time a ruleset is loaded in RiverWare version 4.4. For further detail on how this argument is used in hypothetical simulation, see the hypothetical simulation predefined functions in the Rulebased Simulation Documentation in the online help.
Rules Palette Predefined Functions
Following is a brief description of changes to the rules palette predefined functions available for use in the RiverWare Policy Language for writing rules. Details on the use of these functions and the syntax involved are available in the Rulebased Simulation Documentation in the online help.
FloodControl
The new FloodControl predefined function invokes the selected Flood Control method on a computational subbasin. For each reservoir in the subbasin, two pairs are returned: one for the Outflow slot and one for the Flood Control Release slot on the reservoir.
Change to SumSlotsInARange
The “Sum Slots in a Range” predefined function now uses the timestep of the slot instead of the timestep of the model (i.e., controller timestep) when converting values. This change was made because the slot could be on a data object and have a different timestep than that of the model.
ResetRanDev
The execution of the ResetRanDev predefined function in some users’ rulesets could be affected by recent performance enhancements. These performance enhancements do not execute RPL print statements and send them to the diagnostic output unless Diagnostics are turned on. Some users’ rulesets currently execute the ResetRanDev function through a print statement. ResetRanDev should now always be called from a function with arguments, not from a print statement. E.g.,
object.slot[]=IF(NOT ResetRanDev (...))
STOP_RUN “ResetRanDev Failed”
ENDIF
This will never assign any values, but will always evaluate the function call.
The ResetRanDev function is used to initialize internal data structures which permit the RanDev function to return a pseudo-random sequence of numbers. See the ResetRanDev function in the Rulebased Simulation Documentation in the online help for more information.
Rules Palette Buttons
New Regulation Discharge Flag Button
A button has been added to the Rules Palette to set the new Regulation Discharge flag (G). Regulation Discharge and its dependent methods are executed when the Regulation Discharge flag is set for a timestep on the Reg Discharge Calculation slot on a control point. The Regulation Discharge method calculates the maximum flow allowed in the channel at the control point as calculated by the flood control releases. This calculation dictates the total water that could be released from all the reservoirs upstream as a result of flood control operations.
New Surcharge Release Flag Button
A button has been added to the Rules Palette to set the new Surcharge Release flag (S) for flood control. Setting the surcharge release flag on a Reservoir’s Outflow slot allows the surcharge release methods to be executed. The selected Surcharge Release method calculates the releases out of the surcharge pool that are not subject to downstream channel constraints.
RPL Units
Several units have been added to the list of RPL units to make the list consistent with those units available in Simulation. The units of million gallons per day (mgd), mega liters (ML), giga liters (GL) and liters (liters) have been added to the list of RPL units.
Rules Analysis Dialog
Close Window Keyboard Accelerator
A keyboard accelerator has been added to close the Rules Analysis Window:
CTRL+W
Setting Specific Columns on the AggSeries Slot with a Rule
It is now possible to set specific columns of an AggSeries Slot with a rule. Previously it was only possible to set the first column of an AggSeries Slot with a rule. This new functionality may be particularly useful now that the Data Object supports AggSeries Slots. Users can specify the column by adding column number information to the rule (e.g., object.slot[<date>, <column number>]). If the column number is not specified, the first column will be set.
Revised: 07/03/2024