Variability Modeling > Making decisions for a product model > How the status of variants and variation points can be set > How the status of a variant can be set - variant selector
  
How the status of a variant can be set - variant selector
A Variant has a Status that can be set to Included, Excluded or Undecided. When a Product Model is created, it is the Status of a Variant that determines whether that Variant is removed or not.
You can set the Status of Variants through the Variant Selector or the Decision Set Editor. This topic covers using the Variant Selector.
The most direct way of setting the Status of a Variant is by setting the Decision of that Variant. Assuming that the Variant does not have a parameter and the Status of a Variant is not affected by any other Variants or Variation Points:
When you set the Decision of a Variant to Undecided, Modeler sets the Status of the Variant to Undecided.
When you set the Decision of a Variant to Exclude, Modeler sets Status of the Variant to Excluded.
When you set the Decision of a Variant to Include, Modeler sets Status of the Variant to Included.
When a Variant has a parameter, as indicated by a control appearing next to the Variant in the rightmost pane, setting or changing the value of the Variant sets the Status of the Variant to Included
Setting the Status of a Variant can also change the Status of other Variants and Variation Points in the Decision Set, that is, Variants and Variation Points that are linked to the Variant through Requires relationships, Excludes relationships and Alternative Choices:
Modeler sets the Status of a Variant to Included when it is required (through a Requires link) by an Included Variant or Variation Point.
Modeler sets the Status of a Variant to Excluded:
When it is excluded (through an Excludes link) by an Included Variant or Variation Point.
When it requires (through a Requires link) an Excluded Variant or Variation Point.
When part of an Alternative Choice group:
Modeler sets the Status of a Variant to Excluded if the maximum multiplicity of the Alternative Choice has been reached through other included Variants in the group.
Modeler sets the Status of a Variant to Included if the Variant needs to be included to reach the minimum multiplicity of the Alternative Choice.
Modeler sets the Status of a Variant to Excluded when it is linked (through an optional or mandatory Variability Dependency link) to an Excluded Variation Point.
Modeler sets the Status of a Variant to Included when it is linked (through a mandatory Variability Dependency link) to an Included Variation Point.
This topic has the following worked examples that use the Variant Selector to show how the Status of a Variant can be set:
Setting the Status of a Variant through a Decision.
Setting the Status of a Variant that has a parameter.
Setting the Status of a Variant through a Requires relationship.
Setting the Status of a Variant through an Excludes relationship.
Setting the Status of a Variant through the multiplicity of an Alternative Choice.
Setting the Status of a Variant through its Variation Point.
Note that sometimes the combination of Decisions, Requires relationships, Excludes relationships and Alternative Choice multiplicities may result in the Status of a Variant needing to be set to both Included and Excluded. When this happens, the Status of the Variant whose Decision was last changed is set to Inconsistent. For information about resolving inconsistencies, see Resolving inconsistencies in a decision set - variant selector.
How the variant selector shows the decisions and status of variants
In the rightmost pane of the Variant Selector, the Undecided, Included and Excluded buttons appear to the left of each Variant name.
Undecided button
Included button
Excluded button
To set the Decision of a Variant: click the Undecided, Included or Excluded button for that Variant.
The colored button indicates the Status of a Variant. Modeler sets the Status of a Variant based on its Decision and linked items.
In the following example, the Status of Variant1 is Undecided, the Status of Variant2 is Included, and the Status of Variant3 is Excluded.
The Decision that has been made for a Variant is shown through the green background of a button.
In the following example, the Decision for Variant1 is Undecided, the Decision for Variant2 is Included, and the Decision for Variant3 is Excluded.
Setting the status of a variant through a decision
The Status of a Variant can be set through its Decision.
In this example we have opened the Variant Selector and can see that no Decision has been made for Variant1 (green background of the Undecided button) and the Status of Variant1 is Undecided (Undecided button is colored).
We set the Decision of Variant1 to Include by clicking the Included button, Modeler sets the Status of Variant1 to Included (Included button is now colored).
We now set the Decision of Variant1 to Exclude by clicking the Excluded button, Modeler sets the Status of Variant1 to Excluded.
Setting the status of a variant that has a parameter
The Status of a Variant can be set through its parameter:
When the Decision of a Variant is Undecided and it has a parameter that has a default value:
Changing the value of the parameter sets the Status to Include.
Setting the Decision to Include sets the Status to Include.
When the Decision of a Variant is Undecided and it has a parameter that does not have a default value:
Setting a value for the parameter sets the Status to Include.
Setting the Decision to Include does not set the Status to Include, because the Variant requires a value to be set for its parameter.
Note that when a Variant has a parameter, a control to set that parameter appears to the right of the Variant name, unless the Variant is excluded. If no value is shown for the parameter, the parameter does not have a default value.
In this example Variation Point1 is linked to three Variants.
We create a Decision Set and open the Variant Selector.
The user interface indicates whether a Variant has a parameter:
Variant1 has a parameter that has a default value of 50, as indicated by 50 appearing in the parameter box.
Variant2 has a parameter with no default value, as indicated by an empty parameter box.
Variant3 does not have a parameter, as indicated by the there not being a parameter box.
Note that parameter boxes are not shown for excluded Variants.
Initially the Decision for each Variant is Undecided (as indicated by the green background of the buttons) and the Status of each Variant is Undecided (as indicated by the button being blue).
We set the Decision of each Variant to Include. The Status of Variant1 is set to Included because it has a default value. The Status of Variant2 remains as Undecided because it does not have a value set for its parameter.
We set the value of the Variant2 parameter to 55 and the Variant Selector sets the Status of Variant2 to Included. The Reset Parameter Value button becomes available because a value has been set for the parameter.
For Variant1 we change the default value of 50 to 100. The Reset Parameter Value button becomes available because the value has been changed from its default value.
We now click the two Reset Parameter Value button buttons and can see that the Variant1 value returns to the default value of 50 and the Variant2 value returns to a blank box.
We return to the starting point of this example by setting the Decision of each Variant to Undecided.
We set the parameter value of Variant1 to 200 without changing the Decision from Undecided. The value of the Variant1 parameter has been changed from its default value, so the Variant Selector sets the Status of Variant1 to Included.
We set the parameter value of Variant2 to 300 without changing the Decision from Undecided. A value for the Variant2 parameter has been set, so the Variant Selector sets the Status of Variant2 to Included.
Setting the status of a variant through a requires relationship
The Status of a Variant can be set to Included or Excluded when it is linked to other Variants through a Requires relationship.
A Requires relationship models that the inclusion of a Variant (or Variation Point) requires the inclusion of another Variant (or Variation Point).
In this example we can see that Variant1 requires Variant2.
We open the Variant Selector and can see no that no Decision has been made for Variant1 or Variant2 (green background of the Undecided buttons) and for both Variants the Status is Undecided (Undecided buttons are colored).
We now set the Decision of Variant1 to Include and can see that Modeler sets the Status of Variant1 to Included. Variant1 requires Variant2, so Modeler sets the Status of Variant2 to Included.
We want to know what item is implicitly including Variant2, so we hover the mouse pointer over the Variant2 name and a ToolTip tells us that Variant2 is included by Variant1.
We now set the Decision of Variant1 to Exclude and can see that this no longer affects the status of Variant2. Variant2 is affected by Variant1 only when the Status of Variant1 is Included.
However, if we set the Decision of Variant1 to undecided and the Decision of Variant2 to Excluded, we can see that Modeler sets the Status of Variant1 to Excluded. Modeler sets the Status of Variant1 to Excluded because if it was included it would require Variant2 to be included as well and Variant2 is set to Excluded.
Note that if a Requires relationship is bidirectional, the rules of the Requires relationship apply in both directions: if the Status of one item is set to Included, Modeler sets the Status of the linked item to Included; if the Status of one item is set to Excluded, Modeler sets the Status of the linked item to Excluded
Setting the status of a variant through an excludes relationship
The Status of a Variant can be set to Excluded when it is linked to other Variants through Excludes relationships.
An Excludes relationship models that the inclusion of a Variant (or Variation Point) requires the exclusion of another Variant (or Variation Point).
In this example we can see that Variant1 excludes Variant2. This relationship is bi-directional so Variant2 also excludes Variant1.
We open the Variant Selector and can see that no Decision has been made for Variant1 or Variant2 and for both Variants the Status is Undecided.
We now set the Decision of Variant1 to Include and can see that Modeler sets the Status of Variant1 to Included. Variant1 excludes Variant2, so Modeler also sets the Status of Variant2 to Excluded.
Notice that the name of Variant2 appears dimmed, which indicates that the Status has been set to Excluded because of another Variant or Variation Point. We hover the mouse pointer over the Variant2 name and a ToolTip tells us that Variant2 is excluded by Variant1.
We now set the Decision of Variant1 to Exclude and can see that this no longer has affects the status of Variant2. Variant2 is affected by Variant1 only when the Status of Variant1 is Included.
Setting the status of a variant through the multiplicity of an alternative choice
The Status of a Variant can be set to Excluded or Included through the multiplicity of an Alternative Choice.
The multiplicity of an Alternative Choice specifies that the minimum and maximum number of Variants that must be included through that Alternative Choice.
In this example we can see the multiplicity of the Alternative Choice is 1..1, which means the minimum number of Variants that must be included is one, and the maximum number of Variants that must be included is also one.
We open the Variant Selector and can see no that no Decision has been made for Variant1, Variant2 or Variant3, and in each case the Status is Undecided.
We set the Decision of Variant1 to Include and can see that Modeler sets the Status of Variant1 to Included. The Alternative Choice has a maximum multiplicity of one included Variant, so Modeler sets the Status of Variant2 and Variant3 to Excluded.
We hover the mouse pointer over the Variant2 and a ToolTip tells us that Variant2 is excluded because of the Alternative Choice.
We set the Decision of Variant1 to Exclude and can see that Modeler sets the Status of Variant1 to Excluded. The Status of Variant2 and Variant3 are set to Undecided, because either Variant2 or Variant3 can be included.
We now set the Decision of Variant2 to Exclude and can see that Modeler sets the Status of Variant2 to Excluded. Modeler also sets the Status of Variant3 to Included because Variant3 must now be included to achieve the minimum multiplicity of 1.
We hover the mouse pointer over the Variant3 and a ToolTip tells us that Variant3 is included because of the Alternative Choice.
Setting the status of a variant through its variation point
The Status of a Variant is set to Excluded when it is linked (through an optional or mandatory Variability Dependency link) to a Variation Point whose Status is set to Excluded.
The Status of a Variant is set to Included when it is linked (through a mandatory Variability Dependency link) to a Variation Point whose Status is set to Included.
In this example we can see that Variant1 is connected to Variation Point1 using an optional Variability Dependency and Variant2 is connected to Variation Point1 using a mandatory Variability Dependency.
Note that in this example Variation Point2, Variant3 and Variant4 are used only to set the Status of Variation Point1 to either Excluded or Included.
We open the Variant Selector and can see that the Status of Variation Point1, Variant1 and Variant2 are Undecided.
We set the Status of Variation Point1 to Excluded by setting the Decision of Variant3 to Include:
Modeler sets the Status of Variant3 to Included.
Variant3 excludes Variation Point1, so Modeler sets the Status of Variation Point1 to Excluded.
Variant1 and Variant2 are linked to Variation Point1 using Variability Dependencies, so Modeler sets the Status of Variant1 and Variant2 to Excluded.
We can hover the mouse pointer over the Variant1 and Variant2 names to confirm that they are excluded by Variation Point1.
We now set the Status of Variation Point1 to Included by setting the Decision of Variant3 to Undecided and the Decision of Variant4 to Include:
Modeler sets the Status of Variant4 to Included.
Variant4 requires Variation Point1, so Modeler sets the Status of Variation Point1 to Included.
Variant1 is linked to Variation Point1 using an optional Variability Dependency, so Modeler does not change its Status.
Variant2 is linked to Variation Point1 using a mandatory Variability Dependency, so Modeler sets its Status to Included.
We can hover the mouse pointer over the Variant2 name to confirm that it is included by Variation Point1.