Variability Modeling > Making decisions for a product model > Resolving inconsistencies > Resolving inconsistencies in a decision set - decision set editor
Resolving inconsistencies in a decision set - decision set editor
While you are making decisions for a Decision Set, the decisions you make can result in there being inconsistencies in that Decision Set. When a Decision Set has inconsistencies, you cannot create a Product Model until all those inconsistencies have been resolved.
Inconsistencies can occur for the following reasons:
The Status of a Variant or Variation Point is being set to both Included and Excluded.
A Variation Point is mandatory and its Status is set to Excluded.
The multiplicity of an Alternative Choice constraint is being violated.
The value of a Variant parameter is being set to more than one value through Requires Dependencies.
The validation script of a Variant or Variation Point is setting the Status of a Variant or Variation Point to inconsistent.
* 
Inconsistencies can also occur when there are script errors in validation script and derivation script:
A Variant or Variation Point's validation script has a script error.
A Variant's derivation script has a script error.
Reporting of inconsistencies
An inconsistency will often involve two or more items. However, when an inconsistency occurs the Decision Set Editor will report the inconsistency against only the Variation Point or Variant that was being processed when the inconsistency occurred.
* 
If an inconsistency is reported against a Variation Point or Variant and you close the Decision Set Editor, after restarting the Decision Set Editor that inconsistency can be reported against a different Variation Point or Variant that was involved in the inconsistency.
You may see the following reasons for inconsistencies in the Reason column:
Item is both included and excluded.
This inconsistency tells you that Modeler is attempting to set the Status of the Variation Point or Variant to both Included and Excluded. There is not a conflict between the Decision and Status of the item.
To resolve this sort of inconsistency you must determine which items are causing the conflict and change the Decision of one or more of the items that is causing the conflict.
The Included By column lists items that set the Status of a Variation Point or Variant to Included, and the Excluded By column lists items that set the Status of a Variation Point or Variant to Excluded.
Item is both explicitly included and implicitly excluded, or, Item is both explicitly excluded and implicitly included.
This inconsistency tells you that there is a conflict between the Decision and Status of a Variation Point or Variant.
This inconsistency can occur when you set the Decision of a Variant to Include when its Status is Exclude, or set the Decision to Exclude when its Status is Include. If this happens:
You can immediately resolve the problem, by returning the Decision to its previous value.
If you want the Decision you set to remain, you must identify which items need to have their Decisions changed in order to make the Status of the Variant compatible with the Decision you have set.
This inconsistency can also occur when a Decision has made Modeler change the Status of a different item, which in turn makes that item's Decision conflict with its new Status. When this happens, you must identify which items need to have their Decisions changed in order to make the Decision and Status compatible.
* 
If the Included By or Excluded By columns reference an Alternative Choice, the item is being implicitly included or excluded because of the multiplicity of that Alternative Choice.
Item is a root, mandatory variation point and is excluded.
This inconsistency tells you that a mandatory root Variation Point has its Status set to Excluded by a mandatory Variant, which is not allowed.
To resolve this problem the Variation Point's mandatory Variant must have its Status set to either Included or Undecided.
Alternative Choice multiplicity constraint violated.
This inconsistency tells you that an Alternative Choice has had at the Status of at least one of its Variants set to Included, but the minimum multiplicity of the Alternative Choice has not been reached.
To resolve this inconsistency you must set the Decisions of some of the Alternative Choice's other Variants to Included. The minimum multiplicity of the Alternative Choice specifies the minimum number of Variants that must be included.
Variant has multiple propagated values.
This inconsistency tells you that a Variant has two or more incoming Requires Dependencies that are attempting to set the parameter value of the Variant to different values.
To resolve this inconsistency you must set Decisions so that not more than one of the Variant's incoming Requires Dependencies is setting the parameter value of the Variant.
* 
A Requires Dependency sets the parameter value of the target Variant only when the Status of its source item is Included.
A conflict does not occur when a Variant parameter has a value and a single Requires Dependency sets a different value, because the value that is set by the Requires Dependency takes precedence.
<message specified in validation script>
Validation Script for a Variant or Variation Point can set Status of that Variant or Variation Point to Inconsistent. When this happens, the text in the Reason column will be the text that is specified in the Validation Script.
To resolve this inconsistency the Decisions and parameter values must be set as required to satisfy the Validation Script.
Script error on line...
This inconsistency tells you that the Derivation Script or Validation Script for the item has errors in it. The script error may be caused by the script not have the required input data.
To resolve this inconsistency:
If caused by a script problem, the Validation Script needs to be corrected.
If caused by the script requiring appropriate data, set the Decisions and parameter values as required by the Validation Script.
<consistency check error>.
This inconsistency tells you that a Variation Point, Variant or Alternative Choice has a consistency check failure. These consistency check errors are the errors that are displayed in the Output pane when you right-click an item or the diagram background, point to Report, and then click Consistency.
To resolve this problem, make the required changes to the variability model so that the item passes the consistency checks.
Finding inconsistencies in the Decision Set Editor
When a Decision Set has inconsistencies, the Status Bar of the Decision Set Editor shows the number of inconsistencies in the Decision Set.
To find an inconsistency in the Decision Set: click the Prev Inconsistency or Next Inconsistency button.
If the inconsistent Variation Point or Variant is not shown in the Decision Set Editor, click the Report Inconsistent Items button. Modeler sends a report of inconsistent items to the Output pane.
Opening a diagram that shows the variation points and variants that are associated with an inconsistency
When an inconsistency is reported for a Variation Point or Variant it is often useful to see that Variation Point or Variant on the diagram that models how it is related to other Variation Points and Variants.
To list the diagrams that a Variation Point or Variant appears on: from the Decision Set Editor, right-click the Variation Point or Variant, point to Report, and then click Usage. The diagrams on which the Variation Point or Variant appear are listed in the Results pane, from which you can open a diagram by double-clicking it.
Worked example
This example demonstrates how an inconsistency can occur, how to determine what caused the inconsistency and how to resolve the inconsistency.
In the Decision Set Editor we set the Decision of Variant1 to Include. Modeler sets the Status of Variant1 to Included. Variant1 excludes Variant2, so Modeler sets the Status of Variant2 to Excluded.
We now set the Decision of Variant2 to Include. Modeler attempts to set the Status of Variant2 to Included, but it is already set to Excluded. At this point an inconsistency occurs because Modeler is attempting to set the Status of Variant2 to both Excluded and Included, which cannot be done.
Working out why an inconsistency has occurred
When an inconsistency is reported in the Decision Set Editor, the first place to look is the Reason column. In our example, the Reason column states that the inconsistency is because the 'item is both explicitly included and implicitly excluded':
When an item is explicitly included or excluded, it means that Modeler has set the Status because of the Decision for that item being set.
When an item is implicitly included or excluded, it means that Modeler has set the Status because of a Requires relationship, Excludes relationship, or Alternative Choice.
Through the Excluded By column we can see that Variant2 is excluded by Variant1, and we can see that Variant1 is included because we chose to include it (Decision is set to Include). We can deduce that there is probably an Excludes relationship between Variant1 and Variant2, and this is confirmed by seeing the Variant and its relationships on the diagram.
Through the reason column, we can see that Variant2 is explicitly included, and we can see that Variant2 is included because we chose to include it.
Resolving an inconsistency
In our example we have worked out that the inconsistency is a result of setting both the Variant1 Decision to Include and the Variant2 Decision to Include.
To resolve our inconsistency we must at least set the Decision of one of the Variants to Exclude or Undecided. We decide to make our Decision Set valid by setting the Decision of Variant1 to Exclude.