Introduction |
Top Installation Introduction Samples Tutorial Reference Release Notes
Spreadsheets with their intuitive interface and internal calculation engine are excellent tools for numerical analysis.
Rule-based systems with their logical rules and reasoning engine are excellent tools for decision support applications.
Integrated, the two technologies provide a powerful tool for implementing the next generation of what CIO magazine (October 2004) calls Automated Decision Systems or Smart Business Rules Engineering.
This section describes:
For a visual quick tour of ARulesXL, see A Quick Tour of the ARulesXL Excel Environment.
Decision making criteria are often written as rules. Listed below are some rules that might be used to determine the rate of a phone call based on the time and day of the call.
Rate = 0.05 WHEN Weekend Rate = 0.07 WHEN Weekday and Evening Rate = 0.10 WHEN Weekday and Daytime Weekend WHEN Day = "Saturday" or Day = "Sunday" Weekday WHEN not Weekend Evening WHEN Time > 2000 Daytime WHEN not Evening
Rules such as these do not imply any particular method of use, but rather express logical relationships between conditions and conclusions. They are intended to react dynamically to various inputs, in this case the day and time of a phone call, rather than in a pre-determined manner.
A rule engine allows rules to be expressed declaratively, as above. It accepts rules as logical assertions, without procedural implications, and, much like a database engine, supports user queries against the rule base as shown in the figure.
Without a rule engine, a developer would have to impose structure on the rules using a combination of tables and if-then-else functions to get the desired behavior. In the process, the declarative clearness of the original specifications is lost, the spreadsheet becomes error-prone and difficult to maintain, and direct verification of the rules by domain experts is next to impossible.
The advantages, then, of a rule engine are:
The more complex the rule set, the more the advantages hold true and at a certain level of complexity, a rule engine becomes the only viable alternative.
On the other hand, rule engines are not well-suited for computational and numerical analysis. So, for example an application requiring both decision making rules and computational analysis would not fit well if coded entirely in either a spreadsheet or a rule-based tool. Thus the desire to integrate the two technologies.
A rule engine requires two interfaces:
ARulesXL implements both of these interfaces in the spreadsheet, so that rule definition and rule queries are both performed using the familiar cell grid interface, as shown in the following figure.
Because the definitions and queries are in spreadsheet cells, they can include references to other spreadsheet cells so that they become part of the spreadsheet's dependency graphs used for automatic recalculation.
The following spreadsheet illustrates how cells can be linked to rules, and rules to cells. Excel's dependency arrows are turned on to show the links.
The ARulesXL rule set has two rules that determine unit price based on the quantity ordered. The rules pick up the quantity needed to qualify for a discount from cell D2.
Cell D14 queries the rule set using as input the quantity ordered, which is in D12. The query can be seen in the function window.
Because of the linked dependencies, if any rule changes, then the price in D14 will be recalculated. If the discount quantity in D2 changes, the rules change, and price is recalculated. If the quantity ordered changes, then the price is recalculated as well.
This feature allows for tight integration between spreadsheet calculation and rule inferencing, thus enabling applications to be easily divided into those parts that are best suited for numerical analysis and those best suited for decision rules.
The following screen shot shows a more complex example of the integration between a spreadsheet and rules for pricing phone calls. The rules are slightly more complex than those presented earlier, but should be readily understandable simply by reading the spreadsheet.
Notice that the rules in F3:F18 are dependent on spreadsheet cells. Whenever any of those cells change, the rules are automatically updated.
Notice that the queries are also dependent on other cells, so that when the data changes, the queries are automatically updated.
The following screen shot shows a loan approval sample. In this case the spreadsheet has input data about a loan application and then runs the rules to see if the loan is approved, and if not, what the reasons for rejection are.
As with the pricing example, the rules should be easy to understand simply by reading the spreadsheet.
In this example, a number of rules map input variables directly to cells, rather than having those cells be input in the queries.
Also notice that the queries ask for different values from the rules, some asking for overall approval and others asking for the status of intermediate steps to report back on the spreadsheet.
The availability of rules in a spreadsheet makes spreadsheets a viable tool for business process automation and decision support. Applications such as:
all become viable spreadsheet applications.
Easily readable rules in spreadsheets makes it possible for the experts in each domain to code and maintain the rules. For example, the marketing experts in pricing can maintain the pricing rules, and the product configuration experts can maintain the product configuration rules.
Open in New Window to Print |
---|
Copyright ©2005-7 Amzi! inc. All Rights Reserved.
|