Constraints - Modelio-R-D/VariabilityDesigner GitHub Wiki

Overview

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

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

Alternative

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.

Alternative Structural

Optional

An optional variation is one where the model element will be removed depending on one condition, there is no restriction to how many variations under an Optional variation point can be selected.

Optional Structural

Parameter

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

Alternative

Each alternative parameter variation represent a possible value for the concerned variation point.

Alternative Parameter Structural

  • 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

Calculated

This variation contains an expression that will be evaluated to change the value of selected attribute.

Calculated Parameter Structural

Possibles values

Type:
  • single-feature-condition

  • and-feature-condition

  • or-feature-condition

  • pvscl-expression

  • ocl-expression

  • autosar-expression

⚠️ **GitHub.com Fallback** ⚠️