# DTAG: A Methodology for Aggregating Digital Twins Using the WOTDT Ontology
## 4 DTw Aggregation Methodology
### Digital Entity Aggregation
#### 4.3.1 Models Aggregation  
Data models represent all data conceptualisations of the DTw [8]. The goal of this activity is to aggregate the models from the DTws involved in the aggregation to obtain the DTwA models. This activity involves the DTwA user performing aggregation between the models of DTws and obtaining DTwA models. Furthermore, this activity also involves domain experts in providing support for the model aggregation process. These models are divided into non-semantic and semantic models; therefore, an activity must be performed for each of them.  
Non-Semantic Model Referenciation  
The goal of the non-semantic models referenciation activity is to reference all non-semantic models of the DTws involved in the aggregation within DTwA instantiation using WoTDT ontology. This activity involves domain experts and the DTwA user to select which of the non-semantic models from the table developed in Section 4.1 can be useful for the resultant DTwA. Once the non-semantic models are selected, these are referenced in the instantiation of the DTwA models using WoTDT ontology. Therefore, the output of this activity will be the instantiation of the references to the non-semantic models that are of interest for the resultant DTwA.  
Furthermore, in case new non-semantic models are needed for the DTwA, the DTwA user should reference them in DTwA model instantiation.  
In Figure 12, a non-semantic model reference from the Munich pilot DTw is referenced in the instantiation of the DTwA.  
In case the DTws involved in the aggregation process contain semantic models, a process different from the one described in Section \"Non-Semantic Models Referenciation\" shall be conducted. Semantic models can include the following: (i) ontologies, which contain all the conceptualisation of all the semantic data that are going to be used in the DTwA; (ii) mappings, which are based on the ontologies models and contain the rules that aim to materialise the DTw knowledge graph [40] using data resources as input; (iii) shapes models, such as SHACL shapes [41], which are going to be the shapes models used for this article, that are also based on the ontology, but their objective is to contain the validation rules (restrictions/constraints) to verify the knowledge graph materialised by the rules described in the mapping models.  
The goal of semantic model aggregation and referenciation activity is to provide semantic models that are going to be used by the DTwA to conceptualise its semantic data. This activity involves the DTwA user and the domain experts to first select the semantic models that can be useful for the DTwA, and then in the case that two models of the same type belonging to different DTws are found (types described as subclasses of the model class in the WoTDT ontology), perform the aggregation process between them in order to be able to have links between both models. After selecting and aggregating the semantic models, they should be referenced in DTwA instantiation using WoTDT ontology. This includes both models originating from the DTws involved in aggregation and those derived from the aggregation process.  
Figure 12: DTwA non-semantic model reference instantiation result.  
Sometimes, both models can be the same between different DTws involved in aggregation; therefore, if the DTwA user and domain experts select them to be used in the resulting DTwA, they should be referenced as in Section \"Non-Semantic Models Referenciation\".  
Consequently, the output of this activity is to acquire semantic models that will be used in the DTwA and referenced during the instantiation of the DTwA.  
The following sections describe the aggregation that can be performed for each of the semantic models described.