|
|
Diagram Complexity Metric |
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:

The details are shown in the Diagram Complexity tab:

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
· 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
· 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
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.
These diagrams are ‘hard-coded’ to consider Classes, Actors and CombinedFragments as elements and Events & Operations as ‘connections’
· 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
The known limitations in this release are detailed below:
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.