Tutorial |
Top Installation Introduction Samples Tutorial Reference Release Notes
Because the rules are applied dynamically, it is sometimes difficult to understand the reason why a complex rule set is not behaving correctly. The ARulesXL | Trace Query command traces the behavior of the reasoning engine as it applies the rules based on a query.
To start the trace, first select a cell with a query in it, such as A6 in the sample. Then select ARulesXL | Trace.
The trace pops up a separate workbook and menu, which you can reposition for easy viewing. You can dock the menu and it will appear in the docked position next time you run trace.
The buttons on the Trace menu are:
The cell below the title has information and instructions for using the trace.
After two steps, the trace worksheet looks like this (note the Trace Menu is docked above now):
The query being traced is echoed in the top section.
The Action section shows the current steps in the reasoning process. In this case the trace indicates:
The Known section shows the values of properties that have already been determine, and the source of that value. In this case there is just one: The value of Quantity is known to be 25 based on input.
Continuing to select the step button shows the steps of evaluating rule A2:
In this case evaluating rule A2 requires:
If skip had been choosen instead of step, these details would have been skipped, and the next step, indicating failure of rule A2 would have been shown immediately.
Continuing, the trace works through the rule at A3 and finds the value of UnitPrice. At this point the trace is done and you can close the trace worksheet.
The trace indicates it found the value of 8 using the rule at A3. Also note that the list of known properties now includes UnitPrice and the source of it's value.
The trace worksheet expands and collapses the trace as various rules are tried and failed. The full history of the reasoning is also recorded in a text file called 'arulesxl trace.txt'. It is in the directory with the workbook being traced. It is in a semi-colon delimited format that corresponds to the columns in the trace worksheet. You can display this file with the ARulesXL | Open Trace Log File command.
Here we can see the history as first rule A2 is tried, and then rule A3.
Tracing is a valuable tool for both debugging and learning exactly how the ARulesXL rule engine works.
Open in New Window to Print |
---|
Copyright ©2005-7 Amzi! inc. All Rights Reserved.
|