## 3 Approach
### Solution Overview  
As was introduced in the literature review, one of the main challenges for the DTs is data management and communication between systems. In this approach, a software that enables active communication between the shopfloor and the DT is used. The proposed system is presented in the diagram shown in Figure 1.  
The factory input data (e.g., ERP data, IoT system data, etc.) is sent to a middleware, connecting the shopfloor with the DT. This component sends bidirectional updates in data to both components and contains the database that stores information about the workers and the production line. Figure 2 presents the relationships between the entities.  
It shows that the production line is ruled by production activities. Those are shifts, known as the period during which production is operational, and breaks, known as the time lapses during which production is not operational and the workers can rest. The line is composed of production resources which can be workstations, places where production tasks are performed (i.e., machines or assembly tables), or operators, that possess skill levels for each skill.  
Figure 1: Shopfloor—human scheduling DT relations diagram.  
The DT is regularly updated with new input data and processes it to inform the user about the general state of the factory and suggest the operator's rotations based on their performance. To perform that, some assumptions are made regarding the process:  
* The rotation suggestion is obtained every time it is triggered. The way it is triggered may vary depending on the specific types of signals received from the production line.
* The production line or process is made up of several workstations and many operators can work on them. Each station has its process description composed of several tasks and each task is related to a skill defined in the skill matrix. The tasks within the workstations are ordered based on an importance index defined by an expert on the production line. Since each task corresponds to a skill, the skills share the same importance index as the tasks. No skill has the same level of importance within the same workstation.
* Operators cannot repeat workstations on the same day. That is, if an operator has already worked at one of the assigned workstations in a day, the rotation logic cannot make them repeat or let him/her continue working in the same workstation on that shift. This restriction is established to reduce the risk of suffering muscular disorders (WMSDs) [48,50] and balance the workloads.  
The architecture of the DT regarding this functionality is presented in Figure 3.  
Figure 3: Human scheduling digital twin block diagram.  
Figure 2: Knowledge-based representation of the described case.  
The data updates are received from the middleware (Figure 1) by the Data Collection Framework (DCF). The DCF is part of the backend and is the infrastructure that collects, manages, and shares the data with the other components of the digital twin. It has two main functions: send these updates to the user interface to inform about the status of the production line and convert the shopfloor data into skill measures. To perform this, this component retrieves the workers, product, and process information from the database. After that, the DCF sends the skill measurement to the human skills modeling engine to classify and structure the input data, in a way that evaluates if the performance of the worker for that concrete skill in that product, is up to the execution capacity of the operator. This process is carried out during the time that the line is producing. Once a rotation is triggered, this information is sent to the human scheduling engine to suggest a new rotation of the workers to the user, based on the data structure.  
Finally, the suggestion reaches the user through the dashboard, and he/she can accept it or modify it.