ARulesXL Newsletter

1 December 2006

Contents

View this newsletter on the web


ARulesXL Quick Tour

An ARulesXL rule set is a collection of facts, decision tables, rules, formulas and logical relations that are used to determine the values of output properties based on input properties.

For example, here is a rule set name RateTable with a simple decision table to determine the price of a phone call based on whether the call was made on a weekend and during the day. The property .price is the output and the properties .weekend and .daytime are the inputs.

The rule set is queried very much like a database using the function RQuery(). In the function window above you can see the query that asks to find the value of .rate. It also sets the input properties, .weekend and .daytime to the values in cells C5 and C6. RQuery() returns the value of .rate derived from the decision table in the rule set named RateTable.

In addition to input and output properties, a rule set can have intermediate properties that are used in determine the value of output properties.

Suppose we wanted the inputs to be the day of the week, the time of day and the duration of the call. And we wanted the rule set to determine the price of the call. And finally, the rate is not fixed, but a multiple of a single base rate. The new specifications are:

The output property will now be .price. The output property is also called a goal of the rule set.

How it works

The decision tables, rules, facts and formulas are entered in any order in the rule set, much as data is entered in a database. A rule engine is used to determine the output property value from the inputs. It will dynamically choose the rules and table entries necessary for producing the answer.

The output property becomes a goal of the rule engine. If that property depends on other properties, those properties become sub-goals of the rule engine. Each of those might require further sub-goals until the input properties are reached. Here are the sub-goals used in the example query.

Because this is generated dynamically by the rule engine, the rule set developer does not have to worry about flow of control. Simply enter the decision tables and rules and pose the queries they can answer.


www.arulesxl.com

To subscribe or unsubscribe visit our website.
ARulesXL is a trademark of Amzi! inc. Excel is a registered trademark of Microsoft Corporation in the United States and/or other countries.