Bookshelf Home | Contents | Index | PDF |

Product Administration Guide > Configuration Rule Assembly Language > ## Boolean OperatorsWhen you specify this type of operator, the eConfigurator engine interprets it as true when the item is in the solution, and as false if the item is not in the solution. If you specify a resource or an arithmetic sub-expression as an operand, the eConfigurator engine interprets it as true if the expression is greater than zero, and false if the expression is less than or equal to zero. The requires operator (req()) is an example of this type of operator. The eConfigurator engine interprets the following rule to mean item A requires item B. In other words, if A is in the solution, B must be in the solution. The eConfigurator engine does not interpret this rule to mean the current quantity of item A requires the same quantity of item B. That rule would be written as follows: The Boolean operators are shown in Table 37. Table 38 provides the truth-state definition of how the Boolean operators work. The first two columns contain the operands A and B. These could be items or arithmetic expressions, in which case A>0 means that A is in the solution. ## More on the Requires OperatorThe requires operator is not an incremental add. For example, you write the rule req(A, B). If the user picks A and there are no B's in the solution, the eConfigurator engine will add at least one B. The next time the user picks A, the engine does not add another B. If you want to add a B each time an A is added, use the inc() operator. ## More on the Logical Equivalence OperatorAs a top level rule, the logical-equivalence operator (eqv()) creates a mutually-requires relationship between its operands. The operands can be either items or sub-expressions. For example eqv([A], [B]) means than if item A is in the solution, then at least one item B must be in the solution. Also, if item B is in the solution, then at least one item A must be in the solution. Note that the relationship between [A] and [B] is noncumulative. (Use the inc() operator to create cumulative-requires relationships.) For example, the following rule states that if the quantity of [A]>2, then [B] is required. This expression constrains the solution as follows: - If there are more than two A's in the solution, there must be at least one B.
- If there cannot be any B's in the solution, there cannot be any more than two A's.
- If B is in the solution, there must be more than two A's.
- If A is limited to two or less, B is excluded.
## More on the Excludes OperatorAs a top-level rule, the excludes operator (excl(A, B)) creates a mutually exclusive relationship. The expression excl([A], [B]) means that if item A is in the solution, item B cannot be in the solution. It also means that if item B is in the solution, item A cannot be in the solution. The exclude rule can also be used with sub-expressions. For example, the following rule excludes item B when item A's quantity is greater than 2. It also prevents item A from being greater than 2 when item B is in the solution. ## Multiple Operands for Require and Exclude OperatorsYou can use multiple operands in requires and exclude rules. For example, you could write the following rule: This syntax is interpreted by the eConfigurator engine as if you had written two rules: In other words, [A] excludes both [B] and [C]. Note that [A] is the first operand in both the rules. The eConfigurator takes the first operand and creates expressions between it and each remaining operands. This works the same way for require rules: This syntax is interpreted by the eConfigurator engine as if you had written two rules: In other words, [A] requires both [B] and [C]. There is no limitation on the number of operands you can use in this type of expression. |

Product Administration Guide |