skip to main content
RPL Diagnostics
When intermediate information is required to debug a RPL execution error, Diagnostics can be used. Following are links to the Diagnostics section to describe how to set up these diagnostics for various sets.
• General; see About RiverWare Diagnostics.
• Rulebased Simulation; see Rulebased Simulation Diagnostics.
• RPL Expression Slots and MRM RPL sets; see Workspace Diagnostics.
Units for RPL Diagnostics
Whenever a RPL value is displayed in the diagnostics or in tooltips, RiverWare tries to use the values from the Unit Scheme, Unit Type Rule. See Unit Schemes in User Interface for details. For monthly and annual values, however, it is sometimes not known within the diagnostics for which timestep the value is associated. In that case, monthly values assume there are 31days in the month. Annual values assume 365days in the year.
Useful RPL Debugging Diagnostic Categories
Some diagnostics groups are more useful in debugging errors than others. The diagnostics groups are listed below, ordered from the most frequently used to the least frequently used. This text was written for debugging Rulebased Simulation rulesets but can be applied to many of the other RPL sets as well.
• The Rule Execution diagnostics group provides information about the evaluation of rules, including when they fire, whether they evaluate successfully, whether they attempt to set a slot, and the value which they attempt to set.
 
• The Print Statements diagnostics group enables the printing of PRINT statements in rules. If this diagnostics group is not turned on, no PRINT statements will be displayed in the Diagnostics Output Window.
 
• The Dispatch Management, then SimObj diagnostics group provides information about the priorities of slots used to determine the dispatch method for each object. This is especially critical when evaluating whether an object dispatched with the intended method.
 
• The Dispatch Management, then Controller diagnostics group generates a message whenever an object begins dispatching and provides the controller priority during the dispatch.
 
• The Function Execution diagnostics group provides information on the execution of predefined and user defined functions. When this group is enabled, function diagnostics are posted for all functions that have Before Execution and/or After Execution diagnostics enabled. Before Execution diagnostics show when the function is called and provides the arguments passed into the function. After Execution diagnostics show the result from the function call and any post-execution constraints imposed.
 
• The Rule Management, then Dependencies diagnostics group provides information about the dependencies of the current rule being evaluated. After the rule execution is complete (successful or not), this diagnostics group posts a list of all slots which are dependencies for this rule.
 
• The Rule Management, then Agenda diagnostics group provides information about the state of the Agenda. After each rule executes, this diagnostics group posts a list of all rules on the Agenda. The diagnostics group also posts a message whenever a rule is placed back on the Agenda due to a change of one of its dependencies.
 
• The Rule Management, then Assignments diagnostics group provides information about all of the slots which a rule is attempting to set. All slots are set as a group only when the rule completes successfully and all of the slot assignments are verified for priority and maximum iterations. This diagnostic group prints the result of the attempted assignments.
 
Revised: 08/02/2021