Multiple constraints
A multiple discrete constraint can be applied to a property, to restrict the property
values to be 0 or a multiple of the specified value.
A property can have multiple constraint if the property reference is preceding with the ‘Multiple’ keyword.
For example, Multiple: Class name.property name, value;
where:
Class name.property name
is a property reference for which the multiple constraint is to be applied.value
is the value of the multiple constraint for which the property is restricted. Possible options:- [OPT_MULT_01] – (Constant number literal): This value is used as the multiple value
for all
Class name.property name
multiple constraints. - [OPT_MULT_02] – (attribute): The multiple value per Resource for
Class name.property name
from the related resource attribute value. - [OPT_MULT_03] – (property): The multiple value per Resource and Bucket for
Class name.property name
from the property value for the related Resource and Bucket. - [OPT_MULT_04] – (default property): The multiple value per Resource for
Class name.property name
is considered from the related resource default property value. - [OPT_MULT_05] – (variable): The variable value is used as the multiple value for all
Class name.property name
multiple constraints.
- [OPT_MULT_01] – (Constant number literal): This value is used as the multiple value
for all
When value refers to an attribute, property or default property, the multiple value is
considered from the attribute, property or the default property within the context of a
Resource and Bucket.
Note:
- A multiple value of 0 can be used to prevent the multiple constraint being applied.
- A non-zero multiple is a discrete constraint which has a major negative impact on the solver performance.
Requirement | Value |
---|---|
Values for production quantity must be multiples of 100 (e.g.
0, 100, 200, 300, ...). |
multiple: Production.production quantity, 100; |
Values for production quantity must be multiples of the
resources default property value batch size (*) |
multiple: Production.production quantity, batch size (*); Note:
|
Values for production quantity must be multiples of the
property value batch size . |
multiple: Production.production quantity, batch size; Note:
|
Values for production quantity must be multiples of the
variable $production_batch_size value. |
multiple: Production.production quantity,
$production_batch_size; Note: The value for
$production_batch_size variable is applied when the solve is
executed. |