Constraints - Modelio-R-D/VariabilityDesigner GitHub Wiki
To represent the variability of a 150% model, we apply stereotyped constraints on model elements.
There is two types of variation constraints with two sub-types each:
-
Structural
-
Optional
-
Alternative
-
-
Parameter
-
Calculated
-
Alternative
-
These constraints types are derived from the variation types defined in VEL.
Structural variations are applied to model elements we intend to remove or not depending on the chosen variant.
-
Variation name: identifier for this specific variation
-
Variation point: identifier for this group
-
Type: fill with the type of the following condition (See possible values here)
-
Condition: the expression here will trigger the variation if fulfilled, the format of the condition depends on the type selected before
The alternative type means that exactly one variation can be chosen from the variation point.
For example, if a car need to have an electric motor or a classic motor, both model element can have an alternative variation related to the same variation point. It will ensure that only one of them is selected in the variant creation process.
Parameter variations are related to the value in a model element. For example, we can change the multiplicity max of an association, or the default value of an attribute.
-
Variation name: identifier for this specific variation
-
Variation point: identifier for this group
-
Applied on: name of the attribute to be changed, it depends on the constrained element
Both sub-types have their own specific attributes
Each alternative parameter variation represent a possible value for the concerned variation point.
-
Type: fill with the type of the following condition (See possible values here)
-
Condition: the expression here will trigger the variation if fulfilled, the format of the condition depends on the type selected before
-
Value: expression here will replace the selected attribute
This variation contains an expression that will be evaluated to change the value of selected attribute.
-
Type: fill with the type of the following expression (See possible values here, only “-expression” types are relevant here)
-
Expression: the formula to determine the new value of the attribute