Confusion Control in Generalized Petri Nets Using Synchronized Events

1School of Computer and Software Engineering, Xihua University, Chengdu 610039, China 2School of Electro-Mechanical Engineering, Xidian University, Xi’an 710071, China 3Institute of Systems Engineering, Macau University of Science and Technology, Taipa, Macau 4Industrial Engineering Department, College of Engineering, King Saud University, P.O. Box 800, Riyadh 11421, Saudi Arabia 5Mechanical Engineering Department, Faculty of Engineering, Helwan University, Cairo 11732, Egypt


Introduction
Fault detection and avoidance through external control are important problems in discrete event systems [1][2][3][4][5].A fault with the loss of conflicting information in a system should be avoided and controlled, which may lead to incomplete decision-making processes and confused implementation.The features of a fault are called confusions that occur frequently in a system with shared resources when the system is modeled by Petri nets.Petri nets (PNs) are an effective tool to model and analyze discrete event systems.Conflicts in a PN are tied to the competition for limited resources between two or more events, which usually is considered as the information interfaces between the DESs and the human decisions, for example, a switch controlled by humans or a static conflict resolution policy designed by humans [6,7].However, not all conflicts can be used for decision-making since frequent interlacements of concurrent and conflicting transitions may lead to the information loss of conflicts.In other words, confusions generate difficulties for resolution of conflicts.It is awkward to determine whether there are conflicts with integrated decision-making information from the reachability graph of a net if it contains confusions.
We illustrate the significance of this study on confusions by an example shown in Figure 1.The function of a system is concerned with "Recovery" and "Update."In Figure 1(a), a confusion arises from the interlacement between two concurrent events "Fault alarm" and "Update" and two conflicting events "Recovery" and "Update."It leads to the fact that "Recovery" cannot fire although it is expected to fire when "Fault alarm" is enabled, which is caused by the concurrent behavior between "Fault alarm" and "Update."If the behavior is always sequentially involved, that is, "Update," "Fault alarm," the conflict between "Update" and "Recovery" may never happen and the "Recovery" is missing.Furthermore, the information of the conflict containing "Recovery" is missing.Figure 1(b) illustrates another confusion in the system.The interlacement between the two concurrent events "Update" and "Ignore" and two conflicting events "Update" and "Recovery" also leads to the loss of "Recovery" since "Recovery" cannot fire when the system concurrently fires "Ignore" and "Update."Obviously, a system with confusions can cause ambiguous behavior and difficulties in system analysis.Solving the problem of confusion diagnosis means that each detected confusion should be controlled by a reasonable strategy.Hence, this study focuses on detection and control of confusions in PNs.
van der Aalst et al. take into account the existence of confusions in WF-nets and show the defects of WF-nets with confusions [10][11][12].First, the existence of confusions in a WFnet leads to a nondeterministic workflow process such that its correctness cannot be ensured.A WF-net is said to be correct if it satisfies the two properties "soundness" and being "wellstructured," which is reported by van der Aalst [12].Every reachable marking of a WF-net can terminate properly if it is sound.A WF-net that is well-structured has a number of nice properties.For example, the soundness of a WF-net can be verified in polynomial time and a sound well-structured WFnet is safe.However, the correctness depends on the existence of confusions in a WF-net.If an acyclic WF-net (no directed cycle in the structure of a WF-net) contains a confusion, it is certainly not sound and well-structured.If a WF-net with cycles contains a confusion, it may not be sound and wellstructured.Hence, we cannot determine the correctness of a WF-net if it contains confusions.
The study on occurrence nets lies in that the behavior of PNs can be interpreted by branching unfolding semantics [15].In PNs, the behavior such as sequences, concurrency, conflicts, trails, choices, and alternatives can be described and analyzed by decomposing an occurrence net into substructures given by the node relations associated with the behavior.
However, confusions cannot be described by the existing branching semantics.Hence, Smith and Haar consider the independence of events in occurrence nets and the indirect influences among concurrent events in [14,15].Furthermore, interference structural conflict clusters are developed in [15] in order to describe confusions, which belong to a kind of the substructures of occurrence nets.In the work of Smith and Haar, confusion detection and control problems are not considered.
The work of Bolton [16,17] involves the detection of confusions in both safe and unsafe nets.Truly concurrent semantics and interleaving semantics for concurrent systems are discussed, which are useful to formalize and illustrate confusions.The main difference between the two kinds of semantics is that the synchronized firing of transitions and the nondeterministic choice among the possible orders of their firing can be distinguished by using truly concurrent semantics and not the interleaving semantics.
For example, if two transitions  1 and  2 are in a PN concurrently fire, three transition firing sequences are possible, which are denoted by  1 = [ 1  2 ],  2 =  1  2 , and  3 =  2  1 , respectively.The physical interpretation of  1 in a real system is that the two events (represented by transitions  1 and  2 ) fire simultaneously.In this case, the firing of  1 and  2 is said to be synchronized.On the other hand, firing transition sequences  2 =  1  2 and  3 =  2  1 means that  1 and  2 fire sequentially.In [17], the definition of confusions in safe PNs is extended to unsafe generalized PNs, which depends on the inclusion relations of transition sets of conflicts at two markings.However, confusions in generalized PNs cannot be completely described by the definition in [17] since the transition sets of conflicts may remain unchanged although a confusion occurs in a generalized PN.
The approaches for confusion detection in [17] are based on trace theory.Furthermore, Communicating Sequential Process (CSP) model-checker is used to detect confusions.The WF-net of a business procedure is constructed to depict the logical relations among business tasks and to detect potential faults in the procedure.Confusions may occur when the implementation of the WF-net contains the operations of both conflict and concurrency.If a WF-net contains a confusion, its procedure may not be completed or the procedure performing a desired work cannot be constructed.In [13], confusion detection algorithms based on the integer linear programming (ILP) are reported.ILP methods are available owing to the Wf-net features represented in [12].This work also obtains a conclusion; that is, if an acyclic WF-system contains a confusion, it is certainly not well-structured.
ILP methods presented in [13] nether work in safe marked ordinary nets since WF-nets are a subclass of safe marked ordinary nets.In [18], a confusion detection method is developed to capture confusion subnets in a safe marked ordinary net.Furthermore, a PN system must avoid any improper firing order of concurrent transitions by a control method such that the system can be immune to detect confusions.Two confusion online control algorithms are proposed to generate a set of control policies, which can completely avoid the occurrences of confusions [18].
Confusion avoidance in a safe marked ordinary net can be considered as a problem to forbid the firing of transitions according to a control specification.The work [19] extends generalized mutual exclusion constraints (GMECs) [22,23] and proposes a class of constraints with respect to places and enabling degrees (/ constraints)./ constraints can be used to design confusion avoidance supervisors by a linear algebra method.However, / constraints are unavailable in generalized PNs.
Confusions in GSPNs are discussed in [20,21].The marking graph of a GSPN is not a stochastic process if the GSPN contains confusions, which implies that continuoustime Markov chains (CTMCs) cannot be used to analyze confused GSPNs.Generally, a classical analytical approach for GSPNs is to assume that the subnets of immediate transitions are confusion-free in order that the analysis can proceed.However, the assumption does not intrinsically solve the problem of confusions since they really exist in GSPNs.
In the literature, confusion analysis in generalized PNs is considered in [17] only.Conflict-increasing and conflictdecreasing confusions are defined in unsafe PNs, which are classified according to the change of transition sets of conflicts.However, the definition of confusions in [17] is incomplete and cannot describe all confusions in generalized PNs.On the other hand, the confusion detection method in [18] is also available in generalized PNs owing to the same confusion structures in a safe or a generalized PN.However, the confusion control policies presented in [18] cannot be appropriately enforced since conflict resolution in a generalized PN is related to transition enabling degrees that is not appearing in safe marked ordinary PNs.
This study extends the work on confusions in [17,18] by introducing the concept of information content of conflicts.The behavior of a confusion can be clearly observed by comparing the proposed information content of its conflicts in the confusion subnet.
Confusions should be prevented by a control method after captured confusions in a PN.This paper proposes a confusion control strategy in generalized PNs, which is based on external event control in synchronized PNs (synchronized PNs are proposed in [24] and developed in [25][26][27]) and based on the proposed elementary conflict resolution sequences (ECRSs).A class of synchronized PNs with the control information that is called allowable enabling degrees is introduced, in which external events are featured with desired enabling degrees of transitions and can perform a variety of dependency relations of their execution times.Any external event can be converted into a feedback control structure taking the form of PNs.The control policy refers to a group of static rules imposing restrictions on the enabling degrees and priorities of concurrent transitions in confusions.The control methods in this paper are considered for pure and bounded PNs only.
This paper is organized as follows.Section 2 introduces PNs, conflicts, concurrency, information content, and confusions in generalized PNs.Section 3 deals with the control problems of confusions.A class of synchronized PNs with allowable enabling degrees and ECRSs is proposed.Conclusions and future work are presented in Section 4.

