# A Theoretical Foundation for Context-Aware Cyber-Physical Production Systems
## 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 [PERSON] and [PERSON], the concept of State Class was first proposed in conjunction with an algorithm for the enumeration of State Classes for the analysis of [PERSON]'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 [PERSON] and [PERSON] 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.