1. Introduction
The term Cyber-Physical Systems (CPS) was introduced in [
1] to refer to the paradigm that supervises, manages and controls entities in the physical world through the use of cyber world models. The widespread use of the Internet of things (IoT) as well as relevant Information and Communication Technologies (ICTs) have encouraged the adoption of the CPS paradigm by manufacturers [
2,
3]. The CPS for manufacturing systems are referred to as Cyber-Physical Production Systems (CPPS) [
4]. A five-level classification of CPPS according to the level of integration was discussed in [
5]. These five levels include the Connection level, Conversion level, Cyber level, Cognition level and Configuration level. This classification was extended to CPPS applications in [
6].
The Supervisory Control and Data Acquisition (SCADA) system in CPPS can access the real-time data from sensors based on the IoT infrastructure. The SCADA system in CPPS may provide the features of Connection level, Conversion level, Cyber level, and Cognition level services in CPPS, depending on the implementation. Rich accessible real-time data from sensors have several implications for managers and workers and open the door for the creation of many potentially innovative context-aware applications [
2]. For example, CPPS enable managers to monitor and supervise the status of production activities and operations at their fingertips. For workers on the shop floor in CPPS, real-time data provide feedback information to guide their operations. The widely accessible real-time data enable and facilitate the development of context-aware applications for CPPS. Context-aware applications for CPPS make it easier for entities on the shop floor in CPPS to acquire contextual information at the point of need. Therefore, the development of context-aware applications for CPPS is an important research area in the literature [
2,
3,
4].
In ICTs, context awareness is a property with which computers or applications can both sense and react based on the environment. Context awareness refers to the capability to consider the situation of entities [
7]. Therefore, a context-aware application should be aware of the situation of entities in the system. Situation awareness refers to the perception of an environment and relevant events to comprehend the current situation and predict its future status [
8]. CPPS aims to fulfill the order requirements by meeting the due date. However, due to the complex production processes and interactions between entities in CPPS, CPPS may enter undesirable states in which all or part of the production activities are in waiting states or blocked due to the resources not being allocated properly. Therefore, situation awareness in CPPS includes two properties: deadline awareness and future states awareness. These two situation awareness properties should be considered in the development of an effective context-aware application for CPPS.
Existing studies on context-aware applications for CPS primarily focus on the generation of contextual information for entities in CPS [
9]. The challenge of attaining situation awareness in CPPS is not addressed. As a result, although the real-time data are readily available to managers and workers in CPPS, managers and workers cannot respond to the environment efficiently without an effective decision support tool. As a result, managers and workers in CPPS cannot make the right decisions and perform the operations as needed in the CPPS to meet customers’ order requirements. Motivated by this need, this paper attempts to develop the theory to analyze the situation of CPPS in terms of deadline awareness and future states awareness to support decision makers and generate contextual information in CPPS. The goal of this paper is to realize the situation awareness of context-aware applications for CPPS. The complexity of developing an effective context-aware application depends on the complexity of identifying the “context” and analyzing the “situation” of the entities in a system. For CPPS, “context” is equivalent to the current states of entities, whereas “situation” is relevant to the evolution of future states. The complexity of analyzing the “situation” is much greater than the complexity of identifying the “context” of entities in CPPS. Therefore, we focus on the theory of analyzing the “situation” of CPPS to pave the way for the development of context-aware and situation-aware applications for CPPS.
In scientific studies, researchers tend to propose a new solution method based on the knowledge from the relevant literature instead of reinventing the wheel. Reinventing the wheel is only necessary when there is no one that can meet the requirements. The strategy of borrowing existing models and tailoring them to fit the requirements of studies is common in scientific research. In this paper, we adopt a class of Petri nets as the model of CPPS. Petri nets were invented by Carl Adam Petri to describe chemical processes [
10]. Ramchandani borrowed the Petri net model invented by Carl Adam Petri and extended it to a timed Petri net [
11] by considering the time factor (which was not considered in the original Petri net model). In a timed Petri net, the time it takes to fire a transition is described by a delay. Another researcher, Merlin, also borrowed the Petri net model invented by Carl Adam Petri and extended it to a time Petri net [
12] by considering the time factor in the Petri net in a different way. In a time Petri net, a transition can only be fired with a specific time interval since it is enabled. In terms of the model used in this paper, we borrow characteristics from the existing discrete timed Petri net model in the literature from [
13]. The way to discretize time is similar to the one used by Lefebvre and Daoui in [
14]. In terms of the solution methodology in this paper, we propose a new solution approach without reinventing the wheel. The model used in this paper extends the class of deterministic timed Petri nets in [
13] by allowing more complex resource sharing patterns in CPPS. In this paper, we define the problems relevant to the situation awareness of CPPS and develop the theory needed to lay a foundation for achieving situation awareness of CPPS, and for developing deadline-aware and future states-aware applications in CPPS. We illustrate the computational feasibility of our approach by presenting our computational experience based on experiments of the proposed method to analyze the situation of CPPS.
The contributions of this paper are summarized as follows: (1) the conceptualization of deadline awareness and future states awareness of CPPS, (2) a formulation of the deadline awareness problem and future states awareness problem of CPPS, (3) an optimization approach to the deadline awareness problem and future states awareness problem of CPPS and (4) a computational complexity analysis and verification based on the results. The problem addressed in this paper is obviously different from the existing studies of context-aware applications for CPPS. Several concepts are proposed in this paper, including deadline awareness and future states awareness based on a class of discrete timed Petri net models. The time factor and deadline awareness issues addressed in this study are not studied in the context-aware workflow management method proposed in [
15,
16]. The discrete timed Petri net model used in this paper is also different from the temporal reasoning time interval model in [
16]. This study extends the method proposed in [
9,
13] to generate contextual information by exploiting the discrete timed Petri net models for CPPS.
In terms of the use of Petri nets in context-aware applications, in this paper, we adopt Petri nets as a tool to generate control policy instead of using Petri nets as models for the evaluation of performance [
17]. This paper focuses on achieving the deadline awareness and future states awareness of CPPS based on a class of discrete timed Petri nets. This is different from the study [
18] that uses Petri nets in the modeling of a context-aware Human-Computer System. The research problem addressed in this paper concerns decision making in CPPS which is different from the literature on Petri net decision-making modelling for cloud service composition in [
19].
The remainder of this paper is organized as follows. A review of the related literature is provided in
Section 2. We state the situation awareness problem of CPPS in
Section 3 and present the problem formulation in
Section 4. Our approach to solving the situation awareness problem is presented in
Section 5. Results obtained based on experiments of the proposed method and discussion are reported in
Section 6 and
Section 7, respectively. We conclude this paper in
Section 8.
2. Literature Review
Context-aware computing technologies refer to the use of sensor, information and communication technologies to sense an environment and adapt the behaviors of applications and devices accordingly, in order to provide the relevant information at the point of need for users [
20]. To understand context-aware computing technologies, the meaning of “context” should be clarified. There are many definitions of the word “context” as mentioned by Alegre et al. in [
21]. However, there is no consensus on the definition of the word “context” [
22]. Despite this fact, Dey gave a definition of the word “context” as “any information that can be used to characterize the situation of an entity” [
23]. This definition is easy to understand and has been widely accepted in the literature. Context-aware computing relies on the use of contexts. With the advancement of sensor, information and communication technologies, more and more contexts can be accessed and used in the development of context-aware applications. These contexts include time context, location context, environment context, device context and user context, among others [
24]. The prevailing Internet of Things have created innovative research issues and application areas in context-aware computing. For example, the study of [
25] presents a survey of context awareness issues on movement and activity tracking, and localization and environmental sensing for mobile platforms. Recent development of context-aware computing for guidance support in disaster evacuation can be found in the survey paper [
26]. The application of context-aware computing technologies in recommendation systems has been a hot area of research in recent years. The study [
27] provides a review of the state-of-the-art techniques for context-aware recommendation systems. With the availability of real-time sensor data, this enables the use of time context and environmental context in the development of context-aware scheduling applications. Hence, context-aware scheduling is an important research area [
28]. Recently, a study was conducted on the methodology to support the realization of emerging context-aware social-technical applications from conception, design, and development, through to evolution, based on an activity theory-based approach [
29].
The design of context-aware applications must consider the factors of time, location and activities of users. Therefore, time, locations and activities are the basic contextual elements in context-aware computing technologies. A concept directly relevant to context-aware computing is awareness. Awareness refers to the state of being conscious of something. It also refers to the ability to perceive, feel, or be cognizant of events [
30]. Despite extensive studies on context-aware computing in the literature, there are only a few studies that are relevant to the situation awareness properties of CPS. These include the study of [
9] on context-aware CPS and the study of the impact of resource failures on the operation of CPS [
10]. Although CPPS can be viewed as a special class of CPS, some of the characteristics of CPPS are different from CPS. The way in which resources are shared among different workflows in CPPS is different from that of CPS. This calls for a study on the situation awareness of CPPS. In the context of CPPS, situation awareness includes two elements: deadline awareness and future states awareness. These two situation awareness properties should be considered in the development of an effective context-aware application for CPPS. In this paper, we develop a theory to lay the foundation for situation awareness of CPPS and pave the way for deadline-aware and future states-aware applications in CPPS.
To achieve these goals, the characteristics of CPPS should be studied first. The review paper by Napoleone et al. provides an in-depth survey of state-of-the-art CPPS literature [
31]. In [
31], several characteristics of CPPS were highlighted to develop a solution methodology. Among these characteristics, the ability to deal with complexity and heterogeneity in CPPS is essential. To deal with complexity and heterogeneity in CPPS, proper tools and methods should be used. In [
32], Harrison et al. reviewed the engineering approaches and tools available for CPPS. Selection of a proper modeling language is needed to handle complexity and heterogeneity in CPPS.
To cope with the changing requirements in the business environment of CPPS, the concept of Model Driven Architecture (MDA) was proposed [
33]. The MDA approach to the development of software systems focuses on platform-independent models instead of the platform dependent models of an application. A generic transformation procedure is then applied to transform platform-independent models into platform dependent models for the target application. The Unified Modeling Language (UML) and the Systems Modeling Language (SysML) are two popular modeling languages that can be used with the MDA approach. UML is a widely accepted and general-purpose modeling language in software engineering [
34]. As an industrial standard, UML provides a standard way to visualize the design of software systems. In [
35], Thramboulidis proposed a model driven approach for control and automation software based on UML. SysML is a general-purpose architecture modeling language for Systems Engineering applications [
36]. The application of SysML to support embedded systems engineering can be found in [
37]. In [
38], a model and simulation for mechatronic systems with SysML was studied. Despite the powerful modeling tools provided by UML and SysML, they lack the support to address the situation awareness issues of systems. To analyze the situation awareness of systems, a formal modeling language that supports the analysis of system dynamics should be used.
Petri nets and different variants of Petri nets are graphically oriented and formal modeling languages that have been used for the simulation, verification and analysis of software systems. According to Wikipedia, Petri nets were invented to describe chemical processes in August 1939 by Carl Adam Petri [
39]. In the literature, the Petri net model was documented in the dissertation of Carl Adam Petri in 1962. Since its invention, the Petri net model has been widely applied in different problem domains, including the computer, communication manufacturing and chemical sectors [
40]. The adoption of Petri nets as the platform-independent models in MDA has been studied in [
15]. In [
15], the authors adopted untimed Petri nets as the platform-independent models to develop context-aware workflow systems. However, the time factor is not considered in [
15]. In the literature, many variants of Petri net models considering time semantics have been proposed to deal with timing issues in real world systems. The paper [
41] by Zuberek surveys several variants of timed Petri nets proposed in the literature. There are different ways to model the time factor in timed Petri nets. For example, Zuberek introduced a class of deterministic timed Petri nets by specifying a fixed time interval for each transition [
42]. In [
43], Sifaki proposed a class of timed Petri nets by specifying a fixed time interval for each place in [
38] to evaluate performance. Tokens are considered to be unavailable during the specified time interval of the corresponding place. Another way to model the stochastic nature of firing time is to assign a random variable to represent the firing time of each transition. This class of timed Petri nets are called Stochastic Petri Nets (SPN) [
44]. In a continuous time SPN, the transitions are fired based on transition rates and the firing time is exponentially distributed. In a discrete time SPN, the transitions are fired based on the specified conditional probabilities and the firing time is geometrically distributed [
45]. SPNs are primarily used in performance evaluation whereas deterministic timed Petri nets are used for scheduling or the control of systems. In this paper, we adopt a class of deterministic timed Petri nets as the model of CPPS to formulate the Deadline Awareness Problem and Future States Awareness Problem.
In this study, we consider a class of deterministic timed Petri nets by borrowing the timed Petri nets that were invented by Ramchandani [
11] and tailoring them properly to Discrete Timed Petri Net (DTPN) models based on the discretization of time. The way to discretize time is similar to the one used by Lefebvre and Daoui in [
14]. The model used in this paper extends the class of Petri nets in [
13] by allowing more complex resource sharing patterns in CPPS. We propose a transformation method to solve the problem. We conduct experiments to study the computational feasibility of the proposed method.
3. Situation Awareness Problem in CPPS
Due to the complex workflows and heterogeneous resources involved in the operation of CPPS, identification of the “situation” of CPPS is a challenging problem as “situation” is characterized by evolution of the future states of the system. To concretely characterize the “situation” of CPPS, we first clarify the objectives of CPPS and factors that may impact the achievement of these objectives. Based on the objectives of CPPS and factors that may impact on the achievement of the objectives we can state the situation awareness problem for CPPS.
CPPS aims to produce products to meet the order requirements of customers. Therefore, the objectives of CPPS are to fulfill order requirements. Each order is specified by product demand and the associated deadline for delivering the requested products. Therefore, the “situation” of CPPS is often linked to whether the deadline of an order can be met. In this paper, we introduce the term “deadline awareness” to refer to the situation about whether the deadline of an order can be met.
In CPPS, due to resource sharing and contention between production processes, the systems may enter undesirable states in which all or part of the production activities are in a waiting state or blocked, due to the resources not being allocated properly. To characterize whether a CPPS can avoid such undesirable states, we introduce another term (“future states awareness”) to refer to the situation about whether undesirable states can be avoided and the target state can be reached.
Based on the terms defined above, we state the following situation awareness problems.
Deadline Awareness Problem: Given a CPPS and an order, determine whether the order can be fulfilled by the deadline.
Future States Awareness Problem: Given a CPPS and an order, determine whether undesirable states can be avoided and the target state can be reached.
To address the problems stated above, we need to formulate these problems formally. We introduce proper models for CPPS first. We then formulate the above problems based on the models for CPPS. Finally, we develop the theory for solving these problems.
In order to analyze the properties of CPPS, a suitable modeling tool must be used to construct the model of CPPS. Several requirements of modeling tools must be satisfied. These requirements include the capabilities to model the operations, events and timing of the entities in CPPS. The modeling tool selected to model CPPS should be able to capture interactions between entities such as the synchronization of resources and operations, and concurrent and asynchronous events in CPPS. In particular, the modeling tool should be easy to learn and use. In addition, there must be analysis methods or theory accompanied with or developed for the selected modeling tool to facilitate analysis of the properties of CPPS. In computer science, several tools have been proposed and used to build models for systems. Among these modeling tools, Petri nets are a graphical modeling language that satisfy the requirements discussed above.
Considering time in Petri nets poses challenges for the analysis of Petri nets with time semantics in terms of time and space complexity. Many researchers contributed a lot by proposing more efficient methods to tackle the complexity issue. Different methods of analyzing time in time Petri nets or timed Petri nets have been proposed in the literature. In the early work [
46] of Berthomieu and Menasche, the concept of State Class was first proposed in conjunction with an algorithm for the enumeration of State Classes for the analysis of Merlin’s time Petri nets. A State Class graph preserves markings and traces with finite representations of states. It enables the analysis of time Petri nets. The concept of State Class was also used in the work [
47] by Berthomieu and Diaz to verify time dependent systems. Although the State Class graph is suitable for reachability analysis, the branching structure of the state graph is not preserved. Berthomieu and Vernadat proposed the graph of atomic classes which preserves branching structure [
48]. In the work [
49], a Timed Aggregate Graph was proposed by Klai et al. to abstract the reachability state space of a time Petri net. In the Timed Aggregate Graph, the nodes are referred to as aggregates which represent grouped sets of states with associated time information encoded inside. Klai et al. illustrated the advantage of the Timed Aggregate Graph by experimental results. As the approaches were proposed primarily for model checking and the verification of systems, Lefebvre proposed a Timed Extended Reachability Graph to encode markings and temporal constraints, as well as the earliest firing policy for control and scheduling issues [
50]. Lefebvre proposed an Approximated Timed Reachability Graph in [
51] to reduce the complexity of the Timed Extended Reachability Graph by aggregating the states in which the markings are equal and the temporal constraints are not far from each other. A common property of the methods mentioned above is the need to explore state space or reduced state space by the aggregation of states to reduce complexity. However, all these methods suffer from state explosion problems as the complexity for constructing or exploring the variants of reachability graphs (State Class graphs or Timed Extended Reachability Graphs) grows exponentially with the problem size. This motivates us to develop a novel method for a subclass of nets without constructing or exploring any variants of reachability graphs.
In the next section, we introduce the way to construct models for CPPS based on a class of Petri nets. We then formulate the problems stated in the previous section based on the models constructed for CPPS.
4. CPPS Models
In this paper, to study the Deadline Awareness Problem and the Future States Awareness Problem of CPPS, we adopt a variant of timed Petri nets called discrete timed Petri nets (DTPN) to construct models for CPPS. We follow a bottom-up approach to building models for CPPS by constructing individual models of the entities in CPPS first and then constructing the overall model for CPPS, taking into account the interactions between resources and operations in the workflows. The models of individual entities in CPPS are divided into two categories: task subnets and resource subnets. To present the modeling of CPPS, we list the symbols and notations used in this paper in
Table 1.
A CPPS consists of different types of entities, including resources and tasks. We propose task subnets and resource subnets for different types of resources and tasks. Task subnets and resource subnets in CPPS are described by a class of discrete timed Petri nets (DTPN) [
9]. Resources and tasks in a system are represented by tokens in a DTPN. The number of tokens in each place can be represented by a vector called a marking. An event in a system is called a transition in a DTPN. The occurrence of an event changes the marking of a DTPN. A DTPN evolves from the initial marking due to the firing of transitions. In the DTPN model, we assume the time horizon is divided into
periods and the duration of each period is
. The choice of
depends on its application. Note that the method proposed in this study works regardless of the choice of
so long as
> 0. The value of the firing time of a transition is described by
, where
and
is the set of nonnegative integers. Note that continuous time Petri nets are limiting cases of the discrete time Petri nets as
.
A formal definition of DTPN is as follows.
Definition 1. We assume that the time horizon is divided intoperiods and the duration of each time period is. A DTPN is a five-tuplewhich consists of a set of places:, to describe the states, a set of transitions;, to represent events, flow relation;, to characterize the connection between places and transitions, an initial marking;, to describe the initial state and the firing time of a transitionis, where, is the set of nonnegative integers andis real.
To describe the dynamics of a DTPN, we need the following definition about transition firing.
Definition 2. We useto denote the set of input places of transitionand useto denote the set of output places of. If, transitionis enabled under marking. An enabled transitioncan be fired. A transitionselected for firing in periodunder a control action will be fired at the beginning of periodand the firing will be completed at the end of the designated period. After firing an enabled transition, the number of tokens in each input place inwill be reduced by one and the number of tokens in each output place inwill be increased by one.
Figure 1a is an example of DTPN, where
and
.
Definition 3. A resource subnetfor a type-resource is a discrete timed Petri net= (,,,,) that consists of a number of activities of type-resources, where and the functionis used to specify the firing time of each transition in. Each activity is represented by a circuit [
36]
in which a number of transitions and places forms a closed loop. A resource subnet has an idle state place denoted by . The set of all idle state places of resources is denoted by = .
Without loss of generality, we will also refer to the type- resource by whenever it is clear from the context. Figure 1a,b show two resource subnets,
and
. There are four circuits,
,
,
and
in
. There are two circuits,
and
in
.
Definition 4. The capacity of type-resources in periodis denoted as, where=for all, whereis the time horizon.
A CPPS may process different types of tasks. Let denote the set of task types. Each task consists of a number of operations. Each operation can be specified by transitions. A type of task is described by a task subnet. Therefore, the task subnet considered in this study consists of a sequence of transitions. Let denote the set of transitions in a task subnet. A transition may involve multiple resources.
Definition 5. A typetask subnet,, is a discrete timed Petri net which consists of a sequenceoftransitions in the setand a sequence,, ,…,ofplaces in, whereis a function that specifies the lower bound of the firing time of each transition. The first transitionis a fictitious transition that represents the release of a task. The transitionrepresents completion of the final operation of the task. The last transitionis a fictitious transition that represents the removal of a completed task.
Note that the set of transitions in requires allocation of resources, i.e., and . A transition involving multiple resources is characterized by . The number of resources required to fire transition , where , is denoted by .
Figure 2a,b show two task subnets,
and
.
To convey the idea to construct the model, we introduce a composition operator “
” to merge two or more DTPN models through common transitions, places and arcs. There are many composition or synthesis methods in the literature (e.g., [
13,
52,
53,
54,
55]). These include composition by merging transitions or places. Several operations that preserve the liveness property of the composed nets have been proposed in [
52,
53]. These operations include the fusion of a series of places or transitions and parallel places or transitions, and the elimination of self-loop places or transitions. Some of these studies focus on the synthesis of Petri nets for manufacturing systems (e.g., [
13,
55]). For this paper, the composition operation is used to capture the synchronization of resources and workflows. Therefore, the composition operation used in this paper is the same as the one used in [
13]. It is defined as follows.
Definition 6 ([13]). Given two discrete timed PNs,= (,,,,) and= (,,,,), the operatorto combineandis defined as follows:
= (,,,,,), where,,,,and.
Although the composition operation is the same as the one in [
13], the properties and structure of the resulting models obtained by the composition operation are different from the ones obtained in [
13]. The DTPN models considered in this paper allow more complex interactions patterns between resources and tasks. Hence, the liveness property of the composed DTPN models may not be preserved (This point is discussed in
Section 4 of this paper). This is the reason why a control policy is needed to maintain the liveness property of the composed DTPN models.
Definition 7. A nominal model is described by a discrete timed Petri net =, whereand== (,,,,), where. The state ofis called a marking and it is represented by a vector.
To make it clear for readers to understand the differences between the models used in this paper and the one proposed in [
13], we illustrate their differences by an example.
Figure 3b is a model that is similar to the one proposed in [
13]. Note that the model in
Figure 3b only allows at most one resource involved for each transition. By contrast, there are two types of resources involved in transitions
,
,
and
in the model of
Figure 3a. This is due to the synchronization of operations with the two resources in CPPS. Obviously, this means that the model proposed in this paper allows more complex interactions patterns between resources and tasks. That is, the model proposed in this paper extends the one proposed in [
13]. However, this powerful modeling capability should be used in conjunction with a proper control method. Note that the overall model in
Figure 3b will not evolve to any undesirable state no matter what sequence of transitions is fired. However, the overall model in
Figure 3a may evolve to the circular waiting state in
Figure 4. In
Figure 4, all resources are held by tasks in the production processes and wait for the resources to be released. Therefore, the development of a method to supervise and control the usage of resources is an important issue.
Before defining the control policy, we first define the initial marking and the final marking of the CPPS model. The initial marking is set according to the order requirements. The requirements of an order can be described by product demands, , where and deadline . The initial marking (state) and final marking (state) is defined as follows.
Definition 8. Suppose the order requirements for type-j tasks is . The number of tokens in the first placeunder the initial markingof the type-j task subnetis, where.
The final marking of the CPPS model is defined as follows.
Definition 9. For a task subnetin the final statein which the order requirements for type-j tasks is fulfilled, the number of tokens in the last placeof the final marking is.
Definition 10. Let r denote the idle place of type-r resource subnet. The final state of the type-r resource subnetsatisfies=. That is, resources are in an idle state after processing the required tasks.
Based on the initial states of tasks and resources, we define the CPPS model in the initial state as = , where and = =. Based on the final states of tasks and resources, we define the CPPS model in the final state as = , where and GR = = (PR, TR, FR, , μR).
In the CPPS model , a controlled transition is a transition that requires an allocation of resources to be fired. Let , where , be the set of controlled transitions in . We define a control action as a vector in that specifies the number of times each transition in to be fired concurrently. A sequence of control actions {} is called a control policy . The behaviors of under a control policy is denoted by .
Definition 11. A CPPS modelunder a control policyis represented by a controlled DTPNand is abbreviated as, whereis a control policy that is defined by a mapping:→that generates a sequence {} of control actions for.
A control action
is a vector in
that specifies the number of times each transition in
to be fired concurrently. Suppose
= {
,
,
,
,
,
}. For the marking in
Figure 3a, the control action
= [2 0 0 0 0 0] can be applied to fire transition
twice. A sequence of control actions to be executed in the CPPS model define a control policy. Not all control policies can preserve the liveness property of the system. For the example in
Figure 3a,
= [2 0 0 0 0 0],
= [0 2 0 0 0 0] and
= [1 0 0 1 0 0] are three control actions that can be applied consecutively from the marking in
Figure 3a. Applying the sequence of control actions
,
and
will fire
three times, fire
two times and fires
one time. The sequence of control actions
,
and
define a control policy. However, this control policy brings the CPPS to an undesirable circular waiting situation in
Figure 4. Therefore, generation of the control actions that can maintain the liveness of the CPPS model is an important issue. The Context-Generation Algorithm for CPPS to be introduced in
Section 5.3 serves to generate the sequence of control actions to be executed.
When an order is released to CPPS, processing of the order can be represented by the evolution of the states of the model of CPPS under a control policy. The requirements of an order can be described by product demands, , where , and deadline , where the deadline is specified by a period in the time horizon .
In the model of CPPS, a marking represents the state of the system. Before processing the given order, the CPPS is in its initial state with the initial marking
. For the given order requirements, the number of different types of products to be produced to fulfill the product demands of the order can be represented by a final marking
in the model of CPPS. Whether the order deadline can be met can be calculated by determining whether the marking
can be reached from
by the deadline
. Throughout the evolution from
, the CPPS may visit undesirable states. An improper control policy may bring the system to an undesirable state under which some or all the transitions can no longer be fired.
Figure 4 shows an example of an undesirable state in which transitions can no longer be fired, with the exception of
and
. There is a research issue and question that needs to be addressed: can the CPPS model reach the target (final) state by the deadline without visiting any undesirable state? To answer this question, we formulate the Deadline Awareness Problem and the Future States Awareness Problem.
Based on the model of CPPS, we formulate the Deadline Awareness Problem. As the Deadline Awareness Problem is to determine whether the requirements of a given order can be fulfilled by the order deadline, the Deadline Awareness Problem is to determine whether final marking can be reached by the deadline . Formally, this problem can be stated as:
Deadline AwarenessProblem
Given the model of a CPPS with an initial marking , determine whether can be brought to the target marking from by the deadline under some control policy, where and the deadline are specified by the order requirements.
For the target marking and the deadline corresponding to the given order requirements, the Future States Awareness Problem can be formulated as follows.
Future States AwarenessProblem
Given the model of a CPPS with an initial marking , determine whether there exists a control policy to bring to the target marking without visiting any undesirable states, where the marking is the marking corresponding to the given order requirements.
7. Discussion
In this paper, we propose the theory to lay a foundation for developing context-aware applications in CPPS. Two context awareness properties are crucial for the development of context-aware applications in CPPS. One is deadline awareness and the other is future states awareness. We develop a theory to pave the way for deadline-aware and future states-aware applications in CPPS based on Discrete Timed Petri Nets. The theory and algorithms developed in this paper provide an approach to determining whether the deadline of an order can be met without visiting any undesirable states. Accompanying the theory presented in this paper is an example to illustrate the application of the theory.
As computational feasibility is an important factor in the development of context-aware applications for CPPS, analysis of computational complexity and verification by experiments are important steps to illustrate the practicality of the theory for solving real problems. Therefore, we conduct an analysis of the decision problem and conduct experiments to study the computational feasibility of the proposed method. We study how the CPU time grows with the scale of the problem. In CPPS, the problem size parameters include the maximal number of operations in the task subnets, the time horizon and the number of task types. These problem size parameters correspond to the parameters , and in this paper.
The algorithm to construct JSTN is of polynomial complexity (according to Property 2: The complexity to construct the Joint Spatial–Temporal Network by applying the Joint Spatial–Temporal Network Construction Algorithm is . A lower bound on the complexity of solving NOP, which is defined on JSTN, is according to Property 3. Overall, a lower bound on the complexity of constructing JSTN and solving NOP is of polynomial complexity.
To study the influence of each parameter on the CPU time, we perform many experiments by changing each parameter and recording the results. Our experimental results show that the CPU time grows approximately linearly with
and grows polynominally with
and
. These results are consistent with the projection of the polynomial lower bound
on the complexity of solving NOP. Based on our experimental results, we illustrate the consistency between the results and our expectations. This also indicates the practicality of the proposed theory in solving real problems in CPPS.
Figure 7 through
Figure 9 includes the construction of JSTN and solving of NOP. Note that markings of CPPS are neither embedded nor included in the construction process of JSTN. This avoids the state explosion problem.
In the literature, different approaches were proposed to tackle the complexity issue of time Petri nets and timed Petri nets. Berthomieu et al. [
46,
47,
48] and Klai et al. [
49] proposed different methods to reduce complexity in the analysis of time Petri nets. Lefebvre et al. proposed different methods to reduce complexity in the analysis of time Petri nets [
50,
51]. In terms of the models used, the nets considered by all the works mentioned above were general, whereas a subclass of nets is considered in our paper. Even though only a subclass of nets is considered, the subclass of nets considered in this paper can be used to model the production processes commonly used in the manufacturing sector. As the net structure considered in the works mentioned above is general, a variety of approaches such as the construction of a State Class Graph, Timed Aggregate Graph, Timed Extended Reachability Graph and Approximated Timed Reachability Graph were proposed to reduce complexity. However, all these methods suffer from state explosion problems as the complexity of constructing and exploring variants of reachability graphs grows exponentially with the problem size. As the models used in this paper belong to a subclass of nets, we developed a more efficient algorithm based on the proposed JSTN based method by exploiting the net structure. The proposed JSTN based method does not rely on the explicit construction of reachability graphs, State Class Graphs or Timed Extended Reachability Graphs or their variants. As a result, we can identify a lower bound on the complexity of constructing JSTN and solving NOP, which is of polynomial complexity.
The problems addressed in this study are different from the ones in the literature. Although there are many approaches to context-aware workflow systems in [
57], there are only a few studies on the development of context-aware applications and services based on different variants of Petri nets, e.g., [
58,
59,
60]. In particular, existing studies on modeling, analyzing and generating time-relevant contextual information for context-aware applications and systems are limited, e.g., [
9,
13,
15,
61]. Issues regarding the achievement of situation awareness, including deadline awareness and future states awareness in Cyber-Physical Production Systems is less explored. This paper attempts to bridge this gap by expanding the preliminary results reported in [
62] through developing relevant theory and algorithms to address situation awareness problems of CPPS, and conducting experiments to study the feasibility of the proposed approach. The results of this study confirm the feasibility of the proposed method.