Next Article in Journal
Cavity Formation during Asymmetric Water Entry of Rigid Bodies
Next Article in Special Issue
Automotive Body Shop Design Problems Using Meta-Models Considering Product-Mix Change and Reconfiguration Strategy
Previous Article in Journal
Surface Modification of Glass Textile for the Reinforcement of a Cement-Based Composite: A Review
Previous Article in Special Issue
Adaptive Automation Assembly Systems in the Industry 4.0 Era: A Reference Framework and Full–Scale Prototype
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

A Dynamic Context-Aware Workflow Management Scheme for Cyber-Physical Systems Based on Multi-Agent System Architecture

Department of Computer Science and Information Engineering, Chaoyang University of Technology, Taichung 41349, Taiwan
Submission received: 3 February 2021 / Revised: 19 February 2021 / Accepted: 21 February 2021 / Published: 25 February 2021
(This article belongs to the Special Issue Assembly System Design in the Industry 4.0)

Abstract

:

Featured Application

This study provides a model driven approach in multi-agent systems to generate contextual information to guide workers/resources based on the Cyber World models in Cyber-Physical Systems.

Abstract

Although Cyber-Physical Systems (CPS) provides a paradigm to accommodate frequent changes in manufacturing sector, modeling and managing operations of CPS are challenging issues due to the complex interactions between entities in the system. Development of an effective context-aware workflow management system to guide the entities in the system is a critical factor to attain the potential benefits of CPS. In this paper, we will address the issue on the design of context-aware workflow management systems for CPS in IoT-enabled manufacturing environment. A CPS consists two parts, the Physical World and the Cyber World. To achieve the goal to design a context-aware information system for CPS, the Cyber World models of the entities in the system are constructed based on discrete timed Petri nets (DTPN) and a multi-agent system architecture in which each entity in the system is modeled as an agent to capture the interactions of entities in CPS. To develop context-aware workflow management systems for CPS, a Configuration/Scheduling Feasibility Problem and a Context Generation Problem in CPS are formulated. A condition for configuration/scheduling feasibility based on transformation of the Cyber World Models is established to develop an algorithm to generate contextual information to guide the operation of CPS. The proposed method is illustrated by examples. A series of experiments have been conducted to demonstrate the practicality of the proposed method in terms of computation time and response time. The results indicate that the computation time and total response time increase polynomially with respect to problem size parameters and show that the proposed method is effective in solving real problems.

1. Introduction

Pressure due to frequent changes in demand from customers, global competition, environmental protection and global warming has posed new challenges in manufacturing sector. These challenges include how to achieve manufacturing agility to meet changing demands, how to develop flexible organization structure, and how to adopt emerging paradigms to face global competition by taking advantage of advanced information technology and manufacturing technology. Adoption of information technology in conjunction with advanced manufacturing technology and flexible organizational structure to achieve manufacturing agility and meet changing demands is a key issue for businesses to face global competition and attain sustainability. In the past years, several technologies and paradigms have been proposed to address the above issue. For example, Intelligent Manufacturing Systems (IMS) [1], Reconfigurable Manufacturing Systems (RMS) [2], Industry 4.0 [3,4], Cyber-Physical Systems (CPS), [5,6], and Internet of Things (IoT) [7]. Industry 4.0 aims to achieve smart factories characterized by adaptability, efficiency, reliability, safety, usability and supporting dynamic supply chains [3,4] based on the increased integration of Information and Communication Technology (ICT) into production systems [8]. CPS combines mechatronics, ICT and computational decision-making components to control physical processes and systems to provide intelligence, responsiveness and adaptation [9]. With more and more things, sensors and devices getting connected, the world enters the era of Internet of Things (IoT) [10,11]. The IoT refers to the network of physical objects embedded with electronics, software, sensors and network connectivity which enables a rich set of interactions with the physical world characterized by machine-to-machine communications. It can be defined as a system of autonomous smart objects with sensing, information processing, and networking capabilities [12]. The IoT enables creation of innovative applications that may revolutionize the industry. Although the IoT provides the infrastructure for CPS to accommodate frequent changes in manufacturing sector, modeling and managing operations of CPS for manufacturing sector are challenging issues due to the complex interaction between entities in the system. Development of an effective context-aware information management system to guide the entities in the system is a critical factor to attain the potential benefits of CPS. This calls for the development of an effective decision support system to dynamically configure the system and generate the context-aware information for all relevant entities to guide their operations in CPS.
Context-aware computing is a paradigm that refers to the ability for an application to provide users with the information as needed and respond to users based on the context of use [13]. In manufacturing systems, an entity may be a machine, a worker or a resource. A context-aware system provides relevant information and/or services to the entities to improve service quality and operational efficiency based on “context“, which includes the information of identity, time, and activity [14]. Several survey papers on context-aware computing and the IoT in different application areas are available in [15,16]. The paper [17] surveys the design of implementation method for the components in context-aware ecosystems. There are several works on the development of context-aware information system for CPS [18]. For example, the paper [19] focuses on security solutions for context-aware CPS. The issue of programming context-aware CPS can be found in [20]. The work reported in [21] is dedicated to context-aware process guidance in CPS base on the use of augmented reality technique. The study of [22] concentrates on achieving context awareness for flexible manufacturing systems in CPS. Just like ergonomics [23], which focuses interactions between human and a system to optimize human well-being and performance, context-aware computing aims to enhance operational performance through timely provision of information. Different issues and studies in the literature may provide context-aware information relevant to manufacturing systems, e.g., inventory holding costs measurement [24] and scheduling [25]. However, generation of context-aware information for complex assembly processes such as the ones studied in [26,27,28] is a nontrivial research task. In addition, the issue to design context-aware workflow management systems for CPS with assembly processes is not addressed in the literature. To bridge the gap between the existing studies and the need for developing context-aware systems in CPS, we will address the design issue of dynamic context-aware workflow management systems for CPS. The goals of this papers are to develop a solution methodology to generate contextual information to guide workflows for a class of RMS with assembly operations modelled based on CPS and study the practicality of the proposed method in terms of computation time and response time through experiments.
The remainder of this paper is organized as follows. In Section 2, we briefly review the literature. In Section 3, we present a system architecture for RMS based on CPS paradigm. Section 4, we define the configuration/scheduling and context generation problems in CPS and briefly introduce the multi-level contract net protocol. We introduce the Cyber World Models of RMS in discrete timed Petri nets and a configuration/scheduling feasibility problem formulation in Section 5. A condition for configuration/scheduling feasibility based on transformation of Cyber World Models will be presented in Section 6. A context generation algorithm will be proposed in Section 7. Numerical examples will be presented in Section 8. We will discuss the results and conclude this paper and introduce future research directions in Section 9 and Section 10, respectively.

2. Literature Review

