## 4 The Establishment of Networks
### Monitoring Network  
**Definition 1**. : _The main function of the monitoring network is to reflect the entity state and to adopt unit-level modeling. It is usually a six-tuple_ EDSPN _model_  
\[\Sigma_{mnt}=(P,T;F,W,M_{0},\lambda). \tag{1}\]  
**Remark 1**. : \(P=\{p_{1},p_{2},\ldots,p_{a}\}\) _is the place set. DMPN divides states and resources into places. When a place represents a resource place, the number of black dots indicates the number of such resources, which are called tokens. \(T=T_{i}\bigcup T_{t}=\{t_{1},t_{2},\ldots,t_{m}\}\bigcup\{t_{1},t_{2},\ldots,t_{n}\}\) is the transition set. Among them, \(T_{i}\) is the immediate transition, \(T_{t}\) is the time transition, and \(\tau_{n}\) represents the firing time of transition \(t_{n}\). Two different states are transformed by some kinds of changes and are divided into transitions. \(F\) is the flow relationship, which is represented by an ordered pair such as \((p_{1},t_{1})\) means from \(p_{1}\) to \(t_{1}\). The place set and the transition set are the basic components of the directed network from which the flow relation is constructed. Therefore, the semicolon \";\" is used to separate \"S, T\". The system behavior of Petri net is represented by the change of state or the flow of resources. This change or flow is reflected by the flow relationship and is represented by arcs. \(W\) is the weight function on \(\Sigma_{mnt}\), which represents the number of tokens required when the transition occurs. By default, it is 1 when not marked. \(M_{0}\) is the initial marking on \(\Sigma_{mnt}\). It shows the tokens distribution of Petri net in the initial state. \(\lambda=\{\lambda_{1},\lambda_{2},\ldots,\lambda_{n}\}\) is the set of average firing rates of transitions. It means the average number of firings per unit time when enabled. The unit is the number of times per unit time._  
The following is the method of establishing a monitoring network part:  
1. Mapping places: A variable table \(X_{\text{PLC}}\) is maintained in PLC, and the principle of establishing the table is: All the Boolean variables \(X_{mnt}\) needed to establish the model,  
Figure 6: Monitoring and control logic of DMPN. the intermediate variables \(X_{Ptemp}\) needed by \(X_{mnt}\) and the variables \(X_{dp}\) that need to be displayed and monitored by the host computer are calculated. Then, all the variables in \(X_{\text{PLC}}\) are imported into the DView variable table to become \(X_{\text{DView}}\). At this point, the same table as in PLC is maintained in the host computer software DView: that is, \(X_{\text{PLC}}=X_{\text{DView}}\). The functions of the two tables are different. In particular, the variables in \(X_{\text{PLC}}\) are data sources, mainly from the field environment, while the variables in \(X_{\text{DView}}\) are mainly used to monitor and control the system. It is worth noticing that \(\forall x_{\text{DView}}\in X_{mnt}\) is the place of \(\Sigma_{mnt}\); that is, \(X_{mnt}=P\). At last, all variables are imported in DView and variable groups are divided according to the actual situation. The imported variables are in DView. 2. The relationship of the state transition is analyzed from the actual operation condition, and the flow relationship is temporarily from place-to-place. For this purpose, some scholars have researched how to map the state relationship automatically: for example, using log-mining technology to describe the state [41; 42] and so on. Nevertheless, this study does not discuss this in depth because this is not the point in question. 3. Obtain transitions and the rates of time transitions: In Petri net, it is stipulated that a place cannot flow to a place but can only flow to a transition. Thus, transitions need to be inserted between places. The principles for inserting transition are: The immediate transition is inserted between two places with no practical meaning, and the time transition is inserted between places that have actual actions that can be defined.