A matrix is a table, which shows the existence of relationships among model elements of particular types. By reading a matrix, you can tell easily whether two model elements are related or not and what kind of relationship they have.
- Select Modeling > Impact Analysis > Matrix from the toolbar.
- Configure the matrix.
Field Description Diagram Name The name of diagram which is also the name of matrix. Scope The source of model elements to compare in matrix, in Project (all model elements), Diagram (only model elements in specific diagrams which are selected by users) or under Model/Package. Template Template offers a default setup to Models on Column, Models on Row and By. It is available according to the project content. For example, template “Use Case <-> Requirement” appears for selection when a project have use case and requirement. Available Models All available models in your selected scope are listed here. You can select a model to add it in the target Models on Row and/or Models on Column. Models on Column The type of model element to list at the column side of matrix. In order to list multiple types of model element, select it/them on Available Models and click button to insert it/them in here. Models on Row The type of model element to list at the row side of matrix. In order to list multiple types of model element, select it/them on Available Models and click button to insert it/them in here. By The way how matrix will match against rows and columns. Sub Diagram – The column/row model element is placed in a sub diagram of the matching model element.
Child – The column/row model element is a child of the matching model element.
Relationship – The column/row model element is related with the matching model element. You can specify the kind of relationship between model element, as well as the stereotype, if any, assigned to the relationship. Besides, if you choose to match by Relationship, you will see the button Skip in Relationship…. This button allows you to ignore specific kind(s) of model elements when considering if two elements are related or not. It’s particularly useful when two elements are conceptually connected with each other but with an intermediate element in between. For instance, you may have two components connected with each other, but with an interface in between as the provided and required interface of the components. Without skipping the interface (class) in between, the two components will not be considered to be “related”, but by skipping class, which is the real element type of an interface, classes will be ignored and thus, the two components will be considered as “related”.
Reference – The column/row model element is referencing the matching model element.
As Classifier – The column/row model element takes the matching model element as classifier.
Transitor – The column/row model element is transited from/to the matching model element.
Dependent – The column/row model element has properties that depend on the matching model element. “Depend” means any of the following: (1) With any kind of relationship such as association, dependency, etc. (2) As a contained element (3) As a link in description content (4) As a selected value for any property.
Using Term – The column/row model element is a term (element) and is indirectly used by the matching model element, either or both as part of its name or in its description.
Structuring View The two ways of grouping and listing elements: Flat – Elements are all listed at single level
Directory – Elements are listed in a hierarchy, following their placement in model structure. Note that if a parent row does not match with any column, or if a parent column does not match with any row, its children rows or columns will not appear in the matrix (unless you’ve configured the matrix to show all/non-matched columns and rows.
- Click OK button to form the matrix.
Filtering rows and columns by stereotype
Instead of listing all elements with same type in row or column, you can fitler them further by selecting only elements with stereotype(s) assigned by listed. For example, you can form a matrix to visualize the relationships between <<control>> and <<entity>> classes. To fitler, move your mosue pointer over an assigned element type in the configuration screen. Click on the <<>> button and select the stereotypes. Click Apply to confirm your selection.
The interface of Matrix
A matrix is a table with rows and columns, both represent sets of model elements of specific types. A cell in table is an intersection of a row and a column which reflects the relationship of the row and column. If the cell is filled either by a tick or by a kind of relationship (when a matrix was set to match things by Relationship), this means that the model elements of the row and column are related. The type of relationship can be checked by referring to the drop down menu at the top left of matrix.
No. | Name | Description |
---|---|---|
1 | Sort | Adjust the way elements are ordered in rows and columns – by name, stereotype or ID |
2 | Show only rows/columns with matches | Matrix lists only rows and columns with matches by default. Uncheck it when you want to show entries without matches as well. |
3 | Filter row | Type the full name of a model element or part of it that you are looking for to narrow down the searching field in rows when too much data is displayed. |
4 | Filter column | Type the full name of a model element or part of it that you are looking for to narrow down the searching field in columns when too much data is displayed. |
5 | Refresh | You can update the content of matrix by clicking this button manually, for reflecting the changes you have made in models. |
6 | Export to Excel | Click this button to export the opening matrix to Excel. |
7 | Configure | Click this button to configure the content to display in matrix. |
8 | By | It shows how matrix will match against rows and columns. |
9 | Relationship | Select the kind of relationship to be considered. |
10 | Relationship Stereotype | Select the stereotype assignedto relationships. |
11 | Rows | The model elements have been chosen will be displayed in rows. |
12 | Move up and move down | Rows and columns are ordered alphabetically by default. They help to re-order rows and columns in moving vertically. |
13 | Swap rows and columns | It helps to change the presentation between rows and columns, but not switch the actual relationships between model elements being represented by them. |
14 | Move left and move right | Rows and columns are ordered alphabetically by default. They help to re-order rows and columns in moving horizontally. |
15 | Columns | The model elements have been chosen will be displayed in columns. |
Exporting Excel
You can export Excel file from matrix, and analyze relationships between model elements in worksheet in Excel. To export Excel:
- Click Export to Excel above the matrix, near the Configure button.
- In the Export Excel dialog box, specify the output destination and click Save.