# Conflict Resolution in Mechatronic Collaborative Design Using Category Theory
## 4 Conflict Resolution Approach Based on Category Theory
### Main Concepts
* Parameters Categorical Graph PCG represents the unified graphs based on category theory, P1 CG, P2 CG,..., PmCG, which contains crucial parameters extracted from the EMs and will help to capture conflicts between these models. A 5-tuple PmCG = <O, id, A\({}_{r}\), L\({}_{o}\), L\({}_{Ar>}\) is an attributed, directed graph. In the context of CT, this graph represents a category where O = (O\({}_{1}\),.., O\({}_{j}\)) is a set of objects (i.e., vertices). Each object has its own identity _id_ (i.e., the looped arrow). These objects are the different versions of parameters used by the involved experts as well as their values. Objects are related to each other through a set of arrows or morphisms A\({}_{r}\) (i.e., edges). All the objects and arrows have labels (i.e., attributes) L\({}_{o}\) and L\({}_{Ar}\) respectively. A sample PmCG, created following the previous definition of comma category, is illustrated in Figure 5. The identity morphisms as well as the composition arrows are not represented in this category in order to avoid cluttering it with a large number of morphisms. * Updated Parameters Categorical Graph UPmCG this category will contain the updated values obtained after each iteration of the conflict resolution process. Similar to the PmCG described beforehand, the UPmCG is considered as a category and inherits all the proprieties of the first PmCG. Through these updated categories, traceability can be ensured which will be useful in reuse perspectives. * Final Parameter Categorical Graph FPmCG this category will contain the final results obtained after applying the appropriate RAs to the detected conflicts. Similarly, this categorical graph has the same form than the PmCG and UPmCG described previously. * Dependency Categorical Graph (DCG) illustrates the existing dependencies between the parameters presented in the PmCG based on category theory. A 5-tuple DCG = <O\({}_{d}\), id\({}_{d}\), A\({}_{rd}\), L\({}_{od}\), L\({}_{Ard}\)> is an attributed, directed graph and represents a category where O = O\({}_{1}\),..., O\({}_{m}\) is a set of objects (i.e., vertices) where m refers to the number of parameters used in the collaborative process. Each object has its own identity id\({}_{d}\). The identity morphism represents the internal evolution of each object. It is assumed to be present for the DCG. However, it is seldom shown in order to avoid cluttering the category with an identity morphism for each object. In this graph, the objects are the different parameters used by the involved experts. Objects (i.e., parameters) are related to each other through a set of arrows or morphisms A\({}_{rd}\) (i.e., edges). These morphisms highlight the dependency between the different parameters. All the objects and arrows have labels (or attributes) L\({}_{od}\) and L\({}_{Ard}\) respectively. The morphism labels represent the dependency coefficient of each relation between two objects. These coefficients will be used in conflict resolution process. A sample DCG is illustrated in Figure 4.
* Consistency rule (CR): A set of consistency rules, CR\({}_{1}\), CR\({}_{2}\),..., CR\({}_{p}\), between elements of EMs. The EMs will be considered inconsistent if CRs are not respected. * Graph Pattern (GP), GP\({}_{1}\), GP\({}_{2}\),..., GP\({}_{q}\), a set of categories aiming at describing the existence of a conflict. Querying the different PmCGs using these patterns can help in conflict detection. This graph is defined as a category containing a set of objects and morphisms. The objects of this category are either a string representing the parameter names and is unmodified through the different iterations or a variable for parameter values definition. The morphisms in the GP illustrate the value attribution for each parameter. The form of the GP can vary dependently to the PmCG to be queried. An example of GP is illustrated in Figure 3. The GP\({}_{1}\) describes the existence of a conflict between two expert models where the value m\({}_{1}\) is not equal or less than m\({}_{2}\).