# Towards a Flexible Smart Factory with a Dynamic Resource Orchestration
## 1 Introduction
Currently, Product Management oversees checking that these orders are analysed and adapted by several groups of dedicated technologists and specialists. Their task is to plan, facilitate and reconfigure all the manufacturing tasks and resources [11]. These tasks are later scheduled and executed in an automatised production if all the required machines are available. If the shop floor includes human workers, they will simply follow and execute instructions provided to them. Robots and other machines are of course stopped, physically reconfigured and reprogrammed, and then finally ready for a new set of instructions. All these challenges are just the tip of the iceberg since there is also the coordination of the complete supply chain management, quality assurance, and production management. Ideally, the orchestration of all the above-mentioned processes is to be handled simultaneously, as a part of a synchronised computer system capable of coordination of preparing, scheduling, executing, and delivering a customised product. Although the concept of production orchestration is already known, numerous questions require further investigation and answering before the wider acceptance and application of an orchestration solution. In order to guide this research work, our focus is on two research questions (RQ):  
* RQ1: Is it possible to make formal models of production processes and shop floor resources aimed to enable and support dynamic resource orchestration? * RQ2: Is it possible to create a system that would enable the automation of model-driven dynamic orchestration of shop floor resources? The contribution of this research is reflected in the fact that the existing orchestration concepts have been reused and upgraded to provide answers to the above-stated research questions. Based on a model-driven approach and Domain-Specific Modelling Languages (DSMLs), the first aim of our research is to establish a foundation for formal modelling of any production process or any type of resource, thus addressing the RQ1. In addition to the production processes modelling already discussed in our previous papers [12; 13], the foundations for formal modelling of resources are also presented here. The vision of Smart Factories based on our model-driven approach requires the existence of the Orchestrator as its core component. Therefore, the second aim of our research is to design a system capable of performing a model-driven dynamic orchestration, thus addressing the RQ2. Such an Orchestrator enables an SF managed and operated on a formal and abstract level by the experts within the factory. At the same time, the end-users perceive it as a self-contained black-box that delivers the desired product. In this paper, we present and discuss the architecture and application of this component. An additional contribution of this research is reflected in the design of a software architecture of the Orchestrator that industrial manufacturers and practitioners could implement when switching from traditional to advanced manufacturing systems in the emerging 14.0 era matching the current industrial setting. To the best of our knowledge, there is no solution published that covers every aspect of an SF addressed in this paper. As assembly processes have the tradition of pioneering the adoption of new technologies, it is not a surprise that Assembly 4.0 (A4.0) systems are expected to pioneer the integration of 14.0 technologies as well [14]. To discover the limits or to confirm the applicability of the Orchestrator, an industrial assembly use-case is used as a proof-of-concept. For the purposes of this research, an isolated and experimental assembly line has been set up following the proposed architecture. In this paper, we present the use-case and discuss the results. The remainder of this paper is organised as follows: Section 2 briefly introduces the methodology applied in the research. In Section 3, the Orchestrator Architecture and its key elements are elaborated. In Section 4, an industrial case-study is presented as a proof-of-concept.