Jump to Menu

How to Analyze Model Dependency with Matrix?

Matrix Diagram is a table, which shows the existence of relationships among model elements of particular types. By reading Matrix Diagram, you can tell easily whether two model elements are related or not and what kind of relationship they have.

Compatible edition(s): Enterprise, Professional, Standard

  • June 24, 2015
  • Views: 56,223
  • PDF

Overview of this Tutorial

In this tutorial, you will learn how to use Matrix Diagram to find out the relationships between classes in a complicated project.

In order to complete this tutorial you must have Visual Paradigm installed. You also need to have basic knowledge in UML modeling with Visual Paradigm.

Creating Matrix Diagram

  1. Download Department-Store.vpp. You can also find this file at the bottom of this tutorial, under the Resources section.
  2. Open the downloaded project file in Visual Paradigm. You can find in the project the following Class Diagrams:
    class diagrams
    The diagrams contain many classes, with some of them being visualized in multiple diagrams, and with complex relationships in between. With a project like this, it's not easy to tell the relationships of any given class. In order to this, you can make use of a Matrix Diagram.
  3. To create a Matrix Diagram, select Modeling > Impact Analysis > Matrix from the application toolbar.
  4. In order to form a matrix you need to choose the things to list on the rows and columns. In this tutorial, we want to show the relationships among classes. Therefore we need to list classes on both rows and columns. In the list of available modes, select Class and click > to add it into Models on Row.
    add class to row
  5. Similarly, select Class and click > to add it into Models on Column.
    class added to column
  6. Select Relationship from the drop-down menu of By. This means that a matrix will be formed by analyzing the relationships among classes.
    by relationship
  7. Let's say we want to view specifically the associations among classes. Beside the drop-down menu of Relationship, select Association.
    select association
  8. Click OK to form a matrix. Here is the matrix formed:
    matrix diagram formed
  9. Let's say we want to check the associations of the class AdminStaff. Click on the AdminStaff row or column. You should see the cells highlighted accordingly, indicating the classes to which AdminStaff is connected.
    show association of class
  10. Let's say you want to check the generalization relationships among classes now. At the top left corner of the matrix, change Association to Generalization from the drop-down menu of Relationship.
    change to generalization
    The matrix is updated to present the generalization relationships among classes.
    matrix diagram updated
  11. You can open the diagram in which a chosen class is being visualized. Let's try. Right-click on RefundReport class and select Show View... from the popup menu.
    show view of class
  12. In the Show View window, select Inventory from the list of diagram and then click on Go to View at bottom right corner.
    open view
    This opens the Inventory diagram with RefundReport class selected.
    view opened

Exporting Matrix Diagram to Excel

You can also export a Matrix Diagram to an Excel file. To export a matrix:

  1. Click on the Export to Excel button at the top right of the matrix.
    export matrix to excel
  2. Enter the filename in the file chooser and confirm. The result should look like this:
    matrix diagram formed



Turn every software project into a successful one.

We use cookies to offer you a better experience. By visiting our website, you agree to the use of cookies as described in our Cookie Policy.

OK