Corticon Studio: Rule Modeling Guide : Logical analysis and optimization : Validating and testing Rulesheets in Corticon Studio : The completeness checker : Letting the expansion tool work for you: tabular rules

Letting the expansion tool work for you: tabular rules
Business rules, especially those found in operational manuals or procedures, often take the form of tables. Take for example the following table that generates shipping charges between two geographic zones:
 Matrix to Calculate Shipping Charges per Kilogram From/To zone 1 zone 2 zone 3 zone 4 zone 5 zone 1 \$1.25 \$2.35 \$3.45 \$4.55 \$5.65 zone 2 \$2.35 \$1.25 \$2.35 \$3.45 \$4.55 zone 3 \$3.45 \$2.35 \$1.25 \$2.35 \$3.45 zone 4 \$4.55 \$3.45 \$2.35 \$1.25 \$2.35 zone 5 \$5.65 \$4.55 \$3.45 \$2.35 \$1.25
In the following figure, we have built a simple Vocabulary with which to implement these rules. Because each cell in the table represents a single rule, our Rulesheet will contain 25 columns (the Cross Product equals 5x5 or 25).
Figure 229. Vocabulary and Rulesheet to Implement Matrix
Rather than manually create all 25 combinations (and risk making a mistake), you can use the Expansion Tool to help you do it. This is a three-step process. Step 1 consists of entering the full range of values found in the table in the Conditions cells, as shown:
Figure 230. Rulesheet with Conditions Automatically Populated
Now, use the Expansion Tool to expand column 1 into 25 non-overlapping columns. We now see the 25 sub-rules of column 1 (only the first ten sub-rules are shown in the folowing figure due to page width limitations in this document):
Figure 231. Rule 1 Expanded to Show Sub-Rules
Each sub-rule represents a single cell in the original table. Now, select the appropriate value of shipCharge in the Actions section of each sub-rule as shown:
Figure 232. Rulesheet with Actions Populated
In step 3, shown in the following figure, we renumber the sub-rules to arrive at the final Rulesheet with 25 general rules, each of which may now be assigned a Rule Statement.
Figure 233. Rulesheet with Renumbered Rules
We will revisit this example in the Optimization section.