Package Complexity is the ratio of connector types to element types:
Number of connector types is the number of unique combinations of source element type+stereotype, connector type+stereotype and target element type+stereotype
Number of element types is the number of unique element type+stereotypes.
Providing Useful Insights
The measure of package complexity is deliberately simple, but it can provide useful insights into the internals of a package.
In this example, there are 5 element types, and 4 connector types, so the complexity metric is 0.8
Adding more connector types to the same set of element types makes the meta-model more complex.
Here, with 5 and 6 respectively, the complexity metric is 1.2
Finally, if everything can link to everything, we get this:
With 5 element types and 9 connector types, the metric is 1.8.
And in this example, each pair of element types only have one possible connector type – they might have several. And there are no reflexive connectors (linking one element type to itself) which could make the model even more complicated.
If you are designing a meta-model from a blank sheet, then it’s always possible to invent a reason why any element type might need to link to any other.
That’s why we suggest starting with some part of your model which you already have, and which you are fairly happy with. Then add or remove some connectors to get to your ideal model.
It’s much better to have a simple model which everyone can understand, than a complex one which is super-flexible, but hard to use consistently.