To develop an effective approach to achieving the goals of this study, we review relevant literature to select the methods and tools to develop a solution method. Due to the lack of a framework for design and validation of adaptive automation assembly systems in the Industry 4.0 era, Bortolini et al. propose a general framework to guide researchers, practitioners and companies to migrate from traditional manufacturing systems to advanced ones [4]. A self-adaptive smart assembly system (SASAS) has also been presented in [28] to address the design, engineering and testing of an adaptive assembly prototype. As the issue of generating context-aware information is not addressed in [4], the method proposed in this study complements the framework of [4]. The ability to cope with changing demand and technologies is more and more important in manufacturing sectors. RMS provides a paradigm to meet this requirements. In RMS, reconfigurability is a desirable property to adapt and allocate resources to meet order requirements. It has been studied in [29] for cellular manufacturing systems and [30] for CPS. CPS can be described as smart systems in which computational components in cyber space and physical components in physical space are seamlessly integrated with capabilities of communication and control to closely interact with each other to sense, monitor and control the changing state of the real world [9]. CPS involves a high degree of complexity with networked communication integrating computational and physical components to enable a new generation of “smart systems”. The concept of RMS and CPS also adopted in this study to develop a solution methodology for Industry 4.0.
There are many approaches to modelling, analysis and optimization of manufacturing systems, including optimization models [31,32], simulation models [33], Petri nets [34], and agent based models [35]. Each approach has strength and weakness. Although the optimization approach can optimize performance, it can only be applied to processes with fixed structure under specific assumptions. Furthermore, existing studies on optimization of RMS rely on mathematical programming cannot link to process modelling tools such as Petri nets. On the other hand, simulation approach is able to model a wide variety of production processes. However, it cannot be used to optimize the performance. The discrete event system approach such as Petri nets can be used to capture the properties of manufacturing systems. However, it is hard to optimize the performance based on discrete event system approach. Agent based approach allows modelling of flexibility, proactivity and negotiation capability of entities in the manufacturing systems. It is also hard to optimize the performance based on agent based approach. A pragmatic approach to address generation of contextual information in distributed architecture while optimizing the performance is to combine the advantages of existing approaches. Based on the above discussions, we propose an approach that adopts multi-agent systems as the underlying architecture, Petri net models as the internal models for agents and a transformation method that transforms the Petri net models into a graph based model suitable for applying the optimization methods.
A CPS for IoT-enabled reconfigurable manufacturing system consists two parts, the Physical World and the Cyber World. To achieve the goal to design context-aware information system for CPS, a multi-agent system model and a protocol based on the contract net [36] are adopted to capture the interactions and collaboration of entities in CPS. Each entity in the system is modeled as an agent. To develop the context-aware information system for CPS, the Cyber World models of the entities in the system are constructed. To construct the Cyber World models of the entities in the system, an easy to use and powerful modeling tool must be employed. Due to the superior capabilities in modeling and verification of workflows and processes in industrial systems, timed Petri nets (PNs) [37], which can be represented by the Petri Net Markup Language (PNML) [38] widely supported by software tools, are used in this study to construct the Cyber World models of the entities in the system. However, the Cyber World models of the entities cannot work alone without a proper platform to facilitate the interactions and collaboration of the entities in the system. Therefore, a FIPA (http://www.fipa.org/, accessed on 25 January 2021) compliant multi-agent system infrastructure is used and a multi-level contract net protocol is applied to achieve task announcement, bidding, negotiation, and contract awarding. Based on the aforementioned Cyber World models, multi-agent system infrastructure and the multi-level contract net protocol, a context generation problem is formulated to generate the contextual information for the entities in the system to guide their operations. Although the Petri net is a powerful tool to model production activities in manufacturing systems, it is not an appropriate tool to solve the optimization problem to effectively generate the contextual information. A method is proposed to solve the context generation problem based on multi-agent systems (MAS) and the Cyber World models to develop an algorithm to generate contextual information to guide the operations of CPS. The proposed method will be illustrated by examples. In addition, to assess effectiveness of the proposed method, an important issue is to study how response time changes with respect to parameters of the problem. There are three parameters used in the solution algorithm, including time horizon, number of operations in a process and the demand. We perform a series of experiments to study the influence of these parameters on computation time of the solution method and the total response time. The results confirm applicability of the proposed method.
This study provides a model driven approach in multi-agent systems to generate contextual information to guide workers/resources based on the Cyber World models in Cyber-Physical Systems. One contribution of the approach is in the development of algorithms required for the generation of contextual information based on the Cyber World models specified by DTPN models. End users without the background of optimization theory only need to specify the DTPN models in DTPNs to apply the tool developed based on our approach. Another contribution of this study is to verify the computational efficiency of the proposed approach by a series of experiments. This paper is different from [39,40,41] which focus on scheduling and scalability issues in manufacturing system without considering context-awareness issue. It is also different from our previous works on context-aware workflow management reported in [42] which does not consider time factor. This paper is also different from [43] in that the interval based time model in [43] can only be used for temporal reasoning. This paper attempts to bridge the gap by introducing a proper time model to generate context-aware timing information for complex workflows in assembly systems.

3. A System Architecture for Reconfigurable Manufacturing System Based on CPS Paradigm

A reconfigurable manufacturing system described by a Cyber-Physical System in IoT-enabled environment consists of two parts, the Physical World and the Cyber World. Figure 1 shows the Physical World of RMS. It consists of the entities of workers, machines and parts in the system. The Cyber World of RMS is described by the models that represent resources such as workers, machines, parts, processes and data relevant to the decision making and operations of RMS. Figure 2 shows a Cyber World associated with Figure 1. In Figure 2, the entities of RMS in the Cyber World are modeled by agents in multi-agent system architecture. The models and data in the Cyber World provide an abstraction view of relevant entities in terms of the operational characteristics, dynamics, and architecture to achieve the production goals of RMS. Development of an appropriate Cyber World models for the entities in RMS is very important to effectively manage the Physical World of the CPS of RMS.
The Cyber World of RMS in Figure 2 consists of the several types of agents, including task agent, resource agents, process agents and context generation agents. All these agents interact with each other by applying some negotiation protocol provided by the MAS platform. Operations of RMS are driven by a goal, usually specified by an order. A task agent aims to achieve the goal of production according to the order received. A process agent denotes the production process, usually specified by a process (workflow) model. A process (workflow) model is used to describe the operations to be performed on a task and the precedence constraints of these operations. A resource agent represents a resource such as a machine or a robot in RMS. A resource model is used to describe the types of activities (operations) supported by a resource agent. The role of a context generation agent is to generate context-aware information to guide resources and workers in RMS.
To generate context-aware information for resources/workers in RMS, a context generation agent must interact with relevant task agent, process agents, and resource agents. The internal architecture of a context generation agent include a model transformer module, an optimizer/analyzer module and a context generator. A context generation agent interacts with the relevant task agent, resource agents and process agents to obtain the goal, resource models, and process (workflow) models. The model transformer transforms the goal, resource models and process (workflow) models of agents into transformed models. Based on the transformed models obtained by the model transformer, optimization as well as analysis of solutions will be performed by the optimizer/analyzer to solve a configuration/scheduling feasibility problem. If the optimizer/analyzer can find a feasible solution, the solution will then be used as the input for the context generator. The context generator will create contextual information such as the operation lists for manufacturing resources to guide the operations of CPS. Although the architecture in Figure 2 provides a framework to design RMS based on the CPS paradigm, there still lack a study on how to systematically implement the model transformer, the optimizer/analyzer and the context generator for RMS. In this paper, we will focus on the development of models and a solution methodology needed to bridge the gap between theory and application in realizing the CPS paradigm for RMS.
In the system architecture presented in Figure 2, there are several problems to be solved to implement a context-aware information system for RMS based on the CPS paradigm. These include collaborative interaction problem, model construction problem, model transformation problem, configuration/scheduling feasibility problem (CSFP) and context generation problem. In this section, these problems will be stated briefly. Each problem and relevant models or solution methods will be detailed in the rest of this paper.
The collaborative interaction problem aims to specify how agents in the system respond to requests issued by other agents. In this paper, a multi-level contract net protocol will be adopted. The details of the multi-level contract net protocol will be described in Section 4. The model construction problem is the problem to construct models for resource agents and process agents, including Cyber World process models and Cyber World resource models. In this paper, a discrete timed Petri nets (DTPN) [41] will be adopted to construct these models. The details for the construction of Cyber World process models and Cyber World model resource models will be described in Section 5. The model transformation problem is the problem to devise a method to transform the original Cyber World process models and Cyber World resource models into a model that can facilitate optimization/analysis at later stage. The model transformation problem will rely on development of theory. Section 6 will be devoted to the development of a proper transformation method for the model transformation problem. The configuration/scheduling feasibility problem focuses on optimization/feasibility aspects of solutions/plans based on the transformed model. The problem will also be described in Section 4, Section 5 and Section 6. The context generation problem concentrates on generation of contextual information based on the solutions/plans found by the configuration/scheduling feasibility problem solver. The method to solve this problem will be detailed in Section 7.

4. Configuration/Scheduling Feasibility Problem and Context Generation Problem in CPS

In this section, we will state the configuration/scheduling feasibility problem and context generation problem in CPS. As the CPS consists of distributed resources, including machines, robots and workers interacting with each other autonomously based on the workflows to be performed, multi-agent systems (MAS) architecture is adopted to capture these characteristics and formulate these problems. To support interactions and negotiation of agents, it is assumed that a multi-level contract net protocol (CNP) based on [36] is used in the CPS. The multi-level CNP has specified the details about task announcement, bidding mechanism, contract awarding and negotiation. Therefore, we adopt the multi-level CNP in this study without re-inventing the wheel.
The proposed multi-agent system architecture consists of a set of resource agents and a set of process agents which work collaboratively to perform the operations specified by the task agent according to the orders received. To state the configuration/scheduling feasibility problem and the context generation problem in CPS, the notations in Table 1 are defined.
We will defer the details of the notations above to later section to avoid distracting readers’ attention away from the problems to be addressed in this study. For example, construction of the Cyber World models Ω n k for all operations k of process agent n W A and the Cyber World models for all activities performed by resource agent a R A will be introduced in later section. Let Ω = { Ω n k } denote the set of Cyber World models for all process agents in W A . Let A = { A n a k } denote the set of Cyber World models for all activities performed by resource agents in W A . Based on the notations introduced above, suppose the Cyber World models Ω = { Ω n k } for all operations of all process agents in W A and the Cyber World models A = { A n a k } for all activities performed by all resource agents in R A are given. The configuration/scheduling feasibility problem and the context generation problem are stated as follows, respectively:
Configuration/Scheduling Feasibility Problem (CSFP):
Given orders with product demand quantity Q and due date θ , a set of resource agents R A , a set of process agents W A and the Cyber World models Ω = { Ω n k } and A = { A n a k } , determine whether there exist a set of process agents, W A * , a set of resource agents, R A * and associated schedule S a for each agent a in R A * to meet the product demand by the due date θ , where W A * W A and R A * R A .
The context generation problem to be studied in this paper is to generate context-ware information to guide resources/workers.
Context Generation Problem (CGP):
Generate contextual information for each agent a in R A * based on the associated schedule S a .
As no single agent can solve the above mentioned problem alone, collaboration among agents is necessary to solve the problems. The problems stated above rely on the development of solution algorithms based on interactions of agents in CPS in conjunction with application of optimization methods by individual agents to solve the problems. We will first present the interactions among agents in the problem solving processes and defer the details of the development of solution algorithms for the above problems until later sections.
Each workflow consists of one or more operations and there exists precedence constraints and among operations in each workflow. Moreover, there are precedence constraints among workflows as shown in Figure 3a. To perform an operation, a resource is needed. Therefore, there exists dependency among operations and resources as shown in Figure 3b.
To describe the problem solving processes, the following messages are defined:
Request for Proposal (RFP): RFP is a request sent by an agent at the downstream to its upstream agent. An RFP message is usually issued by either a task agent or a process agent. An RFP message can also be issued by a process agent to resource agents.
Propose (PRO): PRO is a response to an RFP message to indicate the proposal created by the agent sending the PRO message.
Award Contracts (AC): AC is a response to PRO. It indicates that the PRO message will be awarded.
Establish Contracts (EC): EC is response to AC. It indicates that the AC message will be accepted.
Figure 4 shows the way a process agent handles an RFP message sent by a process agent at the downstream or a task agent. A process agent will wait for the arrival of an RFP message, which may be sent by either a task agent or a process agent at the downstream. It will first check whether the type of product demand is supported. If the type of product demand is supported, the procedure is terminated. Otherwise, the process agent proceeds to create an RFP message, sends it to the resource agents and waits for the PRO messages from the resource agents. Once the PRO messages are received, the process agent will determine whether a feasible solution exists by solving Problem 3 which is defined in Section 5. If there does not exist a feasible solution, the procedure will be terminated. Otherwise, the process agent proceeds to create an RFP message, sends it to upstream process agents and waits for the PRO messages from the upstream process agents. The RFP will carry a due date message obtained based on the feasible solution found by solving Problem 3 defined later in this paper. If PRO messages are received from the upstream process agents, the process agent will create a PRO message and send it to the process agent at the downstream or a task agent. If the task agent receives a PRO message from the upstream process agent and the PRO message indicates that the due date can be met, there exist a solution that can meet the deadline of the demand.
Dependency among workflows leads to complex interactions between the task agent and process agents in the solution finding processes. For the process agents in Figure 3a, interactions between the task agent and process agents is shown in Figure 5a. During the course of interactions, optimization algorithms will be invoked by the process agents. These optimization algorithms will be developed in later section based on the Cyber World Models and transformation of the Cyber World Models into graph models.
Similar to dependency among workflows, dependency among workflows and resources also results in complex interactions between process agents and resource agents in the problem solving processes. As W 1 depends on resource agents R 1 and R 2 , interactions among W 1 , R 1 and R 2 are shown in Figure 5b. As W 2 depends on resource agent R 3 , interactions among W 2 and R 3 are shown in Figure 5c. As W 3 depends on resource agents R 4 and R 5 , interactions among W 3 , R 4 and R 5 are shown in Figure 5d.
Note that the development of methods/solution algorithms for the Configuration/Scheduling Feasibility Problem (CSFP) and the Context Generation Problem (CGP) for CPS requires the use of Cyber World models to facilitate the decision making processes. Construction of relevant Cyber World models for CPS will be introduced next.

5. Configuration/Scheduling Feasibility Problem Formulation Based on Cyber World Models of RMS in CPS

Construction of the Cyber World models Ω n k for all operations k of all process agent n W A and the Cyber World models for all activities performed by all resource agent a R A will be introduced in this section. The Cyber World models are used to achieve the following objectives: (1) Specify the activities or operations to be performed by different types of agents, (2) formulate the configuration/scheduling feasibility problem and (3) generate and represent the contextual information provided to guide resources/workers in CPS. This section details the Cyber World models for the entities in CPS. The configuration/scheduling problem formulation and generation of contextual information for resources/workers will be presented later.
As there are different types of entities in CPS, we will propose the Cyber World models for each type of entities, including the Cyber World models for process agents and the Cyber World models for resource agents. To facilitate modeling and analysis, these Cyber World models are represented based on a class of Petri nets. As timing is an important characteristic that needs to be captured in the Cyber World models, we adopt discrete timed Petri nets (DTPN) [41] to construct these models. A DTPN G is described by a set of places, P , a set of transitions, T , a set of flow relation, F ( P × T ) ( T × P ) , an initial state or initial marking, m 0 , and firing time for each transition specified by μ : T Z , where Z is the set of nonnegative integers. A DTPN G can be described concisely by a five-tuple G = ( P , T , F , m 0 , μ ) in which the initial marking m 0 : P Z | P | . A marking m Z | P | of G represents a state of the system indicating the number of tokens in each place. For transition t in T , the set of input places of transition t is represented by t and the set of output places of t is represented by t . A transition t is enabled a marking m if m ( P ) F ( p , t ) p t . A transition t enabled under a marking m can be fired. Firing a transition t once will remove one token from each place in t and adds one token to each place in t .
A bottom-up approach is adopted here to construct the Cyber World models. In constructing a Cyber World model with a DTPN, a place is used to represent a state in the workflow and a transition is used to represent an event that can bring the workflow from one state to another. To endow the workflow model with the capability to capture assembly operations, the workflow model proposed in this paper extends the one defined in [41].
Definition 1.
The Cyber World model for the k -th operation of process agent w n , n W A is a DTPN Ω n k = ( P n k , T n k , F n k , m n 0 k , μ n k ) with T n k = { t n s k , t n e k } and P n k = P n k i { p n k b } { p n k o } , where t n s k is the starting transition, t n e k is the ending transition, P n k i = { p n k i } is the set of input places, p n k b is the busy state place and p n k o is the output place of the k -th operation and μ n k is a function specifying the firing time of each transition in T n k .
Figure 6a–e show the DTPN models, Ω 1 1 , Ω 1 2 , Ω 2 1 , Ω 3 1 and Ω 3 2 for the operations o 1 , o 2 , o 3 , o 4 and o 5 in Figure 3a. In Figure 6a–e, firing time is omitted for readability.
The Cyber World model is constructed by combining the Cyber World models of the operations involved. We define the following operator to combine two DTPNs.
Definition 2.
Given two DTPNs, G 1 = ( P 1 , T 1 , F 1 , m 10 , μ 1 ) and G 2 = ( P 2 , T 2 , F 2 , m 20 , μ 2 ), G 1 G 2 = ( P , T , F , W , m 0 , μ ), where P = P 1 P 2 , T = T 1 T 2 , F ( p , t ) = { F 1 ( p , t ) i f p P 1 a n d t T 1 F 2 ( p , t ) i f p P 2 a n d t T 2 , F ( t , p ) = { F 1 ( t , p ) i f p P 1 a n d t T 1 F 2 ( t , p ) i f p P 2 a n d t T 2 , and m 0 ( p ) = { m 10 ( p ) i f p P 1 m 20 ( p ) i f p P 2 .
Let K n denote the number of operations involved in the workflow of process agent w n . The Cyber World model for process agent w n is defined as follows:
Definition 3.
The Cyber World model for process agent w n , where n W A is an acyclic DTPN Ω n = k { 1 , 2 , , K n } Ω n k .
Without loss of generality, it is assumed that only the input transition in the Cyber World model of the first operation may have multiple input places, i.e., | P n k i | 1 and | P n k i | = 1 for k { 2 , K n } . If this condition is not satisfied, we can decompose the workflow of a process agent into several subworkflows with multiple input places allowed only for the first operation in each subworkflow and assign each subworkflow to a process agent to make the above condition satisfied. Figure 7a–c show the DTPN models, Ω 1 , Ω 2 and Ω 3 for process agents w 1 , w 2 and w 3 , where Ω 1 = Ω 1 1 Ω 1 2 , Ω 2 = Ω 2 1 and Ω 3 = Ω 3 1 Ω 3 2 .
Each operation of process agent w n must be performed by some resource agent. To describe the situation that k -th operation of process agent w n is performed by resource agent a , we define a DTPN A n a k = ( P n a k , T n a k , F n a k , m n a 0 k , μ n a k ) . In performing an operation, resource agent a will start and end with the idle state place r a . Therefore, A n a k = ( P n a k , T n a k , F n a k , m n a 0 k , μ n a k ) is a cycle or circuit [37].
Definition 4.
The Cyber World model of the k -th operation of process agent w n performed by resource agent a , where a M A , is represented by DTPN A n a k = ( P n a k , T n a k , F n a k , m n a 0 k , μ n a k ) . The initial marking m n a 0 k ( r a ) is the number of resources allocated, where r a is the idle state place. There is no common transition between A n a k and A n a k for k k .
Figure 8a–e show the DTPN models, A 11 1 , A 12 2 , A 23 1 , A 34 1 and A 35 2 for process agents w 1 , w 2 , and w 3 .
To model collaboration of resource agents and process agents, a collaboration model Ψ n is obtained by combining the Cyber World model Ω n for process agent w n and the Cyber World models of the activity performed by relevant resource agents. Let R n k denote the set of resource agents involved in performing the k -th operation in Ω n . The collaboration model Ψ n is defined as follows:
Definition 5.
The Cyber World model for the collaboration of process agent w n with relevant resource agents is a DTPN Ψ n = ( P n , T n , F n , m n 0 , μ n ) = k { 1 , 2 , , K n } ( Ω n k a R n k A n a k ) , where n W A . The firing time μ n ( t ) for each transition t T n is μ n a k ( t ) .
Suppose R 1 1 = { 1 } , R 1 2 = { 2 } , R 2 1 = { 3 } , R 3 1 = { 4 } , R 3 2 = { 5 } ,
Ψ 1 = ( Ω 1 1 A 11 1 ) ( Ω 1 2 A 12 2 ) ,
Ψ 2 = Ω 2 1 A 23 1 ,
Ψ 3 = ( Ω 3 1 A 34 1 ) ( Ω 3 2 A 35 2 ) ,
Figure 9a–c show the DTPN models of, Ψ 1 , Ψ 2 and Ψ 3 , respectively.
Due to the limited number of resources, m n a 0 k , for performing the k -th operation of process agent w n , the firing time μ n r ( t n s k ) for transition t n s k , the firing time μ n r ( t n e k ) for transition t n e k and the number of tokens that may enter the place p n k b must satisfy capacity constraints and flow balance constraints. However, these constraints cannot be described in DTPN conveniently. As the above constraints must be satisfied, in the following section we will show that the evolution of a DTPN Ψ n = ( P n , T n , F n , m n 0 , μ n ) can be represented by a graph with constraints to facilitate the optimization processes and analysis of the system dynamics.
In this section, we will state the Configuration/Scheduling Feasibility Problem based on the DTPN models. Let W A * denote a set of process agents. The collaboration of the set of process agents in W A * and relevant resource agents R A *   =   n W A * k { 1 , 2 , , K n } R n k can be modeled by DTPN Ψ = n W A * Ψ n   =   ( P , T , F , m 0 , μ ) . For the operations in three process agents and dependency among workflows and resources in Figure 3, based on the interactions between the task agent, process agents and resource agents in Figure 5a–d, collaboration of process agent W 1 , resource agent R 1 , resource agent R 2 , process agent W 2 , resource agent R 3 , process agent W 3 , resource agent R 4 and resource agent R 5 can be represented by Ψ 1 Ψ 2 Ψ 3 as shown in Figure 10 (all resources are assumed to stay in the corresponding idle state places initially and all parts are in the corresponding input places of process agent W 1 and process agent W 2 ).
Note that the CSFP aims to determine whether there exist a set of a set of process agents, W A * , a set of resource agents, R A * and associated workflow schedule S a for each agent in R A * to perform operations in W A * such that demand quantity Q can be met by the deadline θ . Let f be the last process agent that produces Q final products for the task agent. A formal statement of this problem based on the DTPN model is as follows:
Centralized Configuration/Scheduling Feasibility Problem Formulation based on DTPN Model:
Given the requested product quantity Q and deadline θ , find a set W A * of process agents and a set R A * of resource agents such that there exists a firing sequence S of the DTPN Ψ that can bring the system to a marking m ( p f k o ) = Q at t with t θ , where S consists of the firing sequence S a for each agent a in R A * to perform operations specified by relevant process agent in W A * .
Although collaboration of agents can be modelled by Figure 10, the above centralized model and problem formulation cannot be used in distributed agent based manufacturing environment. Therefore, the Configuration/Scheduling Feasibility Problem (CSFP) will be formulated based on distributed computing architecture to take advantage of divide-and-conquer strategy.
We will propose a method to find a set W A * of process agents, a set R A * of resource agents and the firing sequence S a for each agent a in R A * in distributed multi-agent system architecture by applying the multi-level contract net protocol based on transformation of Cyber World models. The multi-level contract net protocol will be initiated by a task agent that represents an order. The task agent will send an RFP message to potential process agents that can produce the requested type of products. A potential process agent will send an RFP message to potential resource agents to acquire the required resources. Based on the potential process agent and the resource agents acquired, a DTPN model, Ψ n , will be constructed. It is necessary to determine whether there exists a firing sequence S n for Ψ n such that the final transition t n f of Ψ n is the last firing sequence in S n and can be fired by the deadline. If there exists a firing sequence S n for Ψ n to fire t n f by the deadline, the process agent will send an RFP message to potential process agents at its upstream. The processes repeats until a solution is found.
To support the above solution processes, we formulate a subproblem for each process agent. Each process agent will attempt to solve a subproblem based on collaboration with other resource agents and process agents according to the dependency on other processes and resources. We will study the condition for the existence of a solution based on solutions of subproblems. A problem formulation for the Configuration/Scheduling Feasibility Problem (CSFP) of each process agent based on the Cyber World model, DTPN Ψ n = ( P n , T n , F n , m n 0 , μ n ) = k { 1 , 2 , , K n } ( Ω n k a R n k A n a k ) is stated as follows:
Problem 1.
Configuration/Scheduling Feasibility Problem Formulation for Individual Process Agent based on DTPN Model: Given the requested product quantity Q , the deadline θ set by the downstream product agent and a DTPN model Ψ n , determine whether there exists a set of resource agent, R A n * , a firing sequence S n for Ψ n such that the final transition t n f of Ψ n is the last firing sequence in S n and is fired Q times by the deadline.

6. A Condition for Configuration/Scheduling Feasibility Based on Transformation of Cyber World Models

Although the DTPN based Cyber World models defined above can capture the behaviors of agents, activities and resources, it is difficult to develop a solution algorithm to solve Problem 1 based on DTPN models. Therefore, we will transform a DTPN to a graph model and then find a solution based on the graph model. In this section, we first propose an algorithm to transform a DTPN to a graph model and study the properties that establish the connection between the DTPN and the graph model. Based on the properties, the problem to determine whether there exists a firing sequence s n of Ψ n and firing s n will bring Ψ n to a desired marking by a deadline can be formulated as an optimization problem defined on the graph model. Finally, we establish a configuration/scheduling feasibility condition based on the solution of the optimization problem.
Suppose the time horizon is T . The dynamics of a DTPN Cyber World model Ψ n = ( P n , T n , F n , m n 0 , μ n ) of RMS can be described by the marking m n t at different time period t , where t { 1 ,   2 ,   ,   T } . We first illustrate how to represent marking m n t at different time period t by a graph D G n ( V n , E n ) . An algorithm to transform a DTPN Ψ n to a graph D G n ( V n , E n ) is proposed in Algorithms 1 as follows:
Algorithms 1 DTPN to Graph Transformation (DTPN2GT) Algorithm
Input :   Ω n k ,   K n ,   A n a k ,   R n k ,   T ,   θ ,   m n 0 k ( p n k i ) = Q ,   Φ , where Φ is greater than 0
Output :   D G n ( V n , E n )
Step 1: Construct a source node S and a sink node U
Step 2: Construct a ( K n + 1 ) × T matrix of nodes, numbered from 1 to ( K n + 1 ) × T .
Step 3: For k { 1 , 2 , , K n + 1 }
    For   t { 1 , 2 , , T 1 }
     Add   an   arc   connecting   node   t + ( k 1 ) T   to   node   t + ( k 1 ) T + 1
     Assign   arc   capacity   u n k t h = to   arc ( s , 1 )
     Assign   arc   cost   c n k t h   =   0.0   to   the   arc   ( t + ( k 1 ) T , t + ( k 1 ) T + 1 )
     Create   a   flow   variable   h n k t   for   the   arc   ( t + ( k 1 ) T , t + ( k 1 ) T + 1 )
   End For
  End For
Step   4 :   For   k { 1 , 2 , , K n }
    For   t { 1 , 2 , , T 1 }
      Add   an   arc ( t + ( k 1 ) T , t + k T + μ n a k ( t n s k ) + μ n a k ( t n e k ) )   connecting   node   t + ( k 1 ) T to   node
      t + k T + μ n a k ( t n s k ) + μ n a k ( t n e k )
      Let a denote   resource   agent   to   perform   the   k t h activity
     Assign   arc   capacity   u n k t w = m n a 0 k ( r n a k )   to   arc ( t + ( k 1 ) T , t + k T + μ n a k ( t n s k ) + μ n a k ( t n e k ) )
     Assign   arc   cos t c n k t w = 0.0   to   the   arc ( t + ( k 1 ) T , t + k T + μ n a k ( t n s k ) + μ n a k ( t n e k ) )
     Create   a   flow   variable w n k t for   the   arc ( t + ( k 1 ) T , t + ( k 1 ) T + 1 )
   End For
  End For
Step 5: Add an arc from node S to node 1
    Assign   arc   capacity   u n 0 = m n 0 k ( p n k i ) to   arc ( s , 1 )
    Assign   arc   cos t   c n 0 = 0.0   to   the   arc ( s , 1 )
    Create   a   flow   variable   f n 0
    Assign   flow   to   f n 0 = m n 0 k ( p n k i )
Step   6 :   For   t { 1 , 2 , , T }
    Add   an   arc ( K n T + t , U ) connecting   node   K n T + t to node U
    Assign   arc   capacity   u n t l = m n 0 k ( p n i k )   to   arc ( K n T + t , U )
    Assign   arc   cos t   c n t l = Φ   to   the   arc ( K n T + t , U ) ,   where
    Create   a   flow   variable   l n t   for   the   arc ( K n T + t , U )
  End For
As the tokens must conserve, the following capacity constraints (defined in (1)) and flow balance constraints (defined in (2)–(9)) must be satisfied:
τ = t t + γ n a k 1 w n k τ m n a 0 k ( r a ) k { 1 ,   2 ,   ,   K n } t { 1 ,   2 ,   ,   T γ n a k ) }
h n k ( t 1 ) = h n k t + w n k t k { 1 } t { 2 ,   ,   T }
h n 11 + w n 11 = f n 0
h n ( K n + 1 ) t + w n K n ( t γ n a K n + 1 ) = h n ( K n + 1 ) ( t + 1 ) + l n ( t + 1 ) t { γ n a K n 1 ,   ,   T 1 }
h n k t + w n ( k 1 ) ( t γ n a k 1 + 1 ) = h n k ( t + 1 ) + w n k ( t + 1 ) k { 2 ,   ,   K n } t { γ n a k 1 ,   ,   T γ n a k }
h n k t = 0 k { 2 ,   ,   K n } t { 1 ,   ,   k = 1 k 1 γ n a k }
w n k t = 0 k { 2 ,   ,   K n } t { 1 ,   ,   k = 1 k 1 γ n a k }
h n k t = 0 k { K n + 1 } t { 1 ,   ,   k = 1 K n γ n a k }
l n t = 0 t { 1 ,   ,   k = 1 K n γ n a k }
h n k t , w n k t Z , where Z is the set of nonnegative integers and γ n a k = μ n a k ( t n s k ) + μ n a k ( t n e k ) .
Definition 6.
D G n ( V n , E n ) denotes a graph model constructed by applying the D2GT algorithm to Ψ n and satisfies constraints (1) through (9).
Figure 11a–c show the graph models corresponding to the DTPN models in Figure 9a–c, respectively.
Note that Ψ n = ( P n , T n , F n , m n 0 , μ n ) = k { 1 , 2 , , K n } ( Ω n k a R n k A n a k ) , where Ω n k = ( P n k , T n k , F n k , m n 0 k , μ n k ) and P n k = P n k i { p n k b } { p n k o } . Therefore, the number of tokens, m n t ( p ) , in place p P n k i at period t can be represented by h n k t for t { 1 , 2 , 3 , , T } . The number of tokens, m n t ( p ) , in place p P n k b at period t can be represented by w n k t for t { 1 , 2 , 3 , , T } . The number of tokens m n t ( r a ) in the resource idle place r a can be calculated by m n 0 ( r a ) τ = t ( μ n r ( t s ) + μ n r ( t e ) ) + 1 t w n k τ . Based on the above reasoning, any reachable marking of Ψ n = ( P n , T n , F n , m n 0 , μ n ) can be represented in D G n ( V n , E n ) . The following properties hold for D G n ( V n , E n ) and DTPN Ψ n = ( P n , T n , F n , m n 0 , μ n ) .
Property 1.
Each marking reachable from DTPN Ψ n = ( P n , T n , F n , m n 0 , μ n ) can be represented by D G n ( V n , E n ) .
Property 2.
Suppose D G n ( V n , E n ) satisfies constraints (1)–(9). Then there is a marking of Ψ n = ( P n , T n , F n , m n 0 , μ n ) corresponding to D G n ( V n , E n ) .
Property 1 and Property 2 indicate that the dynamics of DTPN Ψ n = ( P n , T n , F n , m n 0 , μ n ) can be analyzed based on D G n ( V n , E n ) . Conversely, a D G n ( V n , E n ) represents an evolution trajectory of Ψ n . Based on this observation, Problem 1 defined previously to determine whether there exists a firing sequence S n for Ψ n such that the final transition t n f of Ψ n is the last firing sequence in S n and is fired Q times by the deadline θ can be stated as the following problem:
Problem 2.
Find h n k t , w n k t and l n t in D G n ( V n , E n ) subject to constraints (1)–(9) such that Σ t { 1 , 2 , , θ } l n θ = Q .
Instead of solving Problem 2 directly, we formulate Problem 3 below and show that the solution to Problem 3 can be used to check whether there exists a solution to Problem 2. Let D G n ( V n , E n ) be the graph model constructed by applying the DTPN2GT algorithm to Ψ n . Problem 3 aims to find h n k t , w n k t and l n t in D G n ( V n , E n ) by minimizing the objective function t = 1 T k = 1 K n + 1 ( c n k t h h n k t ) + t = 1 T k = 1 K n + 1 ( c n k t w w n k t ) + t = 1 T ( c n t l l n t ) .
Problem 3.
m i n h , w , l t = 1 T k = 1 K n + 1 ( c n k t h h n k t ) + t = 1 T k = 1 K n + 1 ( c n k t w w n k t ) + t = 1 T ( c n t l l n t ) subject to constraints (1) through (9).
The following property holds for Problem 2 and Problem 3 stated above.
Property 3.
There exists a solution to Problem 2 if and only if there exists a solution to Problem 3 with l n t = 0 for all t > θ .
Proof. 
Please refer to Appendix A for the proof of Property 4. □
Property 3 states the feasibility condition for a product agent. To establish the feasibility condition for a configuration, we need more definitions as follows:
Definition 7.
A process agent w n without an upstream process agents is called an input process agent.
Definition 8.
An input process agent w n and a set of resource agents involved the in the multi-level contract net protocol form a feasible configuration if there exists a solution to Problem 3 with l n t = 0 for all t > θ . Such an input process agent w n is called feasible.
Definition 9.
A process agent w n with at least one upstream process agent is called a non-input process agent.
Definition 10.
A non-input process agent w n and a set of resource agents involved the in the multi-level contract net protocol form a feasible configuration if there exists a solution to Problem 3 with l n t = 0 for all t > θ and there exists at least one upstream feasible process agent with for each input place in P n k i . Such a non-input process agent w n is called feasible.
Definition 11.
A process agent w n that provides end products to a task agent is called an output process agent.
Based on the above definitions, it follows that the following property hold.
Property 5.
If an output process agent w n is feasible, there exist a set of process agents and resource agents involved the in the multi-level contract net protocol that form a feasible configuration.

7. Context Generation Algorithm

Generation of contextual information takes place after the negotiation process of multi-level contract net protocol is finished and the proposals submitted by relevant process agents have been accepted. Note that only a process agent that has found a feasible solution for Problem 3 will create a PRO message and submit it to the downstream process agent. If the PRO is accepted by the downstream process agent, the context generation algorithm will be invoked to generate the contextual information based on the solution found by the process agent. That is, only the set of process agents with their PRO message being accepted will enter the step of context generation.
Based on the models and theory developed in the previous section, the context generation algorithm will be proposed in this section.
For a process agent that has found a feasible solution for Problem 3 and submitted a proposal that has been accepted by the downstream process agent, the solution found in the course of solving Problem 3 will be used as the input to the context generation algorithm. The context generation algorithm extracts the information to generate the calendars for relevant resource agents from the solution, including start transition/end transition and timing information, etc. The information generated by the context generation algorithm is formatted in XML. Algorithms 2 shows the context generation algorithm.
Algorithms 2 Context Generation Algorithm
Input :   T ,   K n ,   A n a k ,   the   solution   h n k t ,   w n k t   and   l n t   found   based   on   D G n ( V n , E n )
Output :   Contextual   Information ,   X M L _ C a l e n d a r a ,   for   each   resource
Step   1 :   For   each   t { 1 , 2 , , T }
    For   each   k { 1 , 2 , , K n }
    If   w n k t > 0
    t n s k   Start   transition   of   A n a k
    t n e k   End   transition   of   A n a k
      Assign   time   slot   [ t t + μ n r ( t s k ) + μ n r ( t e k ) ] to calendar of agent a
      A c t i v i t y . W o r k f l o w I D n
      A c t i v i t y . S t a r t T r a n s i t i o n t n s k
      A c t i v i t y . E n d T r a n s i t i o n t n s k
      A c t i v i t y . S t a r t T i m e t
      A c t i v i t y . E n d T i m e t + μ n r ( t s k ) + μ n r ( t e k )
      C a l e n d a r a C a l e n d a r a A c t i v i t y
   End If
  End For
  End For
Step   2 :   For   each   t { 1 , 2 , , T }
   For each resource agent a
     If   C a l e n d a r a Φ
     Create   XML   file   X M L _ C a l e n d a r a
    End If
   End For
  End For
Although the XML includes the contextual information for guiding resource agents, it is not suitable for providing information to users. These xml files must be transformed into other formats to provide proper GUI for users. Therefore, a GUI transformation procedure is developed to transform the contextual information in XML format to present the information to users. Table 2 shows the two steps to transform the contextual information into GUI. In this paper, we apply eXtensible Stylesheet Language (XSL) Transformations (XSLT) to transform XML files into html files to present the contextual information to users. XSL is a styling language for XML which can be applied to design GUI [44]. The GUI transformation procedure shown in the Table 2 consists of two steps. The first step is done off-line whereas the second step is done on-line. For the first step, the XSLT code must be designed. For the second step, we will illustrate the XSLT code by an example in the next section.

8. Results

We have implemented the solution algorithm by constructing the CPS models using WoPeD [45], invoking the library provided by CPLEX solver [46] to solve Problem 3 and develop the application in JADE [47], a FIPA compliant agent platform. In this section, we first illustrate the proposed method by applying it to two examples. There are three process agents in Example 1 whereas Example 2 is an example with six process agents. Following these two illustrative examples, we then present the results obtained by conducting several experiments to study the influence of time horizon, number of operations in a process and demand on computation time and response time to assess practicality of the proposed method.
Example 1: Consider a CPS with three process agents and five resource agents. A task with three units of products to be processes is released to the CPS. The due date of this task is 2021.1.16 AM 1:00. The CPS models of three process agents and five resource agents are described by PNML files. The PNML files (W1.pnml, W2.pnml, W3.pnml, R1.pnml, R2.pnml, R3.pnml, R4.pnml, R5.pnml) of the Cyber Physical Models are available for download at the following link:https://drive.google.com/drive/folders/1ZVL3Drvd5V_L0OeF7DalwMcAnNJGj5yv?usp=sharing (accessed on 25 January 2021).
The transitions in each process and the processing time of each operation are shown in Table 3 and Table 4, respectively.
For this example, T is set according to the order due date and each time period is one minute. The proposed algorithm generates the contextual information in Extensible Markup Language (XML) format for each resource. The five XML files generated for R1 through R5 are R1_Calendar.xml, R2_Calendar.xml, R3_Calendar.xml, R4_Calendar.xml and R5_Calendar.xml, respectively. The contextual information of resources R1 through R5 are available for download at the following link: https://drive.google.com/drive/folders/1ZVL3Drvd5V_L0OeF7DalwMcAnNJGj5yv?usp=sharing (accessed on 25 January 2021).
Although the contextual information has been generated in R1_Calendar.xml, R2_Calendar.xml, R3_Calendar.xml, R4_Calendar.xml and R5_Calendar.xml, these XML files are not suitable for providing information to users. These xml files must be transformed into other formats to provide proper GUI for users. In this paper, we apply eXtensible Stylesheet Language (XSL) Transformations (XSLT) to transform XML files into html files to present the contextual information to users. eXtensible Stylesheet Language is a styling language for XML. To apply XSLT to transform R1_Calendar.xml, R2_Calendar.xml, R3_Calendar.xml, R4_Calendar.xml and R5_Calendar.xml into html format, we design the XSLT code. The XSLT code we design is the file R_XSL1.txt shown in Table 5 and available for download at the following link: https://drive.google.com/drive/folders/1ZVL3Drvd5V_L0OeF7DalwMcAnNJGj5yv?usp=sharing (accessed on 25 January 2021).
By applying R_XSL1.txt, the R1_Calendar.xml, R2_Calendar.xml, R3_Calendar.xml, R4_Calendar.xml and R5_Calendar.xml files are transformed into html file format and can be display in browsers. Figure 12a–f show the calendars for all agents.
Example 2: The PNML files (W1.pnml, W2.pnml, W3.pnml, W4.pnml, W5.pnml, W6.pnml, R1.pnml, R2.pnml, R3.pnml, R4.pnml, R5.pnml, R6.pnml, R7.pnml) of the Cyber Physical Models in this example are available for download at the following link: https://drive.google.com/drive/folders/1FRUMtDsdf3rUQ4_8lVcFiS151TJoJUHX?usp=sharing (accessed on 25 January 2021).
The proposed algorithm generates the contextual information in XML format for each resource. The XML files generated for R1 through R7 are R1_Calendar.xml, R2_Calendar.xml, R3_Calendar.xml, R4_Calendar.xml, R5_Calendar.xml, R6_Calendar.xml and R7_Calendar.xml. The contextual information of resources R1 through R7 are available for download at the following link: https://drive.google.com/drive/folders/1FRUMtDsdf3rUQ4_8lVcFiS151TJoJUHX?usp=sharing (accessed on 25 January 2021).
Although the contextual information has been generated in R1_Calendar.xml, R2_Calendar.xml, R3_Calendar.xml, R4_Calendar.xml, R5_Calendar.xml, R6_Calendar.xml and R7_Calendar.xml, these XML files are not suitable for providing information to users. These xml files must be transformed into other formats to provide proper GUI for users. We apply XSL Transformations (XSLT) to transform XML files into html files to present the contextual information to users. eXtensible Stylesheet Language is a styling language for XML. To apply XSLT to transform R1_Calendar.xml, R2_Calendar.xml, R3_Calendar.xml, R4_Calendar.xml, R5_Calendar.xml, R6_Calendar.xml and R7_Calendar.xml into html format, we design the XSLT code. The XSLT code we design is the R_XSL2.txt file available for download at the following link: https://drive.google.com/drive/folders/1FRUMtDsdf3rUQ4_8lVcFiS151TJoJUHX?usp=sharing (accessed on 25 January 2021).
By applying R_XSL2.txt, the R1_Calendar.xml, R2_Calendar.xml, R3_Calendar.xml, R4_Calendar.xml, R5_Calendar.xml, R6_Calendar.xml and R7_Calendar.xml files are transformed into html file format and can be display in browsers. Please refer to the files Order_Calendar_ScreenShot.doc and Resource_Calendar_ScreenShot.doc available for download at the following link: https://drive.google.com/drive/folders/1FRUMtDsdf3rUQ4_8lVcFiS151TJoJUHX?usp=sharing (accessed on 25 January 2021).
An important performance index of context-aware information system is response time. Response time refers to the time for a system to react to a given input. In assessing effectiveness of a system, an important issue is to study how response time changes with respect to parameters of the problem or the solution method. There are three parameters used in the solution algorithm, including time horizon T , number of operations in a process and the demand. We perform a series of experiments to study the influence of these parameters on computation time of the solution method and the total response time.
Computation Time and Response Time with respect to time horizon T .
To study the connection between response time and time horizon T , we conduct several experiments by increasing time horizon T . Figure 13a shows the results by changing time horizon T from around 302 to 1502. The results indicate that the computation time and total time are almost the same in this range. The results also indicate that the computation time due to optimization is less than 50% of the total time. Figure 13b shows the results by changing time horizon T from around 1442 to 7202. The results indicate that the computation time and total time increase linearly in this range. The results also indicate that the computation time due to optimization is over 75% of the total time.
Computation Time and Response Time with respect to number of operations.
To study the connection between response time and number of operations, we conduct several experiments by increasing the number of operations. Figure 13c shows the results by changing the number of operations from 2 to 10. The results indicate that the computation time and total time grow with respect to the number of operations in this range. The results also indicate that the growth of computation time due to optimization is less significant than that of the total time. This implies that more time is spent on communication as the number of operations grows. Figure 13d shows the results by changing the number of operations from 12 to 20. The results indicate that the computation time and total time grow with respect to the number of operations in this range. The results also indicate that the growth of computation time due to optimization is less significant than that of the total time. This implies that more time is spent on communication as the number of operations grows.
In addition to the above experiments, we also perform experiments to study how computation time and total time is influenced by demand. We increase the demand from 10 to 50 and obtain the results in Figure 13e. Note that the time spent on optimization does not increase significantly but the total time increases significantly. This implies that solution algorithm is not sensitive to the demand.

9. Discussion

From the perspectives of modeling tools, solution methods and application domains, this study are different from previous studies. In terms of the development of context-aware systems and applications, although there are a lot of studies relevant to context-aware systems and applications on engineering context-aware systems [16], design of implementation method in context-aware ecosystems [17], and context-aware computing for the IoT [15], there are only a few works on the development of context-aware information system for CPS, e.g., [18,19,20,21,22]. Moreover, these works focus on security issue [19], programming [20], process guidance [21] and achieving self-optimization by using context awareness [22]. The problem to generate temporal workflow contextual information for complex workflows of CPS is not addressed in these studies.
In terms of modeling tools, the DTPN models proposed in this paper extends the one defined in [41] by allowing multiple input places in the workflows of CPS. The timed model makes it possible to capture the characteristics of assembly operations in manufacturing systems and enable temporal planning to generate temporal contextual information. Although the problem to generate contextual information in workflow systems has been studied in [42], the method proposed in [42] cannot generate temporal workflow contextual information due to the use of untimed models. As a time interval is used to specify the timing for firing each transition, the time factor considered in the models of [43] in conjunction with the proposed algorithms can only be used for temporal reasoning of a task. It cannot generate context-aware scheduling information for assembly workflows in CPS. Comparing with the drawbacks of the models used in [43], the DTPN Cyber World models proposed in this paper endows the CPS with the capability to achieve effective generation of temporal context-aware information system based on optimization theory and a transformation method.
Several types of production processes can be handled in this study. These include sequential processes as well as assembly processes. An assembly process can be decomposed into a number of sub-processes with dependency between upstream sub-processes and downstream sub-processes. Each process agent is responsible for only one sub-process with sequential structure. This allows the proposed approach to handle a wide variety of production processes. The capacity constraints are described in (1). Analysis and optimization are based on the capacity constraints as well as the flow balance constraints. Flexibility of the physical system can be described in terms of the capabilities and the processing time to perform operations. The capability to perform the k -th operation of process agent w n by resource agent a is described by A n a k = ( P n a k , T n a k , F n a k , m n a 0 k , μ n a k ) . The processing time is specified in the μ n a k function. Limitations in material supply (from external entities) have been considered in f n 0 = m n 0 k ( p n k i ) = Q in constraint (3). So, the solution found by our proposed method will satisfy the constraints due to limitations in material supply from external entities.
To assess the efficiency of the proposed approach, the computational complexity of the proposed method is analyzed. The procedures involved in the proposed method to generate contextual information include the DTPN to Graph Transformation (DTPN2GT) Algorithm, the algorithm to solve Problem 3, the Context Generation Algorithm and the negotiation protocol used. For a given negotiation protocol, the complexity of the DTPN to Graph Transformation (DTPN2GT) Algorithm and the Context Generation Algorithm are analyzed as follows.
Note that the DTPN to Graph Transformation (DTPN2GT) Algorithm constructs a ( K n + 1 ) × T matrix of nodes in addition to a source node and a sink node for the graph D G n ( V n , E n ) . Therefore, the total number of nodes in the graph D G n ( V n , E n ) is ( K n + 1 ) T + 2 . So, the complexity to construct the nodes in the graph D G n ( V n , E n ) is O ( K n T ) . The complexity to construct the arcs in D G n ( V n , E n ) is also O ( K n T ) .
Consider a given graph D G n ( V n , E n ) with desired flow value Q . Note that Problem 3 is actually a minimum cost flow problem with additional constraints. It is well-known that a minimum cost flow problem can be solved by iteratively applying a shortest path algorithm such as the Dijkstra’s shortest path algorithm [48] or directly applying the algorithm for network flow problem [49]. The minimum cost flow problem is closely related to the problem to successfully find a number of shortest paths with total flows in these paths summing up to desired flow value Q . As the graph D G n ( V n , E n ) is an acyclic network with positive cost, the computational complexity is O ( ( K n T ) 2 Q ) . Therefore, the complexity to construct and solve the minimum cost flow problem for D G n ( V n , E n ) is O ( ( K n T ) 2 Q ) . As Problem 3 is actually a minimum cost flow problem with additional constraints. Therefore, a lower bound on the complexity to solve Problem 3 is O ( ( K n T ) 2 Q ) .
The computational complexity of the Context Generation Algorithm is analyzed as follows.
The complexity of the nested loops in Step 1 of the Context Generation Algorithm is O ( T K n ) . The complexity of the nested loops in Step 2 of the Context Generation Algorithm is O ( T R ) . The computational complexity of the Context Generation Algorithm is O ( T K n + T R ) .
Therefore, the overall computational complexity for the proposed method is O ( ( K n T ) 2 Q + T R ) .
Note that the above analysis only provides an estimate of a lower bound of computational complexity. As we apply the CPLEX solver to solve the problem, we need to verify the complexity results analyzed above. CPLEX uses linear/quadratic programming relaxation to compute bounds on the value of the optimal solution. It also computes linear constraints that cut off possible solutions which do not satisfy the discreteness constraints. Our computational experiences indicate that the computational complexity by applying CPLEX increases polynomially as the parameters grow. This results is consistent with the above lower bound of polynomial complexity.

10. Conclusions

Although Cyber-Physical Systems (CPS) provides a paradigm to accommodate frequent changes in manufacturing sector based on the states available from the IoT, modeling and managing operations of CPS for manufacturing sector are challenging issues due to the complex interactions between entities in the system. Development of an effective context-aware information management system to guide the entities in the system is a critical factor to attain the potential benefits of CPS. In this paper, a general architecture for developing context-aware guidance information system for resources/workers in CPS is presented. As entities (resources/workers) in CPS are distributed, a distributed architecture based on FIPA compliant multi-agent platform is adopted to model the interactions of entities in CPS. To model a CPS, DTPN is adopted as a tool to construct the Cyber Physical models. To generate contextual information for resources/workers in CPS, two problems are involved, (1) Configuration/Scheduling Feasibility Problem, and (2) Context Generation Problem. We formulate these two problems and combine analysis/theory from information science to derive condition for the existence of a feasible solution. To generate context-aware guidance information for resources/workers in CPS effectively, the model driven architecture concept from software engineering has been adopted to develop a methodology to implement the system. The implementation methodology highly relies on the transformation from Cyber Physical models to graph models and from graph models to contextual information in standard XML format. Generation of guidance information for workers is also done by transforming contextual information from standard XML format to the target presentation format based on XSLT.
The inputs to CPS include the Cyber World models of resources and workflows whereas the outputs are presented in standard format such as HTML used to guide resources/workers to perform operations. The proposed algorithm is applied to illustrative examples to generate contextual information to guide resources in CPS. To demonstrate practicality of the proposed method, a series of experiments have been conducted to study the influence of parameters, including time horizon, number of operations in a process and demand, on computation time and total response time. The results indicate that computation time and total response time increase polynomially with respect to these parameters and show that the proposed method is effective in solving real problems. One future research direction is to extend the method to deal with other types of workflows in CPS. Although we limit the scope of this paper to generation of context-aware workflow management information to guide the operations for resources in CPS, the information generated by the proposed method provides insight into feasibility to meet customers’ demand by a deadline, which is an important quality of service issue. An interesting future research direction is to apply, modify or integrate the proposed method in service provision systems.

Funding

This research was supported in part by the Ministry of Science and Technology, Taiwan, under Grant MOST 109-2410-H-324-001.

Institutional Review Board Statement

“Not applicable” for studies not involving humans or animals.

Informed Consent Statement

“Not applicable” for studies not involving humans.

Data Availability Statement

Data available in a publicly accessible repository described in the article.

Conflicts of Interest

The author declares no conflict of interest.

Appendix A

Proof of Property 4:
Proof of only if part.
Let h n k t , w n k t and l n t for G n ( V n , E n ) such that Σ t { 1 , 2 , , θ } l n θ = Q be a solution to Problem 2. We need to prove that there exists a solution to Problem 3 with l n t = 0 for all t > θ . As h n k t , w n k t and l n t is a solution to Problem 2, it must be a feasible solution to Problem 2. □
Due to conservation of flows in the network of G n ( V n , E n ) , Σ t { 1 , 2 , , T } l n t = Q . As h n k t , w n k t and l n t is a feasible solution to Problem 2, Σ t { 1 , 2 , , θ } l n θ = Q . Therefore, l n t = 0 for all t > θ . Therefore, h n k t , w n k t and l n t is a feasible solution to Problem 2 with l n t = 0 for all t > θ .
As the constraints (1)–(9) in Problem 2 and Problem 3 are the same and h n k t , w n k t and l n t is a feasible solution to Problem 2, h n k t , w n k t and l n t must be a feasible solution to Problem 3.
Next, we show that h n k t , w n k t and l n t is an optimal solution to Problem 3. To prove this, we show that the objective function of h n k t , w n k t and l n t is less than or equal to an optimal solution h n k t * , w n k t * and l n t * to Problem 3. As h n k t * , w n k t * and l n t * is an optimal solution to Problem 3, h n k t * , w n k t * and l n t * must be a feasible solution that satisfies constraints (1)–(9).
Let Γ = { t | l n t * > 0 , t { θ + 1 , θ + 2 , , T } } . The objective function value for h n k t * , w n k t * and l n t * is
t = 1 T k = 1 K n + 1 ( c n k t h h n k t * ) + t = 1 T k = 1 K n + 1 ( c n k t w w n k t * ) + t = 1 T ( c n t l l n t * ) = t = 1 T ( c n t l l n t * ) =
t { 1 , 2 , , T } \ Γ T ( c n t l l n t * ) + t Γ T ( c n t l l n t * ) = t Γ T ( c n t l l n t * ) = t Γ T ( Φ l n t * ) = Φ ( t Γ T l n t * ) = Φ Q .
The objective function value for h n k t , w n k t and l n t is
t = 1 T k = 1 K n + 1 ( c n k t h h n k t ) + t = 1 T k = 1 K n + 1 ( c n k t w w n k t ) + t = 1 T ( c n t l l n t ) = t = 1 T ( c n t l l n t ) = t { 1 , 2 , , T } \ Γ T ( c n t l l n t ) + t Γ T ( c n t l l n t ) = t Γ T ( c n t l l n t ) = 0 Φ Q .
The objective function of h n k t , w n k t and l n t is less than or equal to an optimal solution h n k t * , w n k t * and l n t * to Problem 3. Therefore, h n k t , w n k t and l n t is an optimal solution to Problem 3.
Proof of if part.
In this part, we need to prove that if there exists a solution h n k t , w n k t and l n t to Problem 3 with l n t = 0 for all t > θ , there exists a solution to Problem 2 with Σ t { 1 , 2 , , θ } l n θ = Q . □
Suppose h n k t , w n k t and l n t is a solution to Problem 3 with l n t = 0 for all t > θ . The solution h n k t , w n k t and l n t must be a feasible solution that satisfy constraints (1)–(9) in Problem 2 and Problem 3.
Due to conservation of flows in the network of G n ( V n , E n ) , the equation Σ t { 1 , 2 , , T } l n t = Q must be satisfied. Therefore, Σ t { 1 , 2 , , T } l n t = Σ t { 1 , 2 , , θ } l n t + Σ t { θ + 1 , θ + 2 , , T } l n t = Q .
As l n t = 0 for all t > θ , Σ t { 1 , 2 , , T } l n t = Σ t { 1 , 2 , , θ } l n t + Σ t { θ + 1 , θ + 2 , , T } l n t = Σ t { 1 , 2 , , θ } l n t = Q .
Therefore, h n k t , w n k t and l n t is a solution to Problem 2 with Σ t { 1 , 2 , , θ } l n θ = Q .
Q.E.D.

References

  1. Intelligent Manufacturing Systems. Available online: http://www.ims.org/index.html (accessed on 15 January 2021).
  2. Molina, A.; Rodríguez, C.A.; Ahuett, H.; Cortés, J.A.; Ramírez, M.; Jiménez, G.; Martinez, S. Next-generation manufacturing systems: Key research issues in developing and integrating reconfigurable and intelligent machines. Int. J. Comput. Integr. Manuf. 2005, 18, 525–536. [Google Scholar] [CrossRef]
  3. Recommendations for Implementing the Strategic Initiative INDUSTRIE 4.0, Final Report of the Industrie 4.0 Working Group. Available online: https://www.din.de/blob/76902/e8cac883f42bf28536e7e8165993f1fd/recommendations-for-implementing-industry-4-0-data.pdf (accessed on 15 January 2021).
  4. Bortolini, M.; Faccio, M.; Galizia, F.G.; Gamberi, M.; Pilati, F. Adaptive Automation Assembly Systems in the Industry 4.0 Era: A Reference Framework and Full–Scale Prototype. Appl. Sci. 2021, 11, 1256. [Google Scholar] [CrossRef]
  5. Rajkumar, R.; Lee, I.; Sha, L.; Sankovic, J. Cyber-physical systems: The next computing revolution. In Proceedings of the 47th ACM/IEEE Design Automation Conference (DAC’10), Anaheim, CA, USA, 13–18 June 2010; pp. 731–736. [Google Scholar]
  6. Lee, J.; Bagheri, B.; Kao, H.-A. A Cyber-Physical Systems architecture for Industry 4.0-based manufacturing systems. Manuf. Lett. 2015, 3, 18–23. [Google Scholar] [CrossRef]
  7. Gershenfeld, N.; Krikorian, R.; Cohen, D. The Internet of Things. Sci. Am. 2004, 291, 76–81. [Google Scholar] [CrossRef]
  8. Kolberg, D.; Zühlke, D. Lean Automation enabled by Industry 4.0 Technologies. IFAC-PapersOnLine 2015, 48, 1870–1875. [Google Scholar] [CrossRef]
  9. National Institute of Standards and Technology. Workshop Report on Foundations for Innovation in Cyber-Physical Systems, January 2013; National Institute of Standards and Technology: Gaithersburg, MA, USA, 2013. Available online: https://www.nist.gov/system/files/documents/el/CPS-WorkshopReport-1-30-13-Final.pdf (accessed on 15 January 2021).
  10. Evans, D. The Internet of Everything: How More Relevant and valuable Connections Will Change the World? Available online: https://newsroom.cisco.com/video-content?type=webcontent&articleId=1111241 (accessed on 15 January 2021).
  11. Abdelwahab, S.; Hamdaoui, B.; Guizani, M.; Rayes, A. Enabling Smart Cloud Services through Remote Sensing: An Internet of Everything Enabler. IEEE Internet Things J. 2014, 1, 276–288. [Google Scholar] [CrossRef]
  12. Kortuem, G.; Kawsar, F.; Sundramoorthy, V.; Fitton, D. Smart objects as building blocks for the Internet of things. IEEE Internet Comput. 2010, 14, 44–51. [Google Scholar] [CrossRef] [Green Version]
  13. Dey, A.K. Understanding and Using Context. Pers. Ubiquitous Comput. 2001, 5, 4–7. [Google Scholar] [CrossRef]
  14. Schilit, B.N.; Theimer, M.M. Disseminating active map information to mobile hosts. IEEE Netw. 1994, 8, 22–32. [Google Scholar] [CrossRef]
  15. Perera, C.; Zaslavsky, A.B.; Christen, P.; Georgakopoulos, D. Context Aware Computing for The Internet of Things: A Survey. IEEE Commun. Surv. Tutor. 2014, 16, 414–454. [Google Scholar] [CrossRef] [Green Version]
  16. Alegre, U.; Augusto, J.C.; Clark, T. Engineering context-aware systems and applications: A survey. J. Syst. Softw. 2016, 117, 55–83. [Google Scholar] [CrossRef]
  17. Pradeep, P.; Krishnamoorthy, S. The MOM of context-aware systems: A survey. Comput. Commun. 2019, 137, 44–69. [Google Scholar] [CrossRef]
  18. Ivanov, R.; Weimer, J.; Lee, I. Towards Context-Aware Cyber-Physical Systems. In 2018 IEEE Workshop on Monitoring and Testing of Cyber-Physical Systems (MT-CPS); IEEE: Piscataway, NJ, USA, 2018; pp. 10–11. [Google Scholar]
  19. Wan, K.; Alagar, V. Context-Aware Security Solutions for Cyber Physical Systems. In Context-Aware Systems and Applications. ICCASA 2012. Lecture Notes of the Institute for Computer Sciences, Social Informatics and Telecommunications Engineering, 109; Vinh, P.C., Hung, N.M., Tung, N.T., Suzuki, J., Eds.; Springer: Berlin/Heidelberg, Germany, 2013. [Google Scholar] [CrossRef]
  20. Gaur, S.; Almeida, L.; Tovar, E.; Reddy, R. CAP: Context-Aware Programming for Cyber Physical Systems. In Proceedings of the 2019 24th IEEE International Conference on Emerging Technologies and Factory Automation (ETFA), Zaragoza, Spain, 10–13 September 2019; pp. 1009–1016. [Google Scholar]
  21. Kammerer, K.; Pryss, R.; Sommer, K.; Reichert, M. Towards Context-Aware Process Guidance in Cyber-Physical Systems with Augmented Reality. In Proceedings of the 2018 4th International Workshop on Requirements Engineering for Self-Adaptive, Collaborative, and Cyber Physical Systems (RESACS), Banff, AB, Canada, 20–20 August 2018; pp. 44–51. [Google Scholar] [CrossRef] [Green Version]
  22. Scholze, S.; Barata, J. Context Awareness for Flexible Manufacturing Systems Using Cyber Physical Approaches. In Technological Innovation for Cyber-Physical Systems. DoCEIS 2016. IFIP Advances in Information and Communication Technology; Camarin-ha-Matos, L.M., Falcão, A.J., Vafaei, N., Najdi, S., Eds.; Springer: Cham, Switzerland, 2016; Volume 470. [Google Scholar] [CrossRef] [Green Version]
  23. Bortolini, M.; Faccio, M.; Gamberi, M.; Pilati, F. Motion Analysis System (MAS) for production and ergonomics assessment in the manufacturing processes. Comput. Ind. Eng. 2020, 139, 105485. [Google Scholar] [CrossRef]
  24. Azzi, A.; Battini, D.; Faccio, M.; Persona, A.; Sgarbossa, F. Inventory holding costs measurement: A multi-case study. Int. J. Logist. Manag. 2014, 25, 109–132. [Google Scholar] [CrossRef]
  25. Azzi, A.; Faccio, M.; Persona, A.; Sgarbossa, F. Lot splitting scheduling procedure for makespan reduction and machine capacity increase in a hybrid flow shop with batch production. Int. J. Adv. Manuf. Technol. 2012, 59, 775–786. [Google Scholar] [CrossRef]
  26. Faccio, M.; Bottin, M.; Rosati, G. Collaborative and traditional robotic assembly: A comparison model. Int. J. Adv. Manuf. Technol. 2019, 102, 1355–1372. [Google Scholar] [CrossRef]
  27. Azzi, A.; Battini, D.; Faccio, M.; Persona, A. Mixed model assembly system with multiple secondary feeder lines: Layout design and balancing procedure for ATO environment. Int. J. Prod. Res. 2012, 50, 5132–5151. [Google Scholar] [CrossRef]
  28. Bortolini, M.; Faccio, M.; Galizia, F.G.; Gamberi, M.; Pilati, F. Design, engineering and testing of an innovative adaptive automation assembly system. Assem. Autom. 2020, 40, 531–540. [Google Scholar] [CrossRef]
  29. Bortolini, M.; Galizia, F.G.; Mora, C.; Pilati, F. Reconfigurability in cellular manufacturing systems: A design model and multi-scenario analysis. Int. J. Adv. Manuf. Technol. 2019, 104, 4387–4397. [Google Scholar] [CrossRef]
  30. Müller, T.; Jazdi, N.; Schmidt, J.P.; Weyrich, M. Cyber-Physical Production Systems: Enhancement with a Self-Organized Reconfig-Uration Management. 2020. Available online: https://www.researchgate.net/publication/341321831_Cyber-Physical_Production_Systems_enhancement_with_a_self-organized_reconfiguration_management (accessed on 15 January 2020).
  31. Yelles-Chaouche, A.R.; Gurevsky, E.; Brahimi, N.; Dolgui, A. Reconfigurable manufacturing systems from an optimisation perspective: A focused review of literature. Int. J. Prod. Res. 2020, 1–19. [Google Scholar] [CrossRef]
  32. Brandimarte, P.; Villa, A. (Eds.) Optimization Models and Concepts in Production Management; Gordon & Breach: Basel, Switzerland, 1995. [Google Scholar]
  33. Law, A.M.; Kelton, W.D. Simulation Modeling and Analysis, 2nd ed.; McGraw-Hill: New York, NY, USA, 1991. [Google Scholar]
  34. Peck, S.; Dicesare, F.; Harhalakis, G.; Proth, J.M.; Silva, M.; Vernadat, F.B. Practice of Petri Nets in Manufacturing. J. Oper. Res. Soc. 1994, 45, 1094. [Google Scholar] [CrossRef]
  35. Monostori, L.; Váncza, J.; Kumara, S. Agent-Based Systems for Manufacturing. Cirp. Ann. 2006, 55, 697–720. [Google Scholar] [CrossRef] [Green Version]
  36. Smith, R.G. The Contract net protocol: High-level communication and control in a distributed problem solver. IEEE Trans. Comput. 1980, 29, 1104–1113. [Google Scholar] [CrossRef]
  37. Murata, T. Petri nets: Properties, analysis and applications. Proc. IEEE 1989, 77, 541–580. [Google Scholar] [CrossRef]
  38. Billington, J.; Christensen, S.; Van Hee, K.; Kindler, E.; Kummer, O.; Petrucci, L.; Post, R.; Stehno, C.; Weber, M. The Petri Net Markup Language: Concepts, Technology, and Tools. Constr. Side Channel Anal. Secur. Des. 2003, 2679, 483–505. [Google Scholar] [CrossRef]
  39. Hsieh, F.-S.; Lin, J.-B. A dynamic scheme for scheduling complex tasks in manufacturing systems based on collaboration of agents. Appl. Intell. 2014, 41, 366–382. [Google Scholar] [CrossRef]
  40. Hsieh, F.-S. A hybrid and scalable multi-agent approach for patient scheduling based on Petri net models. Appl. Intell. 2017, 47, 1068–1086. [Google Scholar] [CrossRef]
  41. Hsieh, F.-S. Design of scalable agent-based reconfigurable manufacturing systems with Petri nets. Int. J. Comput. Integr. Manuf. 2017, 31, 748–759. [Google Scholar] [CrossRef]
  42. Hsieh, F.-S.; Lin, J.-B. Development of context-aware workflow systems based on Petri Net Markup Language. Comput. Stand. Interfaces 2014, 36, 672–685. [Google Scholar] [CrossRef]
  43. Hsieh, F.-S.; Lin, J.-B. Context-aware workflow management for virtual enterprises based on coordination of agents. J. Intell. Manuf. 2012, 25, 393–412. [Google Scholar] [CrossRef]
  44. Extensible Stylesheet Language. Available online: https://www.w3schools.com/xml/xsl_intro.asp (accessed on 15 January 2021).
  45. Workflow Petri Net Designer (WoPeD). Available online: https://woped.dhbw-karlsruhe.de/ (accessed on 15 January 2021).
  46. IBM CPLEX Optimizer. Available online: https://www.ibm.com/analytics/cplex-optimizer (accessed on 15 January 2021).
  47. Java Agent DEvelopment Framework (JADE). Available online: https://jade.tilab.com/ (accessed on 15 January 2021).
  48. Dijkstra, E.W. A note on two problems in connexion with graphs. Numer. Math. 1959, 1, 269–271. [Google Scholar] [CrossRef] [Green Version]
  49. Edmonds, J.S.; Karp, R.M. Theoretical Improvements in Algorithmic Efficiency for Network Flow Problems. J. ACM 1972, 19, 248–264. [Google Scholar] [CrossRef]
Figure 1. Entities in Internet of Things (IoT)-enabled Manufacturing Environment.
Figure 1. Entities in Internet of Things (IoT)-enabled Manufacturing Environment.
Applsci 11 02030 g001
Figure 2. Providing Context-aware Information to Guide Resources/Workers.
Figure 2. Providing Context-aware Information to Guide Resources/Workers.
Applsci 11 02030 g002
Figure 3. (a) Operations in three process agents and dependency among workflows; (b) dependency on resources for operations.
Figure 3. (a) Operations in three process agents and dependency among workflows; (b) dependency on resources for operations.
Applsci 11 02030 g003
Figure 4. The flowchart to handle messages by a process agent.
Figure 4. The flowchart to handle messages by a process agent.
Applsci 11 02030 g004
Figure 5. (a) Interactions between the task agent and process agents. (b) Interactions between process agent W 1 and resource agents R 1 and R 2 . (c) Interactions between process agent W 2 and resource agent R 3 . (d) Interactions between process agent W 3 and resource agents R 4 and R 5 .
Figure 5. (a) Interactions between the task agent and process agents. (b) Interactions between process agent W 1 and resource agents R 1 and R 2 . (c) Interactions between process agent W 2 and resource agent R 3 . (d) Interactions between process agent W 3 and resource agents R 4 and R 5 .
Applsci 11 02030 g005aApplsci 11 02030 g005b
Figure 6. (a) A DTPN model Ω 1 1 for operation o 1 ; (b) A DTPN model Ω 1 2 for operation o 2 ; (c) A DTPN model Ω 2 1 for operation o 3 ; (d) A DTPN model Ω 3 1 for operation o 4 ; I A DTPN model Ω 3 2 for operation o 5 .
Figure 6. (a) A DTPN model Ω 1 1 for operation o 1 ; (b) A DTPN model Ω 1 2 for operation o 2 ; (c) A DTPN model Ω 2 1 for operation o 3 ; (d) A DTPN model Ω 3 1 for operation o 4 ; I A DTPN model Ω 3 2 for operation o 5 .
Applsci 11 02030 g006
Figure 7. (a) A DTPN model Ω 1 for process agent W 1 ; (b) A DTPN model Ω 2 for process agent W 2 ; (c) A DTPN model Ω 3 for process agent W 3 .
Figure 7. (a) A DTPN model Ω 1 for process agent W 1 ; (b) A DTPN model Ω 2 for process agent W 2 ; (c) A DTPN model Ω 3 for process agent W 3 .
Applsci 11 02030 g007
Figure 8. (a) A discrete timed Petri nets (DTPN) model for resource agent R 1 ; (b) A DTPN model for resource agent R 2 ; (c) A DTPN model for resource agent R 3 ; (d) A DTPN model for resource agent R 4 ; (e) A DTPN model for resource agent R 5 .
Figure 8. (a) A discrete timed Petri nets (DTPN) model for resource agent R 1 ; (b) A DTPN model for resource agent R 2 ; (c) A DTPN model for resource agent R 3 ; (d) A DTPN model for resource agent R 4 ; (e) A DTPN model for resource agent R 5 .
Applsci 11 02030 g008
Figure 9. (a) A DTPN model Ψ 1 for collaboration of process agent W 1 , resource agent R 1 and resource agent R 2 ; (b) A DTPN model Ψ 2 for collaboration of process agent W 2 and resource agent R 3 A DTPN model for resource agent R 2 ; (c) A DTPN model Ψ 3 for collaboration of process agent W 3 , resource agent R 4 and resource agent R 5 .
Figure 9. (a) A DTPN model Ψ 1 for collaboration of process agent W 1 , resource agent R 1 and resource agent R 2 ; (b) A DTPN model Ψ 2 for collaboration of process agent W 2 and resource agent R 3 A DTPN model for resource agent R 2 ; (c) A DTPN model Ψ 3 for collaboration of process agent W 3 , resource agent R 4 and resource agent R 5 .
Applsci 11 02030 g009
Figure 10. A DTPN model Ψ 1 Ψ 2 Ψ 3 for collaboration of process agent W 1 , resource agent R 1 , resource agent R 2 , process agent W 2 , resource agent R 3 , process agent W 3 , resource agent R 4 , and resource agent R 5 .
Figure 10. A DTPN model Ψ 1 Ψ 2 Ψ 3 for collaboration of process agent W 1 , resource agent R 1 , resource agent R 2 , process agent W 2 , resource agent R 3 , process agent W 3 , resource agent R 4 , and resource agent R 5 .
Applsci 11 02030 g010
Figure 11. (a) The D G 1 ( V 1 , E 1 ) obtained based on DTPN Ψ 1 ; (b) The D G 2 ( V 2 , E 2 ) obtained based on DTPN Ψ 2 ; (c) The D G 3 ( V 3 , E 3 ) obtained based on DTPN Ψ 3 .
Figure 11. (a) The D G 1 ( V 1 , E 1 ) obtained based on DTPN Ψ 1 ; (b) The D G 2 ( V 2 , E 2 ) obtained based on DTPN Ψ 2 ; (c) The D G 3 ( V 3 , E 3 ) obtained based on DTPN Ψ 3 .
Applsci 11 02030 g011aApplsci 11 02030 g011b
Figure 12. (a) Contract of an Order; (b) Contract of R1; (c) Contract of R2; (d) Contract of R3; (e) Contract of R4; (f) Contract of R5.
Figure 12. (a) Contract of an Order; (b) Contract of R1; (c) Contract of R2; (d) Contract of R3; (e) Contract of R4; (f) Contract of R5.
Applsci 11 02030 g012aApplsci 11 02030 g012b
Figure 13. (a) Influence of time horizon T on computation time and the total response time for medium time horizon; (b) influence of time horizon T on computation time and the total response time for large time horizon; (c) influence of the number of operations on computation time and the total response time by changing the number of operations from 2 to 10; (d) influence of the number of operations on computation time and the total response time by changing the number of operations from 12 to 20; (e) Influence of demand on computation time and the total response time by changing the demand from 10 to 50.
Figure 13. (a) Influence of time horizon T on computation time and the total response time for medium time horizon; (b) influence of time horizon T on computation time and the total response time for large time horizon; (c) influence of the number of operations on computation time and the total response time by changing the number of operations from 2 to 10; (d) influence of the number of operations on computation time and the total response time by changing the number of operations from 12 to 20; (e) Influence of demand on computation time and the total response time by changing the demand from 10 to 50.
Applsci 11 02030 g013
Table 1. Notations used in problem formulation.
Table 1. Notations used in problem formulation.
Symbol/VariableMeaning
N the number of process agents
W A the set of process agents, where W A = { 1 , 2 , , N }
n a process agent, where n W A
R the number of resource agents
R A the set of resource agents, where R A = { 1 , 2 , , R }
a a resource agent, where a R A
Q the product demand of orders
ψ the due date of demand
Ω n k the Cyber World model for the k -th operation of process agent n , where n W A
Ω n the Cyber World model for process agent n , where n W A
Ω = { Ω n } the set of Cyber World models for all process agents in W A
A n a k the Cyber World model of the k -th operation of process agent w n performed by resource agent a , where a R A
A = { A n a k } the set of Cyber World models for all activities performed by resource agents in W A
Table 2. GUI Transformation Procedure for Resource Agent.
Table 2. GUI Transformation Procedure for Resource Agent.
GUI Transformation Procedure for Resource Agent a
Input: X M L _ C a l e n d a r a
Output: Standard file for GUI
Step 1: (Off-Line) Design XSLT code for X M L _ C a l e n d a r a
Step 2: (On-Line) Transform X M L _ C a l e n d a r a to GUI for agent a by applying the XSLT code
Table 3. Start Transition and End Transition in each process of Example 1.
Table 3. Start Transition and End Transition in each process of Example 1.
Process W1Start TransitionEnd Transition
Ω 1 1 t 1 t 2
Ω 1 2 t 3 t 4
Ω 2 1 t 5 t 6
Ω 3 1 t 7 t 8
Ω 3 2 t 9 t 10
Table 4. Processing Time of Each Operation of Example 1.
Table 4. Processing Time of Each Operation of Example 1.
OperationProcessing Time
A 11 1 μ 11 1 ( t 1 ) + μ 11 1 ( t 2 ) =1
A 12 2 μ 12 2 ( t 3 ) + μ 12 2 ( t 4 ) =2
A 23 1 μ 23 1 ( t 5 ) + μ 23 1 ( t 6 ) =2
A 34 1 μ 34 1 ( t 7 ) + μ 34 1 ( t 8 ) =1
A 35 2 μ 35 2 ( t 9 ) + μ 35 2 ( t 10 ) =1
Table 5. The XSLT code of Example 1.
Table 5. The XSLT code of Example 1.
R_XSL1.txt
<?xml version=“1.0” encoding=“UTF-8”?>
<xsl:stylesheet version=“1.0”
xmlns:xsl=“http://www.w3.org/1999/XSL/Transform”>
<xsl:template match=“/”>
<html>
<body>
<h2>Contract of <xsl:value-of select=“Calendar/ResourceID”/></h2>
<table border=“1”>
<tr bgcolor=“#9acd32”>
<th>Order_ID</th>
<th>Workflow_ID</th>
<th>ActivityNumber</th>
<th>StartTransition</th>
<th>EndTransition</th>
<th>Start_Year</th>
<th>Start_Month</th>
<th>Start_Day</th>
<th>Start_Hr</th>
<th>Start_Min</th>
<th>Quantity</th>
</tr>
<xsl:for-each select=“Calendar/EstablishedContract/Contract”>
<tr>
<td><xsl:value-of select=“Order_ID” /></td>
<td><xsl:value-of select=“Workflow_ID” /></td>
<td><xsl:value-of select=“ActivityNumber” /></td>
<td><xsl:value-of select=“StartTransition” /></td>
<td><xsl:value-of select=“EndTransition” /></td>
<xsl:for-each select=“WorkingTime/StartTime”>
    <td><xsl:value-of select=“Year”/></td>
    <td><xsl:value-of select=“Month”/></td>
    <td><xsl:value-of select=“Day”/></td>
    <td><xsl:value-of select=“Hr”/></td>
    <td><xsl:value-of select=“Min”/></td>
</xsl:for-each>
<td><xsl:value-of select=“Quantity”/></td>
</tr>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Hsieh, F.-S. A Dynamic Context-Aware Workflow Management Scheme for Cyber-Physical Systems Based on Multi-Agent System Architecture. Appl. Sci. 2021, 11, 2030. https://0-doi-org.brum.beds.ac.uk/10.3390/app11052030

AMA Style

Hsieh F-S. A Dynamic Context-Aware Workflow Management Scheme for Cyber-Physical Systems Based on Multi-Agent System Architecture. Applied Sciences. 2021; 11(5):2030. https://0-doi-org.brum.beds.ac.uk/10.3390/app11052030

Chicago/Turabian Style

Hsieh, Fu-Shiung. 2021. "A Dynamic Context-Aware Workflow Management Scheme for Cyber-Physical Systems Based on Multi-Agent System Architecture" Applied Sciences 11, no. 5: 2030. https://0-doi-org.brum.beds.ac.uk/10.3390/app11052030

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop