Une image contenant texte, signe

Description générée automatiquement

Diagram Complexity Metric

 

Overview

The Diagram Complexity Metric gives a high-level assessment of how complex a diagram is based on:

·       The number of elements on the diagram

·       The number of connections on the diagram

 

All the properties mentioned below may be overridden using the RhapsodyPowerPackExtension properties mechanism.

In general, the number of allowed connections increases with the number of elements.

 

If enabled, the metric is reported as a simple section in the main page, under the diagram:

A screenshot of a diagram

AI-generated content may be incorrect.

The details are shown in the Diagram Complexity tab:

A screenshot of a computer

AI-generated content may be incorrect.

 

Structural Diagrams

Structural diagrams are any diagram based on Object Model Diagram, Structure Diagram or Use Case Diagram. The types of element and connection included in the metric calculation may be controlled using the following properties:

RhapsodyPowerPack.DiagramComplexityStructuralElementTypes

RhapsodyPowerPack.DiagramComplexityStructuralConnectionTypes

These have the default values:

Elements: Class,Object,Package,UseCase,Requirement,Actor

Connections: Dependency,Flow,Link,Generalization,AssociationEnd

 

Complexity Rules for Structural Diagrams (Except Use Case Diagrams)

·       No Complexity (Red)

o   No elements and no connections

·       Low Complexity (Green)

o   Connection Count <= 2 * Element Count AND Element Count < 7

·       Medium Complexity (Orange)

o   Connection Count <= 4 * Element Count AND Element Count < 15

·       High Complexity (Red)

o   Default if above rules are not met

 

Complexity Rules for Use Case Diagrams

·       No Complexity (Red)

o   No elements and no connections

·       Low Complexity (Green)

o   Connection Count <= 1 * Element Count AND Element Count < 7

·       Medium Complexity (Orange)

o   Connection Count <= 2 * Element Count AND Element Count < 15

·       High Complexity (Red)

o   Default if above rules are not met

State Machines and Activity Diagrams

These diagrams are ‘hard-coded’ to consider States and Transitions (which also covers actions, control flows and object flows in activities)

These diagrams use the same rules as structural diagrams.

Sequence Diagrams

These diagrams are ‘hard-coded’ to consider Classes, Actors and CombinedFragments as elements and Events & Operations as ‘connections’

Complexity Rules for Sequence Diagrams

·       No Complexity (Red)

o   No elements and no connections

·       Low Complexity (Green)

o   Connection Count <= 3 * Element Count AND Element Count < 4

·       Medium Complexity (Orange)

o   Connection Count <= 4 * Element Count AND Element Count < 8

·       High Complexity (Red)

o   Default if above rules are not met

 

Limitations

The known limitations in this release are detailed below:

 

Object Nodes

Object nodes on activities have a represents field, an Instance Specification field and an In State field. If these are used Rhapsody reports all of them as being ‘on this diagram’ so your one element may become 4 elements in the metric.