## 2 Materials and Methods
### Metrics for the Evaluation of PROforma Models
#### 2.2.2 Density Metrics  
We have used density as a generic term to refer to any metric that relates the quantity of two elements of the graph. In this category fall the metrics density, coefficient of connectivity, average connector degree, and maximum connector degree. Moreover, the newly defined metrics related to plans and decisions also fall in this category: density of plans, percentage of single-node plans, average size of a plan, percentage of plans whose size is above average size, and decision density.  
* _Density_, \(\Delta\): it measures how far or close is the number of arcs to the maximal number of arcs. It is computed as the ratio of scheduling constraints to the maximum number of scheduling constraints. \[\Delta(G)=\frac{|A|}{|N|\cdot(|N|-1)}\]
* _Coefficient of connectivity_, \(CNC\): it is a measure of how dense is the graph regarding the number of connections. It is computed as the ratio of scheduling constraints to tasks. \[CNC(G)=\frac{|A|}{|N|}\]
* _Average connector degree_, \(\overline{d_{C}}\): it is a measure of the number of nodes a connector is in average connected to. It is computed as the average number of scheduling constraints of connector tasks, where \(d(c)\) is the number of scheduling constraintsof the connector task \(c\). The metric considers both the incoming and the outgoing scheduling constraints. \[\overline{d_{C}}(G)=\frac{1}{|CT|}\sum_{c\in CT}d(c)\]
* _Maximum connector degree_, \(\widehat{d_{C}}\): it is the maximum number of nodes a connector is connected to. It is computed as the maximum number of scheduling constraints of connector tasks. As in the previous metric, all scheduling constraints are included. \[\widehat{d_{C}}(G)=max\{d(c)/c\in CT\}\]
* _Density of plans_, \(\overline{p}\): it measures the level of clustering in a process model. It quantifies how many among the total number of tasks in the graph are plans, and it is computed as the ratio of the number of plans to the total number of tasks of the graph. \[\overline{p}(G)=\frac{S_{P}(G)}{S_{N}(G)}\]
* _Percentage of single-node plans_, \(p1\%\): it is a measure of how fragmented is the model respect to single-node plans. Single-node plans capture excessive fragmentation. This metric is computed as the ratio of plans that contain a single node to the total number of plans. \[p1\%=\frac{|\{p\in P/S_{N}(G_{p})=1\}|}{|P|}\] where \(G_{p}\) is the graph representing the content of plan \(p\). In this metric, \(P\) denotes the set of plans of the entire model (not a single graph).
* _Average size of a plan_, \(\overline{t}\): \(t\) is a measure of how dense is a plan. That is, how many tasks plans have on average. In order to compute it, we have consider the size of all the plans of the model (\(P\)). \[\overline{t}=\frac{1}{|P|}\sum_{i=1}^{|P|}|S_{N}(G_{i})|\]
* _Percentage of plans whose size is above average size_, \(p50\%\): it is measure of how homogeneous plans are in size. It is computed as the number of plans whose size is above average (see previous metric) to the total number of plans. \[p50\%=\frac{|\{p\in P/|S_{N}(G_{p})|>\overline{t}\}|}{|P|}\]
* _Decision density_, \(\delta_{D}\): it is a measure of how dense is the graph respect to this specific PROforma element. It is computed as the ratio of the number of nodes that correspond to decisions to the total number of tasks in the graph. The number of decisions, \(S_{D}\), is a new metric described in Section 2.2.4. \[\delta_{D}(G)=S_{D}(G)/S_{N}(G)\]  
Note that the metrics related to the density of the plans (average size, percentage of single-node plans, and percentage of plans of size above average) are not defined for a single plan (graph) but for the full model.