Where is the "Enable Rules Model Run Analysis" checkbox state used?
Phil Weinstein, CADSWES, 1-30-2015 (RW 6.6).

(A) Analysis Highlights

  1. The "Enable Rules Model Run Analysis" checkbox dates back to (ostensibly before) the Qt port of the dialog in Feb. 2005.
     
  2. The only significant user feature dependent on complex data whose computation depends on this checkbox being on is: the Rules Effects feature of the Run Analysis Dialog. This includes the Rules Effects panel. The central features on the Run Analysis Dialog DO NOT depend on it.
     
  3. BAD: There is a PROFOUND performance problem with the Rules Effects Panel's QTreeView. I was using a version of the Gnats 5580 bug model from Mitch. This feature was effectively UNUSABLE! Huge delays when running, and clicking a different grid cell. In the debugger, I can see that there is virtually constant rebuilding of, and geometry computations in the RulesEffectsTree.
     
  4. However, I'm not confident that this GUI performance bug was the motivation for introducing this checkbox. It may have originally been about the time it took to collect the data during a run.

Recommendations:

  1. Fix the profound Rules Effects Panel performance bug.
  2. See how enabling/disabling this feature effects model run time.

... These can probably be done separately. After confirming that Rules Effects Panel processing is not occurring when the Model Run Analysis dialog is not shown (or hasn't been shown within the current RiverWare session), model run time testing can be done with a current RiverWare version.

(B) The "Enable Rules Model Run Analysis" checkbox

This checkbox is tied to the following state in Rpl/RuleSetMgr:

Checkbox implementation:

(C) RuleSetMgr data structures maintained only when "collectingRunInfo" is set

Major Data Structures:

Minor Data Structures:

(D) Public RuleSetMgr functions which provide data dependent on "collectingRunInfo" being set.

Note: See more information about these methods in a detail section below.

  1. RplSet* RuleSetMgr::getRulesetFromLastRun (QString& ruleSetNameRet) const;
  2. void RuleSetMgr::getRulesFromLastRun (const Date_Time& when, cwSlist<RulesetMgr_RuleInfo>& rulesInfo) const;
  3. QString RuleSetMgr::ruleNameFromLastRunByPriority (PriorityType) const;

(E) Dialogs making use of those public RuleSetMgr functions

Modules:

  1. QtRun/QtRunAnalysisDlg.cpp
  2. QtRun/RulesEffectsTree.cpp
  3. Q3GUI/SlotDataTableModel.cpp -- only getRulesetFromLastRun()
  4. QtSCT/SctModelData.Sim.cpp -- only getRulesetFromLastRun()

The use of the relevant complex data structures are limited to support for "Rules Effects" features (in the first two items above). The screenshots below show the Rule Effects panel with "collectingRunInfo" ON and OFF:

Additional Information

(F) Detail: Functions whose processing is dependent on "collectingRunInfo" being set.

(1) After successfully executing a rule within the loaded RuleSet (in RuleSetMgr::executeRuleset()), the priority integer is inserted into this special time series structure:

(2) in RuleSetMgr::initRunNotify (RunInfo*), the following are set:

(3) In RuleSetMgr::runInfoChangedNotify(), this list is cleared:

(4) bool RuleSetMgr::dumpRunAnalysisData (cwostream&) const ... these methods are called only if "collectingRunInfo" is set:

(5) bool RuleSetMgr::dumpSuccessfulRules (cwostream&) ... generates the following output only if "collectingRunInfo" is set:

(6) bool RuleSetMgr::dumpRulesInformation (cwostream&) const ... generates the following output only if "collectingRunInfo" is set:

(7) int RuleSetMgr::loadSuccessfulRules (Tcl_Interp*, int argc, char** argv) -- used in MODEL FILE LOADING ... loads data only if "collectingRunInfo" is set. (Furthermore, it fails an assertion if that state is not set).

(G) Detail: Functions whose results are dependent on "collectingRunInfo" being set.

(1) RplSet* RuleSetMgr::getRulesetFromLastRun (QString& ruleSetNameRet) const.

(2) void RuleSetMgr::getRulesFromLastRun (const Date_Time& when, cwSlist<RulesetMgr_RuleInfo>& rulesInfo) const

(3) QString RuleSetMgr::ruleNameFromLastRunByPriority (PriorityType) const

--- (end) ---