## 3 Methodology
### Cps Service Model and Architecture of the Mess  
At the heart of the developed system, there is the concept of CPS, which is in charge to perform production activities. As mentioned, the CPS conceptualization utilized in this manuscript is based on NES definition and comprises the following four basic abilities: sensing, acting, computing, and networking. A CPS can be abstracted to almost anything: a robot, a human worker with network connected device, a camera, a PLC controlled manufacturing unit, a pool of tools, etc. To the MESS, a CPS is like a black box that makes the physical layer seamless, providing a set of production related capabilities and variables. The production capabilities of the CPS can be reached by the production process manager (from now on MESS Core) directly or through a digital counterpart--digital twin--with standardized interface. From the point of view of an external component to the MESS (i.e., user interface, scheduler, and so forth, out of scope in this paper), only these twinned CPSs are visible and discoverable, while physical devices are kept hidden for security and competency reasons. A schematic representation of the system is illustrated in Figure 2.  
In order to realize the idea of generally embeddable I4.0-compliant CPSs providing manufacturing services, a \"minimalistic\" CPS service model has been conceptualized. A CPS is basically expected to embody a set of core service concepts whose selection is necessary to guarantee the following: the core _digital representation_ of a CPS; the _service interface_ to the MESS collaborative environment; and the _compliance_ of the CPS with NES definition and I4.0 components in RAMI 4.0 [16]. \begin{table}
\begin{tabular}{p{113.8 pt} p{227.6 pt}} \hline \hline
**Name** & **Description** \\ \hline Resource & Any manufacturing or logistic machine/device or human operator in the production system that has the ability to perform production related activity. \\ \hline Capability & Abstract description of the functionality that is provided by the Resources towards the system (e.g., gripping, drilling, identification of elements). \\ \hline Task & A binding between specific Resources and a selected Capability to perform the required production related activity. \\ \hline Process Plan & A sequence of selected Tasks necessary to perform specific complex production related activities, based on the technological precedence constraints (e.g., assembling, transporting, quality checking). \\ \hline Workpiece & Every material, part, sub-assembly, assembly and product which is in the production system. (out of scope of this paper) \\ \hline Operation & A binding between a specific Task and the Workpiece, which is the object of the specified Task. (out of scope of this paper) \\ \hline Routing/Schedule & The sequence of selected Operations necessary to produce one or more products in the manufacturing system. The Schedule is the time-based dimension of the planned Routing. (out of scope of this paper) \\ \hline \hline \end{tabular}
\end{table} 
Table 3: List of manufacturing concepts utilized. All CPSs publish their capability in terms of (micro or macro) _services_, which can be invoked by means of parameterized _functions_. Invoking a function _call_ triggers the instantiation of execution related tasks, which are necessary to track its execution advancement on the basis of even-triggered _reports_. CPSs also have operating parameters called _variables_, which can point to any exposed signal of the specific equipment and whose values can be utilized in the decision-making process of a routing. Functions are organized and linked together in a process plan via precedence edges, which represent the necessary conditions for the specific function to execute (details and an illustrative example in Section 5).