Threshold constraints
A threshold discrete constraint can be applied to a property to restrict the property values to 0 or at least the threshold value (= 0 or > = threshold).
A property can have a threshold discrete constraint if the property reference is preceding with the Threshold keyword.
For example, Threshold: Class name.property name, value; where:
Class name.property nameis a property reference for which the threshold constraint is to be applied.valueis the value of the threshold for which the property is restricted. Possible options:- [OPT_THRE_01] – (constant number literal): This value is used as the threshold value for all
Class name.property namethreshold constraints. - [OPT_THRE_02] – (attributes): The threshold value per Resource for
Class name.property namefrom the related resources attribute value. - [OPT_THRE_03] – (property): The threshold value per Resource and Bucket for
Class name.property namefrom the property value for the related Resource and Bucket. - [OPT_THRE_04] – (default property): The threshold value per Resource for
Class name.property namefrom the related resources default property value. - [OPT_THRE_05] – (variable): The variable value is used as the threshold value for all
Class name.property namethreshold constraints. Whenvaluerefers to an attribute, property or default property, the value for the threshold constraint from the attribute, property or default property, within the context of a Resource and Bucket. - [OPT_THRE_06]: A threshold value of 0 can be used to prevent the threshold constraint being applied. A non-zero threshold is a discrete constraint which has a major negative impact on the solver performance.
- [OPT_THRE_01] – (constant number literal): This value is used as the threshold value for all
| Requirement | Value |
|---|---|
Values for purchase quantity must be 0, or at least 100. |
threshold: Purchase Order.purchase quantity, 100; |
Values for purchase quantity must be 0 or at least the value of the resources default property value minimum purchase (*). |
threshold: Purchase Order.purchase quantity, minimum purchase (*);
Note:
|
Values for purchase quantity must be 0 or at least the value of the property value minimum purchase. |
threshold: Purchase Order.purchase quantity, minimum purchase;
Note:
|
Values for purchase quantity must be 0 or at least the value of the value for variable $minimum_purchase. |
threshold: Purchase Order.purchase quantity, $minimum_purchase;
Note: The value for the $minimum purchase variable is applied when the solver is executed.
|