Basics of PNs and Confusions
Section 2.1 provides the basics of Petri nets involved in the paper.More details can be found in [28].Section 2.2 introduces conflicts [2] and formalizes concurrency and confusions in generalized PNs.
The structure of a self-loop-free PN can be represented by its incidence matrix [], that is, a ||×|| integer matrix with Definition 2. A marking  of  is a mapping from  to N. () denotes the number of tokens contained in place . is marked at marking  if () > 0. (,  0 ) is called a net system or marked net and  0 is called an initial marking of .
Multisets or formal sum notations are usually used to denote markings and vectors.As a result, a marking  can be denoted by ∑ ∈ ().For example, a marking that has five tokens in place  2 and three tokens in place  4 in a net A transition   is said to be    -enabled, denoted by [(  )    ⟩, if   has enabling degree    .Note that if   is 0-enabled, it means that   is disabled.
The enabling degree    of a transition   at marking  can be considered as the possible maximal number of the firing times of the transition   at marking .Let   be a reachable marking of a PN and   denote the vector of enabling degrees of all transitions at   .For example, let  1 ,  2 , and  3 be the transitions in a PN (,  0 ) with || = 3.If they are 2-, 0-, and 3-enabled at the initial marking  0 , respectively, we have  0 = [2, 0, 1]  .Definition 9. A general conflict in a marked net (,  0 ), denoted by K  = ⟨,(K  ), ⟩, is associated with a structural conflict  = ⟨, ()⟩ and a marking  ∈ (,  0 ) such that, ∀  ∈ (K  ),  [ The number of tokens in  2 does not suffice to fire all the output transitions of  2 according to their enabling degrees.An effective conflict in (,  0 ) is also a general conflict according to Definitions 7 and 9. However the reverse is not true.For example, the general conflict shown in Figure 3 is not effective since In this paper, general conflicts are considered in confusions.
Let   ⊆  be a transition set in a net system (,  0 ) and let  ∈ (,  0 ) be a reachable marking.Notation   (  ) is used to denote the number of enabled transitions in   at marking .A transition sequence  is said to be a resolution sequence of the general conflict K  = ⟨, (K  ), ⟩ at marking  if each transition in (K  ) becomes disabled after firing the sequence , that is, [⟩  , where the marking   is called the output marking of K  by firing .
A structural conflict in a net system can produce multiple general conflicts owing to different reachable markings.For a structural conflict  = ⟨, ()⟩, the information content of the general conflict K  , denoted by (K  ), associated with  at marking  is defined as follows: where and, ∀  ∈ (),    is the enabling degree of transition   at marking .
The general conflicts associated with a structural conflict  can be compared by their information content at markings, which reflects the number of resolution sequences for the general conflicts.Note that  = 0 can lead to zero information content; that is, (K  ) = 0, which implies that  at marking  does not produce any general conflict.A general conflict K  associated with the structural conflict  in a PN (,  0 ) is said to have integrated decision-making information if there does not exist another general conflict K   associated with  in (,  0 ) such that (K   ) > (K  ).Let  = ()  denote a transition sequence in which the transition  consecutively fires  times and  = [ 1 ,  2 , . . .,   ] denotes a synchronized transition sequence in which transitions  1 ,  2 , . .., and   fire synchronously; that is, the transitions fire simultaneously.Figures 4(a) and 4(b) show two general conflicts K  = ⟨ 2 , { 1 ,  2 }, ⟩ and K   = ⟨ 2 , { 1 ,  2 },   ⟩ with the same structure at markings  =  1 +2 2 and   = 2 1 +3 2 , respectively.For the former, that is, K  , we have Furthermore, four feasible resolution sequences , and  4 = [ 1  2 ] can be observed.
Similarly, for the latter, that is, K   , we have The (K   ) = 5 implies that the general conflict K   has more resolution sequences than K  , which are Suppose that K  and K   are only two general conflicts associated with  in a PN.Then, the general conflict K   has integrated decision-making information since (K   ) = 5 > (K  ) = 3.
General conflicts provide information for decisionmaking in generalized PNs.Confusions can cause the information loss.The proposed control strategy of confusions is based on general conflicts and the control objective is to ensure the integrity of decision-making information of the general conflicts.(3) The concurrent degree of a set   of concurrent transitions, denoted by , is defined as  = |  |.
(4) Let   be a set of concurrent transitions in a marked net (, ) with  = |  |.It is said to be -max-concurrent in (, ) if there does not exist a set of concurrent transitions (5) Let D  = {  1 ,   2 , . . .,    } be the set of concurrent transition sets in (, ).In other words, The net shown in Figure 5 contains totally seven sets of concurrent transitions at marking  =  1 +  4 + 2 5 ; that is,   two sets of concurrent transition sets.Then D  1 is 3-maxconcurrent and D  2 is not 3-max-concurrent since there exist two sets   1 and   2 , whose concurrent degrees are less than three.
It is denoted by [()  ⟩  that a transition  ∈  consecutively fires  times at marking , where  ≤    1 and   is the reachable marking from  by firing  ⋅ ⋅ ⋅  ⏟⏟⏟⏟⏟⏟⏟⏟⏟  .
Let   ⊆   be a subset of concurrent transitions in net  at marking .Let   be the reachable marking from  by firing all transitions in   according to their enabling degrees.The fact is denoted by [  ⟩  .Note that the firing orders of the transitions in   are nondeterministic since   is a subset of concurrent transitions.For example, if   = { 1 ,  2 } and two transitions  1 and  2 are 1-and 2enabled, respectively, at marking  fire, their possible firing sequences, according to enabling degrees, are where  1 - 3 are sequential firing sequences; that is, transitions fire consecutively, and  4 is a synchronized firing sequence; that is, transitions fire simultaneously.Correspondingly, [  ⟩  implies [ 1 ⟩  , [ 2 ⟩  , [ 3 ⟩  , and [ 4 ⟩  , where   is the reachable marking from  by firing any of the four possible firing sequences of concurrent transitions in   .
is called the submarking of  in , which is denoted by For  at another marking   = (0, 0, 0, 2 Definition 11.A confusion, denoted by (, (), , D  ), is a marked subnet (, ) in a net system (,  0 ) such that (1) there exists a structural conflict  = ⟨, ()⟩ with  ∈  and () ⊂ ; (2) there exists a nonempty set D  that is composed of all 2-max-concurrent transition sets at the submarking  in (, ); where (K  ) and (K   ) are information content of general conflicts associated with  at submarkings  and   , respectively; (4) there exist two reachable markings  and   in (,  0 ) such that  ≺  and   ≺   are valid.
A confusion is said to be a conflict-increasing confusion (CIC), denoted as Definition 11 defines confusions as a class of marked subnets in a net system and classifies them into CICs and CDCs.Condition (1) in Definition 11 imposes a requirement on marked subnets.If a marked subnet is a confusion, it necessarily contains a structural conflict.Condition (2) in Definition 11 limits the size of a marked subnet (, ) by restricting that all sets of concurrent transitions in (, ) are 2-max-concurrent at submarking .The concurrent degree   = 2 in this condition means that there does not exist a set of concurrent transitions, which contains more than two transitions.Condition (3) in Definition 11 gives the behavior characteristics of confusions.For any set    of max-concurrent transitions in a confusion, the change of information content of general conflicts is caused by the firing of a transition  ∈    that is not a structural conflicting transition.Condition (4) in Definition 11 ensures that the behavior described in condition (3) can actually occur in the original net system.If condition (4) is not satisfied, confusions cannot occur in the original net system although it may contain the structures of confusions.Confusions are classified into CICs and CDCs according to the change of information content in Definition 11.
The confusion is conflict-increasing since transition  3 can fire twice or four times, which can produce an increment of the information content.We cannot determine whether the general conflicts associated with  1 occur from the initial submarking  1 to the submarking  10 according to the concurrent firing of transitions  1 and  3 .
As depicted in The submarking  5 can be reached by only one path, that is, which implies that the transition sequence  = ( 3 ) 4 fires.However, transitions  1 and  3 in Figure 7(a) are concurrent, which implies that the firing orders of  1 and  3 are nondeterministic.The nondeterminism causes that the transition sequence  = ( 3 ) 4 is not guaranteed to be fired.In this case, we can say that the information loss of the general conflict K  5 1 occurs if a transition sequence fires, which does not pass through the submarking  5 .
2 ) = 6.The information loss of the general conflict K  (a) 2 ) = 0 2 ) = 0 M 7 = p 1 + 2p (a) due to symmetry.In this example, the structural conflict  3 is focused; that is, the CDC  de ( 3 , ( 3 ),  1 , D  1 ) is analyzed.From Figure 9(a), we have 1 }, and  9(b) depicts the partial reachability graph of the CDC, which can be obtained by concurrently firing transitions  1 and  3 .The maximal information content of general conflicts associated with the structural conflict  3 can be found at the initial submarking 3 ) = 3.Hence, the decisions on conflicting transitions  1 and  2 should be made for the general conflict However, a transition  3 ∉ ( 3 ) can concurrently fire such that the information content is reduced from (K 3 ) = 0. Consequently, the information loss of K  1 3 occurs.On the other hand, firing  1 also reduces the information content, which is not concerned with the information loss since  1 is a structural conflict transition for decisions.The submarking 3 ) = 2 is reached after firing  1 at  1 , which is also prone to the information loss of the general conflict In this case, the partial reachability graph shown in Figure 10(b) (resp., Figure 10(c)) is obtained by concurrently firing two transitions  1 and  5 (resp.,  2 and  5 ).The confusion is prone to the information loss of the general conflict K Confusion control in a generalized PN means that a reasonable strategy should be constructed to ensure the appearance of the general conflicts with maximal information content and if an output marking of a general conflict is preassigned, the control policy can guarantee the marking to be reachable.

Control of Conflicts and Confusions Using Synchronized PNs
Confusions may occur in a PN since a class of special structures in the PN is closely related to the appearances of confusions and the improper firing orders of concurrent transitions exist in its subnets at some markings.The information content of general conflicts becomes nondeterministic if a confusion occurs.A PN system must avoid any improper firing order of concurrent transitions such that the system can be immune to the information loss of general conflicts.Seeking a control mechanism carried out off-line to prevent the appearance of confusions is expected.In this section, we achieve this purpose by using synchronized PNs.Synchronized PNs are established to reinforce the firing conditions of each transition by introducing a reasonable external event.In PNs, a transition can fire if it is enabled.However, when it will be fired is unknown.In contrast, in a synchronized PN, a transition fires if it is enabled and the associated external event is satisfied.
External events usually have practical meanings.For example, a synchronized PN in which external events are associated with time or probability is called a -timed PN or a stochastic PN, which is introduced by Ramchandani [29], and Florin and Natkin [30], respectively.The synchronized firing of transitions is allowed in a synchronized PN with external events.In other words, two enabled transitions can fire simultaneously by the control of their external events.
In this section, a transition firing mechanism is developed, which applies external events to each transition with control information that is called allowable enabling degrees.They are featured with desired enabling degrees of transitions and can perform a variety of external event dependency relations by assigning their dependency orders.The dependency relations of two external events can be described as the fact that the execution times of an external event depend on that of another external event.Then, an approach to  confusion control is proposed, which refers to a group of static rules imposing restrictions on the enabling degrees and the dependency relations of external events controlling concurrent transitions in confusions.A major advantage is that any assigned external event can be converted into a feedback structure taking the form of PNs such that confusions can be controlled in system design stages.
Let  ∈ N be a nonnegative integer.It is said to be an allowable enabling degree of a transition  if  is   -enabled and   ≥ .Definition 12.A synchronized PN   with allowable enabling degrees is a three-tuple (, , ), where  = (, , , ) is a PN, ∀  ∈ ,   is the allowable enabling degree of } with  ≤ || being a set of external events, and  is a function from the transition set  of  to . (  ,  0 ) is called a synchronized net system, where  0 is an initial marking.
In a synchronized net system (  , ), if a transition   ∈  is controlled by an external event   [  ] with   =   and is enabled at , it does not become fireable unless the enabling degree of   is greater than or equal to the assigned allowable enabling degree   .If   obtains a proper enabling degree at , then it can immediately fire   times.
Let   = (, , ) be a synchronized net with  external events, where  ≤ ||.The transition set  of   can be partitioned into  subsets  1 ,  2 , . .., and   according to the control of the  external events.In other words, an external event   [  ] controls all the transitions in the subset   , where  ∈ {1, 2, . . ., }.  at a marking  satisfies the following transition firing rules: (1) Event dependency relations are not given for external events: a transition   ∈   ⊆  is fireable and immediately fires   times at the marking  if, ∀  ∈   , [  ⟩ and    ≥   are true.(2) Event dependency relations are given for  external events; for example,  1 In the rules,    is the enabling degree of the transition   at marking ,   is the allowable enabling degree of the transition   controlled by external events, and  ∈ N is an integer.Any synchronized transition (a transition controlled by an external event) in synchronized PNs is presumed as an immediate transition [26].The transition firing rules are illustrated in Examples 5 and 6, respectively.
Figures 11(a) and 11(b) show a PN (,  0 ) and its reachability graph with 10 markings, respectively.Two synchronized PNs (  ,  0 ) and (   ,  0 ) with [] = [  ] = [   ] are illustrated in Figures 11(c) and 11(e), respectively.Their evolutions are depicted as reachability graphs and shown in Figures 11(d) and 11(f), respectively.The restrictions generated by the control of external events can be observed by comparing their reachability graphs.As shown in the examples, a node   in the reachability graph of a synchronized PN contains the following information: (1) The marking   .
(2) The vector   of enabling degrees at marking   .
(3) A list of allowable enabling degrees for transitions, which is shown on the right side of   in a reachability graph.
The control of external events generates restrictions on the reachability set of (  ,  0 ); that is, (  ,  0 ) ⊆ (,  0 ).On the other hand, the set of feasible transition firing sequences of (  ,  0 ) is also included in that of (,  0 ) [26].
To illustrate the feasibility of the control of external events in synchronized PNs, we provide formal definitions and illustrations by converting the control into feedback control structures taking the form of PNs.
Let   = { 1 ,  2 , . . .,   } ⊆  be the set of the transitions controlled by an external event   [  ] ∈  with  ∈ {1, 2, . . ., ||} in a synchronized PN   and, ∀  ∈   , let   be the allowable enabling degree of the transition   .The feedback control structure of   [  ] can be constructed according to the following steps: (1) Let   and   be transitions and let   ,  1 -  , and  1 -  be places.Define (  ) = 0, (  ) =   , and, ∀ = {1, 2, . . ., }, (  ) = 0. (2) Transition   performs reading operation that can read the token information of the preset places of the controlled transitions according to their allowable enabling degrees.If the tokens in the preset places satisfy the firing rules of the controlled transitions according to their allowable enabling degrees, the transition   fires and outputs a token to the place   .The construction of this step can be formally defined as follows: define the arc (  ,   ) with (  ,   ) = 1.∀  ∈   , ∀∈ The constructed feedback control structures of external events are illustrated with examples.First, in a synchronized net system, an external event can perform control on the allowable enabling degree of a transition.For example, transition  1 in Figure 12(a) is considered, which has two input places  1 and  2 .An external event  1 [ 1 ] with ( 1 ) =  1  [2] ( 1 = 2) is designated to control  1 and the allowable enabling degree  1 = 2 is used to control that the transition  1 cannot fire unless its enabling degree is greater than or equal to two.The feedback structure shown in Figure 12(b) achieves the control purposes.
In Figure 12(b), two tokens in place  1 imply  1 = 2. Transition  1 performs reading operations for the enabling degree of  1 at a marking.If the enabling degree of  1 is greater than or equal to two, transition  1 fires.Then, transition  1 outputs control tokens such that  1 fires twice.
Figure 12(d) depicts the feedback control structure that achieves the same control purposes of  2 [ 2 ] for transitions  Figure 12: Illustration of the control of external events: (a) a transition with an external event, (b) the feedback structure of (a), (c) two synchronized transitions, (d) the feedback structure of (c), (e) two synchronized transitions with a common preset place, (f) the feedback structure of (e), (g) setting dependency relation  (b) Figure 13: Illustration of the control of resolution sequences in a general conflict.
2 and  3 .Both enabling degrees of  2 and  3 are detected by transition  2 .Furthermore, transition  2 outputs control tokens for the two transitions simultaneously after  2 fires.Suppose that  2 and  3 in Figure 12(c) have common preset places.For example, the two places  3 and  4 in Figure 12(c) are merged into the place  3 shown in Figure 12(e).The PN construction of Figure 12(e) can be obtained by merging  3 ,  4 , and their arcs in Figure 12(d), which is shown in Figure 12(f).
Let   and   be subsets of the transition set  in a synchronized PN   with   ∩   = 0 and let   [  ] and   [  ] be two external events, where the transitions in   (resp.,   ) are controlled by the event   [  ] (resp., . The corresponding feedback control structure can be constructed according to the following steps: (1) Let  1 and  2 be two transitions, and let  1 - 3 be three places, where, ∀ = {1, 2, 3}, (  ) = 0.

Control of General Conflicts in Synchronized PNs.
The resolution control of a general conflict is to choose a transition sequence such that the general conflict can be resolved according to the selected sequence to reach an expected marking.
The resolution control is illustrated by an example.13(a) is a general conflict at marking  = 3 1 + 2 2 .Figure 13(b . The resolution control of K  means to make decision on firing times of transitions  1 and  2 .In other words, the values of  1 and  2 are determined such that a resolution sequence of K  fires.Figures 13(c) and 13(d) show two feasible control policies.
If functions ( are employed, the general conflict K  will fire resolution sequence In a general conflict, some resolution sequences can lead to the same output marking, which have different transition firing orders.In these resolution sequences, the synchronized one is unique, which is used to resolve the general conflict in synchronized PNs.For example,  1 =  1 ( 2 ) 2 ,  2 =  2  1  2 ,  3 = ( 2 ) 2  1 , and  4 = [ 1 ( 2 ) 2 ] are four resolution sequences of the general conflict shown in Figure 13(a).Firing any of them leads to the same output marking.In this example,  4 is used to resolve the general conflict in the synchronized PN.
A strategy to find all synchronized resolution sequences for a general conflict is proposed.Let (  [  ] , ) be the set of transitions that are controlled by the external event   [  ] at marking .Let  and  be two vectors.Notation  ≥  means for every , () ≥ () and  ⪈  means for every , () ≥ () and for at least one , () > ().
Definition 13.The sequence   is said to be an elementary conflict resolution sequence (ECRS) with an external event   [  ] in (  , ) if it meets the following four conditions: (1) All the transitions in   belong to (  [  ] , ).
(2) All the transitions in   belong to (K  ).
( at marking  and the transitions are in the set of general conflicting transitions.Condition (3) in Definition 13 ensures that the conflicting transitions in (K  ) according to the ECRS are feasible (the tokens in places meet the firing condition of their output transitions in   ).Finally, according to condition (4) in Definition 13,   is ensured as a resolution sequence of the general conflict K  .In other words, all conflicting transitions become disabled if   fires.Algorithm 14 is proposed to generate all ECRSs of a synchronized PN at a marking.
Algorithm 14 is illustrated through an example shown in Figure 14 in which the weight of each arc equals one for the sake of simplicity since the weights do not affect the function of Algorithm 14.Actually, a weight means a coefficient in the computation of enabling degrees.A synchronized PN (  , ) is shown in Figure 14(a), where  = 3 2 + 2 3 + 2 4 + 6 .Transitions from  1 to  4 are controlled by an external event  1 [ 1 ] outputting the functions from ( . The values of allowable enabling degrees of conflicting transitions can be obtained according to the firing times of the transitions in every ECRS. Algorithm 14 (generation of all ECRSs of a synchronized PN (  , )).
Input is as follows: (  , ) and   [  ] .//  [  ] is an external event and employed in   at marking .
Output is as follows: all ECRSs: Step 1: delete all transitions not belonging to (  [  ] , ) and their input and output arcs according to condition (1) in Definition 13.
Step 2: according to condition (2) in Definition 13, delete all the transitions not belonging to (K  ) and their input and output arcs.
Step 3: delete all the arcs from transitions to places since an ECRS is related to the output matrix only according to condition (3) in Definition 13. the reduction leads to a new synchronized PN   .All the transitions in   are conflicting transitions.
First, the input of Algorithm 14 is (  , ) and the external event  .Then, transitions  1 ,  4 , and their corresponding arcs are removed by Step 2 in Algorithm 14 since they are not conflicting transitions, which is depicted in Figure 14(c).The subnet   of   can be found as shown in Figure 14 The generalized PN (, ) with [] = [  ] contains a general conflict K  = ⟨ 2 , { 2 ,  3 }, 3 2 + 2 3 + 2 4 +  6 ⟩.Its reachability graph is shown in Figure 14(e).There are three deadlock markings that correspond to three different ECRSs ] is an ECRS of K  , which means that K  can be resolved by firing transitions  2 once, and  3 twice simultaneously.Hence,  1 = 0,  2 = 1,  3 = 2, and  4 = 0 are obtained.The external event  1 [ 1 ] with the four allowable enabling degrees can perform control such that the transitions in K  fire according to the ECRS  2 at marking .
The validity of Algorithm 14 is clear since the reachability graph of the PN that is composed of a general conflict only contains all feasible paths from an initial marking to all dead markings.

Control of Confusions Using External Events.
As stated in Section 2, a confusion is prone to the information loss of general conflicts owing to nondeterministic firing orders of concurrent transitions.In a CIC, a general conflict K  with maximal information content is implied in the evolution of markings.The marking  at which the general conflict K  occurs is expected.It should be ensured that the firing of a transition sequence can reach the marking .Also, the transition firing sequences that lead to the information loss of the general conflict K  should be avoided.
If a general conflict K  with maximal information content in a confusion occurs, all the ECRSs are needed and can be obtained.Furthermore, an ECRS is selected as a decision to generate the allowable enabling degrees of transitions.The general conflict K  can always be resolved according to the selected ECRS by the control of external events.Here we assume that confusions have been found at a marking and we aim to control them.Algorithm 15 is proposed to control a given CIC.

Input is as follows: (𝑁, 𝑀).
Output is as follows: output (  ), ∀  ∈ , and the dependency relation between } is a set of external events with  ̸ = : Step Step 1 Step 2 Step Figure 14: Application of Algorithm 14 to a PN   .
Step 3: design the dependency relation Step 4: obtain the submarking   by firing all transitions in  at  according to their enabling degrees.
Step 5: find all ECRSs of (,   ) by Algorithm 14 with the inputs (,   ) and   [  ] .Step 6: choose an ECRS.For any transition   in (), obtain the allowable enabling degree   by the ECRS.
Step 7: output (  ), ∀  ∈ , and When the general conflict of a CIC is identified at making, its control can be enforced by adding external events according to some of the established rules.Algorithm 15 presents the rules.In Step 1 of Algorithm 15, the transition set  of a CIC is partitioned into two parts () and  =  \ ().According to Definition 11, a CIC occurs if the transitions in () fire before those in .Hence, Algorithm 15 designs a dependency relation by Step 3 in Algorithm 15 between the event controlling the transitions in  and the event controlling the transitions in () such that, ∀  ∈ , ∀  ∈ (),   fires    times before firing   .If the transitions in  fire according to their enabling degrees, the general conflict associated with  with the maximal information content is obtained.We can obtain all ECRSs according to Algorithm 14.Any ECRS is a control policy.Then, an ECRS is selected and the allowable enabling degrees of conflicting transitions to perform this ECRS can be obtained.Finally, the output functions and the event dependency relation presented in Step 7 of Algorithm 15 can control the CIC such that the information loss of the general conflict that has the maximal information content does not occur.
(2) The allowable enabling degree of transition  3 is obtained by 1 is prevented.The structure of a CDC is composed of two structural conflicts.However, only one structural conflict can be used to analyze the information loss of general conflicts in the CDC, which is illustrated with the example shown in Figure 16.
Figure 16 shows the schema of a CDC (, ) without considering the weights of arcs, where  1 = ⟨ 1 , ( 1 )⟩ with ( 1 ) =  ) such that the firing of the same sequence  =     does not cause the information loss of K  2 .Hence, the contradiction occurs.For a CDC, only one structural conflict can be used to analyze the information loss of general conflicts in the CDC.

Input is as follows: (𝑁, 𝑀).
Output is as followd: (  ), ∀  ∈ , and the dependency relation between  When a CDC is detected, its structure is known [18].According to Figure 16, any CDC contains two general conflicts in which one is focused to control.Hence, Algorithm 16 designs rules to add external control events such that the focused general conflict can be resolved before the other.Algorithm 16 achieves this purpose.First, the partition of the transitions in a CDC (, ) is performed.Let us consider the structural conflict  1 .The information loss of the corresponding general conflict K  1 occurs if the transitions in Ω 2 (Ω 2 ̸ ⊆ ( 1 )) fire before the resolution of K  1 .On the contrary, the information loss of K  1 does not occur if K  1 is resolved before the transitions in Ω 2 fire.Hence, Algorithm 16 designs a dependency relation between the event controlling the transitions in ( 1 ) and that controlling the transitions in Ω 2 , which also assigns the allowable enabling degrees of the transitions in ( 1 ) to resolve the general conflict K  1 .Finally, the output functions and the dependency relation can control the CDC such that the information loss of K  1 does not occur.The  de -conf  de ( 3 , ( 3 ),  1 , D  1 ) in Example 3 is also illustrated in Figure 15 3 is resolved.The control processes for this CDC contain the following steps according to Algorithm 16: (1) Three functions ( , and and  2 = [( 1 ) 2  3 ] are obtained by Algorithm 14. Suppose that ECRS  2 is selected.Three allowable enabling degrees  1 = 2,  2 = 0, and  3 = 1 are assigned (Step 1).// Suppose that  = 1 and  = 2.
(2) Five sets ( ( (Step 4).( 5) The dependency relation  Finally, the controlled CDC is obtained as shown in Figure 15(d), where only transition sequence  = [( 1 ) 2 ] 3 can fire.K  1 3 can be resolved before  3 fires.The computational complexity of Algorithms 14, 15, and 16 is analyzed.First, the reachability graph of a synchronized PN to compute ECRSs is necessary, which is the main cost in Algorithms 14, 15, and 16.However, the reachability graph for a general conflict is only a small part of that of the whole PN, which is necessary to find all synchronized resolution sequences.Second, in Algorithms 15 and 16, finding the structural conflicts in a confusion (, ) and partitioning the transitions in  are involved.For the former, structural conflicts can be found by scanning the incidence matrix [], which can be completed in () time, where  and  are the numbers of places and transitions in , respectively.For the latter, the partitions follow the basic operations of sets, which can be completed in ( 2 ) time.
Third, adding and outputting external events of transitions in Algorithms 15 and 16 can be completed in ( 2 ) time.The computational complexity of adding external events to the transitions in  is considered.According to the constructions in Figure 12, only 5 elements (two transitions and three places) are needed for an external event to control a transition in .In the worst case, we need  external events to control totally  transitions in .In other words, 5 ⋅  elements in total are added by adding rows and columns in the incidence matrix [], which can be completed in ( 2 ) time since the number of rows and columns added has linear relation with the number  of transitions.
Finally, Algorithm 15 or Algorithm 16 outputs an event dependency relation for the two external events in a confusion subnet.According to the constructions in Figure 12  (2) The obtained external events are applied to the LSPN of the PN by assigning the set  of external events and the function .

Control of Confusions in LSPNs: An
Example.An automated manufacturing system (AMS) is taken as an example to demonstrate the proposed confusion control methods.An AMS is composed of machining tools, buffers, conveyers, and robots.Several raw and semifinished parts are manufactured through predefined routes.The realization of resource allocation depends on conflicts and concurrency.Hence, confusions may appear in an AMS, which can lead to the loss of decision-making information.
A flexible assembly cell is shown in Figure 17(a).The description of the operations to be performed in the cell is stated as follows.Robot R1 loads raw Part 1 to machine tool M1.After being processed by machine tool M1, a semifinished Part 1 is produced and stored in buffer B1.The semifinished Part 1 is loaded into machine tool M2 when the part is moved by robot R1 from conveyors C1 to C3.After this stage, a finished Part 1 is obtained.Correspondingly, machine tools M1, M2 and robot R1 can be considered as shared resources, where M1 (resp., M2) can process two (resp., three) raw parts simultaneously.Part 2 is also produced by them.First, machine tool M1 loads raw Part 2. The produced semifinished Part 2 is stored in buffer B2.Then, robot R1 moves semifinished Part 2 from conveyors C2 to C4.At this moment, the semifinished Part 2 is available and is loaded by machine tool M2.After this stage, a finished Part 2 is obtained.The PN model (,  0 ) of the cell is shown in Figure 17(b) and the detailed descriptions are shown in Table 1.The net is bounded and live.
In this paper, the integrity of decision-making information of a general conflict is ensured such that a system designer can make a decision based on all ECRSs.In a real-world system, the decisions on ECRSs are made by control engineers.If two inappropriate ECRSs are selected, the system may lead to deadlocks.For example, in the considered assembly cell,  1 = [ 0  6 ] and  4 = [( 10 ) 3 ] are ECRSs for general conflicts K are resolved according to ECRSs  1 and  4 , respectively, the system will be in a deadlock state since transition  4 becomes disabled by the control of  4 [0] .Consecutively, transition  0 becomes disabled.Then, transition  6 is not allowed to fire although it is enabled since  0 and  6 are synchronized by the control of  1 [1] .The problem can be solved by classifying ECRSs according to the relations among conflicts.They will be considered in our future work.
On the other hand, the proposed control methods can be applied to industrial cases since any external event can be designed as a controller according to a feedback control  e  structure.First, a monitor is designed to observe whether the enabling degree of a transition is equal to the allowable enabling degree.Then, a controller is designed as a trigger that can output control information to transitions.The event dependency relations can be performed by designing counters.

Conclusions and Future Work
This paper investigates confusion issues in generalized PNs.Two problems are considered.The first is the formalization of confusions in generalized PNs.Confusions are well defined by proposing a novel concept of information content.Both CICs and CDCs in generalized PNs can be well described by the proposed definition.
The second is the confusion control.Synchronized PNs with allowable enabling degrees and LSPNs are developed to control two classes of confusions.The work can be regarded as an effective method to control Petri nets by using Petri nets.First, the concept of ECRSs of a general conflict is proposed.Each ECRS can deduce a series of control information of external events.Second, two algorithms are proposed to automatically generate external events and the event dependency relations, which can be successfully applied to the control of confusions such that the information loss of the general conflicts in the confusions does not occur.Finally, an example of confusion detection and control in the PN model of a manufacturing cell is given.Consequently, confusions in the PN can be effectively detected and controlled by using the proposed methods.
Future work includes the control of confusions in generalized PNs by an algebraic method.On the other hand, we also aim to detect confusions in a PN without computing a reachability graph.The methods can involve finding markings that are prone to the information loss of general conflicts by state estimation and structural analysis methods.

Figure 7 (
b) shows the partial reachability graph of the CIC, which is generated by concurrently firing transitions  1 and  3 only.In Figure7(b), any submarking   is considered with the information content (K

𝑀 3 2 1 2. 3 2 3 2
occurs if the transition sequence  1 =  5  1  5 or  2 =  1  5  5 fires.The partial reachability graph shown in Figure 8(c) is obtained by analyzing the concurrent firing of transitions  2 and  5 in   The same general conflict K  3 2 with the maximal information content (K  3 2 ) = 6 is obtained in Figure 8(c).There exists only one path  1 [ 5 ⟩ 2 [ 5 ⟩ 3 in Figure 8(c), which reaches the submarking  3 .However, more paths exist in Figure 8(c) than Figure 8(b) from the initial submarking  1 to the submarking  6 such that the information loss of the general conflict K  occurs.In other words, K  does not occur if a path in Figure 8(c) does not pass through the submarking  3 from  1 to  6 .Example 3. Figure 9(a) shows a CDC that consists of two structural conflicts  3 = ⟨ 1 , { 1 ,  2 }⟩ and  4 = ⟨ 2 , { 2 ,  3 }⟩.Only one structural conflict in the confusion is considered
(d) according to Step 3 in Algorithm 14.
[  ] that illustrates the marking change due to the firing of transition sequence  by the control of external event   [  ] ∈ .Example 5. Figure 11(c) shows a synchronized PN (  ,  0 ) that has the same structure and the initial marking of (,  0 ), where  1 and  2 are synchronized with  1 [ 1 ] and both  1 and  2 are controlled by  1 [1] with the allowable enabling degrees  1 =  2 = 1.They can synchronously fire if   1 ≥  1 and   2 ≥  2 are satisfied at a reachable marking .Otherwise they cannot fire.Transition  3 is controlled by event  2 [2] and  <  3 .The synchronized transitions  1 and  2 can fire.The marking  4 = [0, 1, 2]  can be obtained from the initial marking  0 by firing the transition sequence  = [ 1  2 ].Then, the vector of enabling degree 0 = [1, 1, 1]  is updated to  4 = [0, 1, 2]  at  4 .When marking  4 and vector  4 are considered, we have  =  3 .However, transition  2 is not allowed to fire owing to the control of the external event  1[ 1 ] .It can fire if its synchronized transition  1 is also fireable.On the other hand, transition  3 is not synchronized with other transitions.Hence, it can fire.After the transition sequence  = ( 3 ) 2 fires, marking  3 = [2, 1, 0]  and vector  3 = [2, 1, 0]  are obtained.The transition sequence  = [ 1  2 ] can immediately fire since the allowable enabling degrees of  1 and  2 are satisfied at marking  3 .Finally, the state returns to the initial marking  0 .
) Transition  1 fires if the control of the external event   [  ] is executed.The execution times of   [  ] are stored into the place  3 by firing  2 .The tokens in  3 control the execution times of another external event   [  ] such that the execution times of An ECRS of a general conflict in a net (  , ) corresponds to a synchronized resolution sequence.Conditions (1) and (2) in Definition 13 guarantee that the fundamental elements (transitions) in an ECRS are controlled by   [  ] ) [  ] − ⋅  →   ≤ , where [  ] − with [  ] − (, ) = (, ) is the output incidence matrix and  →   is the Parikh vector of   .(4)There is no sequence σ such that  → σ ⪈  →   .
is its corresponding LSPN.It means [] = [  ]. ∀ ∈   ,  is controlled by an external event   [  ]in   and ∀ ∈   ,  is a nonsynchronized transition in   .In other words, the transitions in   are not controlled by any external event, whose firing coincides with those in generalized PNs. ).Then, for any transition   in confusions, we obtain a function (  ).In other words, the external events that control confusions are obtained.