Define feature model
Overview
Next Design allows you to define the structure of your feature model in the form of a tree diagram and define constraints between features.
The steps for defining a feature model are described below in the following order:
- Start product line development
- define the structure of the feature model
- Add constraints between features
- Check feature model integrity
Start product line development
To apply product line development to your project, follow these steps:
- Select the root project in the Model Navigator.
- From the project screen, click the [Start] link for the product line.
- This will allow you to use features that support product line development.
- After you start product line development and save the project, you cannot stop product line development.
Define the structure of a feature model
Switch to Feature Editor
Feature models are created and edited in the feature editor. To switch to the Feature Editor, do the following:
- Click [Feature Model] in the product line of the project screen to switch to the feature editor.
You can also switch to the feature editor by following the steps below.
- Switch the navigator to the Product line navigator.
- Select [Feature Model] directly under the project.
Edit Feature Model
To add features using the Feature Editor, follow the steps below, similar to model editing in the tree diagram.
- Select a feature type from the toolbox and drag and drop it onto the feature model.
Feature type | Description |
---|---|
Mandatory Feature | Feature that must be selected if parent feature is selected |
Optional Feature | Feature that can be optionally selected if the parent feature is selected |
Alternative Feature | A feature that should choose either one of its sibling alternate features when its parent feature is selected |
Or Feature | If the parent feature is selected, at least one of its sibling disjunction features should be selected |
Feature Group | A node in a tree structure representing a concept that groups multiple features |
You can also add features using the following procedure.
- Select the parent feature on the feature editor.
- Click Product Line > Feature > Create from the ribbon and select the type of feature to add.
- Sub-features below 16 layers cannot be added in the [Feature Tree] view of the Feature Editor. Also, even if there are subfeatures below the 16th level, they will not be displayed. If you want to display/add sub-features below the 16th level, use the [Feature Model] view of the feature editor or use the product line navigator.
Change Feature Type
To change the type of existing features:
- Select the features of interest.
- Change the feature type by doing one of the following:
- Right-click the selected features and select the type from the context menu Convert View.
- Click [Product Line] > [Feature] > [Convert View] from the ribbon and select the feature type.
Set initial selection state of features
To change the initial state of a feature to the selected state for a product during configuration, change the property as follows:
- Right-click the feature and click Property on the context menu.
- Check the [Property] > [Basic information] > [Set to initial selection state] check box displayed in the right inspector.
- Required features are initially selected, regardless of whether the [Initially selected] checkbox is checked.
Details in feature tree format
To write a detailed description for each feature, do the following:
- Switch the view of the feature editor to [Feature Tree].
- Edit the Description column of the tree grid.
Add constraints between features
To add constraints between features, similar to adding relationships between models in ER diagrams, follow these steps:
- Associate features with each other by drag and drop operation.
- Click a constraint type from the choices that pop up.
constraint type | description |
---|---|
Exclusion | Represents a relationship in which features with exclusion constraints cannot be selected at the same time |
Equals | Represents a relationship in which features with interdependence constraints must always be selected at the same time |
Requires | Represents a relationship that must always select the dependent feature when the dependent feature is selected |
You can also add constraints between features with the following procedure.
- Select the origin and destination features on the feature editor.
- Click Product Line > Feature > Add Feature Relation from the ribbon and select the constraint type.
Check the integrity of the feature model
Check Consistency
To check the integrity of the feature model structure and constraints, proceed as follows:
- Click [Feature Model] in the product line of the project screen to switch to the feature editor.
- Click [View] > [Pane] > [Error List] on the ribbon to display the error list.
- Click Product Line > Feature > Check Consistency on the ribbon.
- If there is an error, it will be displayed in the error list and also displayed on the feature editor.
- For more information on validation, see Reference > Product Line Development Validation.
jump to error
Follow the steps below to jump from the error displayed in the error list to the corresponding location and correct it.
- Double-click the error displayed in the error list to jump to the error location on the feature editor.
- Refer to the error message and correct the feature type or constraints between features.
Cancel error display
To cancel the error display, follow the steps below.
- Do one of the following:
- Click the Clear Error Contents button on the Error List toolbar.
- From the ribbon [Product Line] > [Feature] > [Consistency Check] Click the [▼] at the bottom and click [Clear Error].