Quantity Conditions

Quantity conditions compare the quantities of two items. Depending on the session context in which the quantity condition is evaluated, it either returns true/false or is enforced as a constraint.

For example you write the following constraint:

(Product A > Product B) requires Product C

If the user picks Product A so that its quantity is greater than Product B, then Product C is required. In this case, the quantity condition is evaluated as true/false, and Product C is required when it is true.

Contrast this with the following constraint:

Product C requires (Product A > Product B)

When the user picks Product C, the condition (Product A > Product B) is enforced as a constraint. In all further solutions, the quantity of Product A must be greater than the Product B. Also, if the quantity of Product B is greater than Product A in the solution, Product C is excluded.