Bookshelf Home | Contents | Index | PDF |
Product Administration Guide > Configuration Rule Template Reference > ConstrainThe Constrain template has the form: Constrain [an expression] to be true The constraint template is useful for making simple comparison or quantity expressions into top-level constraints. For example, you want make sure that there are exactly 4 of Item B in every solution: Constrain [Item B = 4] to be true You can also use the Constraint template to create exclude and require rules that have only one operand. For example the following rule excludes Item B from the solution: Constrain [Item B =0] to be true To require at least 1 Item B in the solution: Constrain [Item B >= 1] to be true By using Compound Logic operators, you can yoke conditions together and then allow or disallow the combination. For example, you want to make sure that if the quantity of Item A > 4 in the solution, then Item B must be less than 5, and vice versa: |
Product Administration Guide |