Introduction
Cooperative systems like e-commerce systems require interaction and exchanging messages during the trade between merchants and customers. As shown in Fig. 1, it requires that the systems can simultaneously process a batch of data after certain time intervals, which is called a batch processing of resources. At the same time, there exists indeterminate processing of resources for both merchants and customers during their trading. For example, customers can order products of different quantity, a merchant could face to a shortage of products, the time spent on different stages of the dealing process for different merchant and customers vary, and customers could change or cancel their dealing process during the trading progress. All aforementioned scenarios are called indeterminate processing of resources in the following content. Thus, the batch processing of resources and indeterminate processing of resources in cooperative systems should be well modeled and analyzed, which is of significance theoretically and practically.
Petri net (PN) was firstly proposed by Carl Adam Petri in his doctoral dissertation “Kommunikation mit Automaten” in 1962 [1]. It can well describe the concurrent, asynchronous, distributed, and parallel operations of processes and components in the distributed systems. After more than half century, it has been proved as a powerful modeling and analysis tool and used in simulation and analysis of cooperative systems and discrete event systems because of its well-founded formalization. With the solid mathematical definition and relatively straightforward graphical expression, before the systems are put into operation, PNs are firstly used to model, analyze, and ensure the desirable properties such as boundedness, liveness, and reversibility.
Until now, many extensions of PNs have been proposed. For example, high-level PNs, e.g., colored PNs [2], [3] and predicate/transition nets, have the same modeling capability with the normal PNs but can describe complex systems with simpler net structures. Timed PNs [4] and stochastic PNs [5] have been proposed for system performance analysis in many fields such as process control, communications protocols, production systems, hardware, embedded systems, and transportation systems [6]–[9] with increasingly available software. Meanwhile, augmented PNs such as inhibition Petri nets (IPNs) can strengthen the modeling capability of PNs. As one of augmented PNs, Logic Petri nets (LPNs) were firstly defined by Du et al. in [10] and [11], which have been verified holding equivalent modeling capability with inhibition Petri nets (IPNs) but maintaining simpler net structures. In LPNs, additional restrictions are attached to transitions, which are divided into normal transitions as those in traditional PNs and logic transitions. Each logic transition is combined with a first-order predicate logic expression of its connected places. In detail, a logic expression can be a logic input transition or logic output transition restricting its input places and output places, respectively. If it is a logic input transition, the logic expression concerns its input places. The transition can fire only if tokens in input places satisfy a logic expression. In other words, the marking of the places satisfies the requirement described by the expression. Similarly, a logic output transition is attached with a logic expression of its output places and its firing will generate tokens, which makes the logic expression be satisfied. Fortunately, such logic transitions can well model and analyze batch and indeterminate processing of resources in cooperative systems in Fig. 1. In detail, the indeterminacy is implied by the logic expressions attached to the corresponding logic transitions. The indeterminate processing of resources can be divided into input and output indeterminacy in such systems, which can be described by logic input and output transitions, respectively. With the enhanced modeling capability, LPNs are suitable for more complexed modeling requirements. Recently, LPNs have been used to formalize stock trading systems [11] and business process modeling [12]. Guo and Du have proved the equivalence between the safe IPNs and LPNs in [10]. In fact, IPNs can describe the prior discussed batch processing functions and data arrival indeterminacy. However, it lacks practical modeling tools and efficient analysis methods. In [13], a PN model named Stochastic Activity Networks containing predicates and functions in terms of markings of places have the functions of batch and indeterminate processing of resources. However, each transition can be restricted by more than one predicates and functions, which makes the analysis very complex. Du and Jiang [11] analyze e-commerce systems by using a subclass of LPNs in which the special structures of these systems are expressed by logic expressions; and relationships among logic transitions can be used to derive the otherwise-difficult-to-analyze fundamental properties of LPNs. Our previous work has presented a vector matching method [14] for analyzing an LPN. Some properties, i.e., liveness, reachability and reversibility, are obtained based on the methodology. In [15], we present an interactive logic Petri nets, and their liveness and boundedness analysis are discussed. Compatibility is proposed as an important concept to decide if its subsystems own correct/proper interactions. Different cooperative abilities are thus characterized in practice. Some relationships among compatibility, liveness, and boundedness are revealed. An example is used to illustrate them. As a powerful augmented PN, there is no systematic LPN synthesis approach for modeling cooperative systems. Besides, it is hard to verify the properties of a LNP model even in a moderate size. Thus, this paper proposes an approach for LPN synthesis. It does so by a bottom-up design. Sub-LPNs are connected with shared resource places. Control strategies are used to ensure LPNs with desirable properties.
The rest of the paper is organized as follows. Section II briefly presents the basic notations and concepts of PNs and LPNs. Section III defines basic design modules (BDM) and the procedure to synthesize BDMs to construct sub-LPNs. The final system model is then obtained by connecting sub-LPNs by shared resource places. Control strategies are designed to ensure desired properties of the model. Section IV describes an e-commerce system and its LPN model by using the proposed methodology. Section V concludes this work and discusses the future work.
Logic Petri Nets (LPNs)
Some notions and definitions of PNs [16]–[25] and LPNs [10] are reviewed first in this section. Here,
Definition 1:
A marked Petri net is described as a six-tuple
is a finite set of places, whereP=\{p_{1}, p_{2}, \ldots, p_{n}\} ;n\in \mathbb {N}^{+} is a finite set of transitions withT=\{t_{1}, t_{2}, \ldots, t_{s}\} andP\cup T\ne \emptyset , whereP\cap T=\emptyset ;s\in \mathbb {N}^{+} :I is an input function, which defines the weight of a directed arc from a place to a transition, where forP\times T\to \mathbb {N} andp\in P :t\in T if
, there exists no arc fromI(p, t)=0 top ; andt if
, there exists an arc fromI(p, t)>0 top with a weight equalingt ;I(p, t)
:O is an output function, which defines the weight of a directed arc from a transition to a place, where forP\times T\to \mathbb {N} andp\in P :t\in T if
, there exists no arc fromO(p, t)=0 tot ; andp if
, there exists an arc fromO(p, t)>0 tot with a weight equalingp ; andO(p, t)
:M is a marking function, which defines the number of tokens in each placeP\to \mathbb {N} , denoted byp\in P , whereM(p) is the initial marking.M_{0} The firing rules of transitions are that
a transition
is enabled at a markingt\in T ifM andp\in P , represented byI(p, t)>0: M(p)\ge I(p, t) ; andM[t> when an enabled transition
fires att , a new markingM is generated, represented byM^\prime , where forM[t>M^\prime .\forall p\in P: M^\prime (p)=M^\prime (p)+O(p, t)-I(p, t)
The marking
Definition 2:
A marked Petri net PN is
By attaching first-order predicate logic to PNs, we give the following notations. Firstly, notice that in a logic expression [26], [27], the operators consist of logic disjunction “
In the following discussion, let \begin{equation*} p_{i}^{M,t}=\begin{cases} {}_{\cdot }T_{\cdot }, & if~M(p_{i})\ge I(p_{i},t) \\ {}_{\cdot }F_{\cdot }, & else \end{cases}\tag{1}\end{equation*}
\begin{equation*} {}^{M,t}p_{i} =\begin{cases} {}_{\cdot }T_{\cdot }, & if~M(p_{i})\ge O(p_{i},t) \\ {}_{\cdot }F_{\cdot }, & else \end{cases}\tag{2}\end{equation*}
Given
Corollary 1:
Given
Corollary 2:
Given
Generally, given
The following definition of LPNs is owing to [28].
Definition 3:
denotes a finite set of places withP=P_{R}\cup P_{C} andP\ne \emptyset whereP_{R}\cap P_{C}=\emptyset represents a set of resource places; andP_{R} represents a set of control places withP_{C} , whereP_{C}=P_{CB}\cup P_{CS} denotes basic control places andP_{CB} denotes shared control places;P_{CS}
is a finite set of transitions withT=T_{D}\cup T_{I}\cup T_{O} ,T\ne \emptyset , andT_{I}\cap T_{O}=T_{I}\cap T_{D}=T_{O}\cap T_{D}=\emptyset :\forall t\in T_{I}\cup T_{O} , where^{\cdot }t\cap t^{\cdot }=\emptyset denotes a set of transitions as defined in a traditional PN;T_{D} is called a set of logic input transitions, whereT_{I} , a first-order predicate logic expression\forall t\in T_{I} is attached;f_{M}(^{\cdot }t) denotes a set of logic output transitions, whereT_{O} , a first-order predicate logic expression\forall t\in T_{O} is attached;f_{M}(t^{\cdot })
:I is an input function, which defines the weight of a directed arc from a place to a transition, where forP\times T\to \mathbb {N} andp\in P :t\in T if
, there exists no arc fromI(p, t)=0 top ; andt if
, there exists an arc fromI(p, t)>0 top with a weight equalingt ;I(p, t)
:O is an output function, which defines the weight of a directed arc from a transition to a place, where forP\times T\to \mathbb {N} andp\in P :t\in T if
, there exists no arc fromO(p, t)=0 tot ; andp if
, there exists an arc fromO(p, t)>0 tot with a weight equalingp ;O(p, t)
:M is a marking function, which defines the number of tokens in a placeP\to \mathbb {N} , denoted byp\in P , whereM(p) is the initial marking;M_{0} :f is a function of predicate logic input expressions, where^{\cdot }T\times R(M_{0})\to L({p_{i1}}^{M,t}, {p_{i2}}^{M,t}, \ldots, {p_{ik}}^{M,t}) ,^{\cdot }t=\{p_{i1}, p_{i2}, \ldots, p_{ik}\} ,k\in \mathbb {N}_{n}^{+} ,L({p_{i1}}^{M,t}, {p_{i2}}^{M,t}, \ldots is the set of all predicate logic expressions containing all elements in{p_{ik}}^{M,t}) and operators “˅”, “˄”, and “\{ {p_{i1}}^{M,t}, {p_{i2}}^{M,t}, \ldots, {p_{ik}}^{M,t}\} ”,\neg , and if^{\cdot }T=\{^{\cdot }t \vert t\in T\} ,t\in T_{D}\cup T_{O} , which is treated as default;f(^{\cdot }t, M)={p_{i1}}^{M,t}\wedge {p_{i2}}^{M,t}\wedge \ldots \wedge {p_{ik}}^{M,t} :g ,{T_{O}}^{\cdot }\times R(M_{0})\to L(^{M,t}p_{j1} where^{M,t}p_{j2}, \ldots, ^{M,t}p_{jh}) ,t^{\cdot }=\{p_{j1}, p_{j2}, \ldots, p_{jh}\} ,h\in {\mathbb {N}_{n}}^{+} is the set of all predicate logic expressions containing all elements inL(^{M,t}p_{j1}, ^{M,t}p_{j2}, \ldots, ^{M,t}p_{jh}) and operators “˅”, “˄”, and “\{^{M,t}p_{j1}, ^{M,t}p_{j2}, \ldots, ^{M,t}p_{jh}\} ”, and\neg ; and{T_{O}}^{\cdot }=\{t^{\cdot } \vert t\in T_{O}\} :\tau associates transitions with a time delay, i.e., ifT\to \mathbb {R}^{+} is enabled, it fires after time intervalt\in T . It has the following transition firing rules:\tau (t) , its firing rules are the same as those in PNs;\forall t\in T_{D} ,\forall t\in T_{I} only ifM[t> . Afterf(^{\cdot }t, M)=_{\cdot }\!\!T_{\cdot } ,\tau (t) , where ifM[t \rangle M^\prime andp\in {}^{\cdot }t , thenp^{M,t}=_{\cdot }\!\!\!F_{\cdot } , else,M^\prime (p)=M(p) ; andM^\prime (p)=M(p)+O(p, t)-I(p, t) ,\forall t\in T_{O} is enabled only ift :\forall p\in {}^{\cdot }t . After^{M,t}p =_{\cdot }\!\!T_{\cdot } ,\tau (t) , whereM[t \rangle M^\prime , and ifg(t^{\cdot }, M)=_{\cdot }\!\!T_{\cdot } andp\in t^{\cdot } , then^{M,t}p=_{\cdot }\!\!F_{\cdot } , else,M^\prime (p)=M(p) .M^\prime (p)=M(p)+O(p, t)-I(p, t)
From the definition of LPN, each transition is attached with a predicate logic expression. If a transition is a logic input transition, its predicate logic expression is related to the input places of the transition. The firing of the transition is restricted by logic expression, i.e., if the logic value of the transition is true, the transition can fire. When the transition is enabled under a certain marking and then fires, tokens in the places with true logic values towards the transition at the marking can be removed. Similarly, each logic output transition is attached with a predicate logic expression. The predicate logic expression is related to the output places of the transition. The results after the firing of the transition is restricted by a logic expression, i.e., when the transition is enabled under a certain marking and then fires, tokens can be generated in the places with true logic values towards the transition at the marking. Thus, the indeterminate input and output of logic transitions are described by logic expressions. Besides, in order to describe the real systems, time information is always involved. From the previous research, it can be included in places and transitions. In this work, we attach time to transitions. If a transition is enabled, it maintains the current state for a certain time interval and then fires. Notice that, if
Graphical representation of elements in LPNs: (a) a token, (b) a data place, (c) a control place, (d) a logic transition, (e) an ordinary transition, and (f) a directed arc.
We can give examples to describe the logic transitions in LPNs. As shown in Fig. 3(a), the LPN contains only one transition, i.e., a logic input transition
LPNs and their equivalent IPNs: (a) An LPN with an input logic transition, (b) An LPN with an output logic transition, (c) the equivalent IPN of the LPN in (a), and (d) the equivalent IPN of the LPN in (b).
Inhibition Petri nets (IPNs) [32] are a kind of augmented PNs. It attaches PN with inhibitor arcs (IPN) where an inhibitor arc set in which a non-directed arc with a small circle at the side of a transition. A transition can fire only if there is no token in the places connected with the inhibitor arcs. The work [20] has proved the equivalence between LPNs and IPNs. We can easily construct the equivalent IPN models of the LPN models in Fig. 3 (a) and (b) as shown in in Fig. 3 (c) and (d), respectively. In the model in Fig. 3 (c), we have that
LPN Synthesis
The concepts of basic design modules of Petri nets [28] are very useful for Petri net synthesis for cooperative systems as well as the description and proof of the desirable properties in the context of Petri net theory. There are usually three basic PN modules, i.e., sequential, parallel, and choice PNs. The advantage of the well-formed modules is that they are specific and easily applied for practical synthesis problems ensuring boundedness, liveness, and reversibility. This work will give an LPN synthesis approach based on basic design modules defined below.
A. Basic Design Modules
Definition 4:
The subnet of an LPN
;P^\prime \subseteq P ;T^\prime =^{\cdot }\!\!P^\prime \cup P^{\prime \cdot } ifI^\prime (p, t)=\!I(p, t) andp\in P^\prime , and otherwiset\in ^{\cdot }\!\!P^\prime \cup P^{\prime \cdot } ;I^\prime (p, t)=0 ifO^\prime (p, t)=O(p, t) andp\in P^\prime , and otherwiset\in ^{\cdot }\!\!\!\!P^\prime \cup P^{\prime \cdot } ;O^\prime (p, t)=0 :M is a marking function, whereP^\prime \to \mathbb {N} ifM_{0}^\prime (p)=M_{0}(p) is the initial marking;p\in P^\prime if
andt\in T^\prime ,f(^{\cdot }t, M)=l({p_{i1}}^{M,t}, {p_{i2}}^{M,t}, \ldots, {p_{ik}}^{M,t}) , where iff^\prime (^{\cdot }t, M)= l({p_{i1}}^{M,t}, {p_{i2}}^{M,t}, \ldots, {p_{ik}}^{M,t}) :p_{i}\notin ^{\cdot }\!t ;{p_{i}}^{M,t}=_{\cdot }\!\!T_{\cdot } if
andt\in T^\prime \cap T_{O} ,f(t^{\cdot }, M)=l(^{M,t}p_{j1}, ^{M,t}p_{j2}, \ldots , where ifg^\prime (^{\cdot }t, M)= L({p_{j1}}^{M,t}, {p_{j2}}^{M,t}, \ldots, {p_{jh}}^{M,t}) :p_{j}\notin ^{\cdot }\!\!t ; and^{M,t}p_{j}=_{\cdot }\!\!T_{\cdot } ^{M,t}p_{jh}) .\forall t\in T^\prime: \tau ^\prime (t)=\tau (t)
Given an
Assumption 1:
If
It means that if a transition has a basic control place as its input place, when it fires, the place must contain more tokens than the weight of the directed arc; and if a transition has a basic control place as its input place, when it fires, the output place is filled with a number of tokens equaling the weight of the directed arc.
Corollary 3:
Given an LPN
Proof:
According to the above assumption and Definition 4, we can easily obtain the conclusion.
We also have the assumption below in this work.
Assumption 2:
The capacity of control places is one, i.e.,
Assumption 3:
The weight of arcs that are connected with control places is no more than one, i.e.,
We cite the concept of a logic process as follows from [28].
Definition 5:
There exist two distinct places
andp_{in} , wherep_{out} , and^{\cdot }p_{in}=p_{out}^{\cdot }=\emptyset Let
, whereT=T\cup t^{\ast } . IfI(p_{out}, t^{\ast })=O(p_{in}, t^{\ast })=1 be its initial marking, then,M_{0}=p_{in} is live and safe.N
Then three basic design PN modules are introduced and used for LPN synthesis. Firstly, let
Definition 6:
,P=\{p_{1}, p_{2}, \ldots, p_{n}\} , andp_{in}=p_{1} withp_{out}=p_{n} ;n\in \mathbb {N}^{+} ;T=\{t_{1}, t_{2}, \ldots,t_{n-1}\} \begin{equation*} I = \left [{\begin{array}{c} I_{n-1}\\ 0_{n-1}^{T} \end{array}}\right]\!;\end{equation*} View Source\begin{equation*} I = \left [{\begin{array}{c} I_{n-1}\\ 0_{n-1}^{T} \end{array}}\right]\!;\end{equation*}
\begin{equation*} O= \left [{\begin{array}{c} 0_{n}^{T}\\ I_{n} \end{array}}\right]\!;\quad \mathrm {and}\end{equation*} View Source\begin{equation*} O= \left [{\begin{array}{c} 0_{n}^{T}\\ I_{n} \end{array}}\right]\!;\quad \mathrm {and}\end{equation*}
.M_{0}=0_{n}
Usually, a sequence PN modular is used to model a series of successive operations in systems.
Definition 7:
,P=\{p_{1}, p_{2}, \ldots,p_{n+2}\} , andp_{in}=p_{n+1} withp_{out}=p_{n+2} ;n\in \mathbb {N}^{+} ;T=\{t_{1}, t_{2}\} \begin{equation*} I = \left [{\begin{array}{cc} 0_{n} & 1_{n}\\ 1 & 0\\ 0 & 0 \end{array}}\right]\!;\end{equation*} View Source\begin{equation*} I = \left [{\begin{array}{cc} 0_{n} & 1_{n}\\ 1 & 0\\ 0 & 0 \end{array}}\right]\!;\end{equation*}
\begin{equation*} O = \left [{\begin{array}{cc} 1_{n} & 0_{n}\\ 0 & 0\\ 0 & 1 \end{array}}\right]\!;\quad \mathrm {and}\end{equation*} View Source\begin{equation*} O = \left [{\begin{array}{cc} 1_{n} & 0_{n}\\ 0 & 0\\ 0 & 1 \end{array}}\right]\!;\quad \mathrm {and}\end{equation*}
.M_{0}=0_{n+2}
A parallel PN modular is used to model a series of operations that are executed at the same time. After these
Definition 8:
,P=\{p_{1}, p_{2}, \ldots, p_{n+2}\} , andp_{in}=p_{n+1} withp_{out}=p_{n+2} ;n\in \mathbb {N}^{+} ;T=\{t_{1},t_{2}, \ldots, t_{2n}\} \begin{align*} I = \left [{\begin{array}{cc} 0_{n\times n} & I_{n}\\[8pt] 1_{n}^{T} & 0_{n}^{T}\\[8pt] 0_{n}^{T} & 0_{n}^{T} \end{array}}\right]\!;\end{align*} View Source\begin{align*} I = \left [{\begin{array}{cc} 0_{n\times n} & I_{n}\\[8pt] 1_{n}^{T} & 0_{n}^{T}\\[8pt] 0_{n}^{T} & 0_{n}^{T} \end{array}}\right]\!;\end{align*}
\begin{align*} O = \left [{\begin{array}{cc} I_{n} & 0_{n\times n}\\[8pt] 0_{n}^{T} & 0_{n}^{T}\\[8pt] 0_{n}^{T} & 0_{n}^{T} \end{array}}\right]\!;\quad \mathrm {and}\end{align*} View Source\begin{align*} O = \left [{\begin{array}{cc} I_{n} & 0_{n\times n}\\[8pt] 0_{n}^{T} & 0_{n}^{T}\\[8pt] 0_{n}^{T} & 0_{n}^{T} \end{array}}\right]\!;\quad \mathrm {and}\end{align*}
.M_{0}=0_{n+2}
A choice PN modular is used to model choices for a series of operations. It designates situations where a given condition or conditions enable multiple competing transitions or an operation is followed by the choice of one of several other operations.
With the above three basic PN modules, we can construct the LPN system models by adding shared places among modules and attaching predicate logic expressions.
B. Shared Places and Template Predicate Logic Expressions
Some determinacy relationship among the input or output expressions of logic transitions are defined in this subsection. For example, in an e-commerce LPN, if a logic transition
Definition 9:
Let
From the above definition, we can derive that
Definition 10:
An LPN process (LPNP) is a logic Petri net
is a PN modular withL\vert P_{CB} , whereP_{CB}\ne \emptyset There exist two distinct places
andp_{in} , wherep_{out} ,^{\cdot }p_{in}=p_{out}{}^{\cdot }=\emptyset Let
, andT=T\cup t^{\ast } .I(p_{out}, t^{\ast })=O(p_{in}, t^{\ast })=1 be the initial marking ofM_{0}=p_{in} which is live and safe; andL\vert P_{CB}
is a set of shared places, whereP_{S}=P_{I}\cup P_{O} is a set of shared input places,P_{I} is a set of shared output places withP_{O} andP_{I}\cap P_{O}=\emptyset .P_{CB}\cap (P_{I}\cup P_{O})=\emptyset
From Definition 3, the places can be divided into a set of resource places, a set of basic control places, and a set of shared control places. According to the above definition, basic control places cannot be shared places.
In LPNs, indeterminacies of passing value are categorized into input and output indeterminacy, which are represented by logic input and output transitions, respectively. The logic transitions are restricted by their corresponding logic input and output expressions. They fire only if their related logic expressions are true at a right marking. Each logic expression can be transformed into a unique disjunctive normal form with each disjunctive clause being a conjunct consisting of all variables in the expression. \begin{equation*} f(^{\cdot }t,M)\!=\!({p_{i1}}^{M,t}\wedge \ldots \wedge {p_{iq}}^{M,t})\!\wedge \!({p_{iq+1}}^{M,t}\vee \ldots \vee {p_{ik}}^{M,t});\end{equation*}
\begin{equation*} g(t^{\cdot }, M)\!=\!(^{M,t}p_{j1} \wedge \ldots \wedge ^{M,t}p_{jr})\!\wedge \! (^{M,t}p_{jr+1} \vee \ldots \vee ^{M,t}p_{jh})\end{equation*}
\begin{align*} f(^{\cdot }t)=&(p_{i1}\wedge \ldots \wedge p_{iq})\wedge (p_{iq+1}\vee \ldots \vee p_{ik});\quad \mathrm {and}\\ g(t^{\cdot })=&(p_{j1} \wedge \ldots \wedge p_{jr})\wedge (p_{jr+1} \vee \ldots \vee p_{jh})\end{align*}
There are some reasons that we design such template predicate logic expressions: 1) we design the first half of the expressions because of Assumption 1, i.e., if a transition has a basic control place as its input place, it is enabled only if the place contains more tokens than the weight of the directed arc; and if a transition has a basic control place as its input place, the place is filled with a number of tokens equaling the weight of the directed arc after the transition fires. 2) The second half of the expressions ensures that the system has the function of batch and indeterminate processing of resources in cooperative systems, i.e., the transition can fire when no less than one place contains tokens. 3) The related places always contain resource places, which means that the operation modeled by transitions’ firing occurs during the resource processing step. For other logic transitions with no connected resource places, the predicate logic expressions are designed separately.
C. Property Analysis
With the basic design modules, shared places, and template predicate logic expressions, we can do LPN synthesis. Before giving the synthesis procedure, this sub-section will discuss how to ensure desired properties of a composed LPN model. We firstly give the following definition.
Definition 11:
Interactive Logic Petri Nets (ILPNs) are defined recursively as follows.
An
is an ILPN where it is an LPNP withLPN=(P\cup P_{S}, T, I, O, M, f, g, \tau) .P_{S}=\emptyset Let
,L_{i}=(P_{i}\cup P_{CBi}\cup P_{CSi}\cup P_{Ii}\cup P_{Oi}, T_{i}, I_{i}, O_{i}, M_{i}, f_{i} ,g_{i} ,\tau _{i}) , be two ILPNs such thati\in {\mathbb {N}_{2}}^{+} \begin{align*}&P_{CB1}\cap P_{CB2}=\emptyset,\\&P_{I1}\cap P_{I2}=P_{O1}\cap P_{O2}=\emptyset,\\&(P_{O1}\cap P_{I2})\cup (P_{O2}\cap P_{I1})=P_{S}\ne \emptyset,\quad \mathrm {and}\\&T_{1}\cap T_{2}=\emptyset.\end{align*} View Source\begin{align*}&P_{CB1}\cap P_{CB2}=\emptyset,\\&P_{I1}\cap P_{I2}=P_{O1}\cap P_{O2}=\emptyset,\\&(P_{O1}\cap P_{I2})\cup (P_{O2}\cap P_{I1})=P_{S}\ne \emptyset,\quad \mathrm {and}\\&T_{1}\cap T_{2}=\emptyset.\end{align*}
Then, LPN is an ILPN where \begin{align*} P_{C}=&P_{C1}\cup P_{C2}\cup P_{S},\\ P_{I}=&(P_{I1}\cap P_{I2})\backslash P_{S},\\ P_{O}=&(P_{O1}\cap P_{O2})\backslash P_{S},\\ T_{D}=&T_{D1}\cup T_{D2},\quad T_{I}=T_{I1}\cup T_{I2},~\mathrm {and}~T_{O}=T_{O1}\cup T_{O2},\\ \tau (t)=&\tau _{i}(t)\quad \mathrm {if}~t\in T_{Di}\cup T_{Ii}\cup T_{Oi}, ~\mathrm {and}\\ f(t)=&f_{i}(t)\quad \mathrm {if}~t\in T_{Ii}, g(t)=g_{i}(t)~\mathrm {if}~t\in T_{Oi}.\end{align*}
Clearly, an ILPN is the union of \begin{equation*} L=L_{1}\oplus L_{2}\oplus \ldots \oplus L_{m}=\oplus _{i=1}^{m} L_{i}.\end{equation*}
In the above definition, shared input places can only be combined with shared output ones. After two LPNPs are composed via a set of shared places, these shared places cannot take part in other combinations any more. Notice that, when a system model is constructed, the existing shared input places need to be fulfilled for any meaningful design analysis. Usually, such places are resource places and should be separately analyzed. Without such places the ILPN model should have the desired properties such as boundedness, liveness, and reversibility.
Definition 12:
Let LPN be an ILPN.
Let \begin{equation*} f(^{\cdot }t_{21}, M)={p_{21}}^{M,t}\wedge ({p_{s11}}^{M,t}\vee {p_{s12}}^{M,t}\vee \ldots \vee {p_{s1i}}^{M,t});\end{equation*}
\begin{equation*} g(t_{22}^{\cdot },M)=^{M,t}p_{22}\wedge (^{M,t}p_{s21}\vee ^{M,t}p_{s22}\vee \ldots \vee ^{M,t}p_{s2j});\end{equation*}
Theorem 1:
Proof:
(Sufficiency) Because
(Necessity)
From Theorem 1 we have that an ILPN composed by two LPNPs (one contains logic transition and another contains no logic transitions) is live and safe if the input (output) place of logic input (output) transition is isomorphic with the input place of the first logic input transition in a basic path; and there is no circle.
Next, we consider an ILPN composed by more than two LPNPs (one contains logic transition and others contain no logic transitions).
Let \begin{equation*} f(^{\cdot }t_{21},M)=p_{21}^{M,t}\wedge ({p_{s11}}^{M,t}\vee {p_{s12}}^{M,t}\vee \ldots \vee {p_{s1i}}^{M,t});\end{equation*}
\begin{equation*} g({t_{22}}^{\cdot },M)=^{M,t}p_{22}\wedge (^{M,t}p_{s21}\vee ^{M,t}p_{s22}\vee \ldots \vee ^{M,t}p_{sj});\end{equation*}
Theorem 2:
The proof is the same with Theorem 1 except that the logic expression
Definition 13:
Let \begin{equation*} \sum \limits _{k=1}^{m} {M(p_{k})y_{k}} =\sum \limits _{j=1}^{m} {M_{0} (p_{j})y_{j}},\end{equation*}
\begin{equation*} \sum \nolimits _{p_{i} \in P^{\prime }} {M(p_{i})y_{i} =} \sum \nolimits _{p_{j} \in P^{\prime }} {M_{0} (p_{i})y_{j}}\end{equation*}
From Definitions 5 and 13, we have
The conservativeness of an LPN is ensured by using matrix calculation.
Theorem 3[15]:
Let
,\forall t\in T_{D} \begin{equation*} \sum \nolimits _{p_{i} \in P_{D}} {W(p_{i},t)} =\sum \nolimits _{p_{j} \in P_{D}} {W(t,p_{j})};\end{equation*} View Source\begin{equation*} \sum \nolimits _{p_{i} \in P_{D}} {W(p_{i},t)} =\sum \nolimits _{p_{j} \in P_{D}} {W(t,p_{j})};\end{equation*}
,\forall t\in T_{I} where if\begin{equation*} \sum \nolimits _{p_{i} \in P_{D}} {W(p_{i},t)} \rho (p_{i})=\sum \nolimits _{p_{j} \in P_{D}} {W(t,p_{j})},\end{equation*} View Source\begin{equation*} \sum \nolimits _{p_{i} \in P_{D}} {W(p_{i},t)} \rho (p_{i})=\sum \nolimits _{p_{j} \in P_{D}} {W(t,p_{j})},\end{equation*}
,M(p_{i})>0 ; else,\rho (p_{i})=1 ; and\rho (p_{i})=0 ,\forall t\in T_{O} where if\begin{equation*} \sum \nolimits _{p_{i} \in P_{D}} {W(p_{i},t)} =\sum \nolimits _{p_{j} \in P_{D}} {W(t,p_{j})\rho (p_{j})},\end{equation*} View Source\begin{equation*} \sum \nolimits _{p_{i} \in P_{D}} {W(p_{i},t)} =\sum \nolimits _{p_{j} \in P_{D}} {W(t,p_{j})\rho (p_{j})},\end{equation*}
andM[t \rangle M^{\prime } , thenM-M^\prime (p_{i})>0 , else,\rho (p_{j})=1 .\rho (p_{j})=0
We suppose that all data places must deposit and withdraw tokens in a system. Otherwise, the data places are meaningless.
Corollary 4:
If
Proof:
If
D. Synthesis Pocedure
The description of the synthesis procedure for LPNs is as follows:
Step 1:
Decompose the system into several sub-systems expressed as bounded, live, and reversible Petri nets by using LPNPs with one subsystem having the functions of modeling batch processing and passing value indeterminacy;
Step 2:
Replace places by more detailed basic design modules;
Step 3:
Appropriately add shared places among the models of the sub-systems without forming circles in the composed model;
Step 4:
Add template predicate logic expressions to logic transitions. According to Theorems 1 and 2, a shared place in a basic path is isomorphic with a shared place in the path which is the input place of the logic input transition; and initial markings are set. Then, a safe, live, and reversible LPN model is synthesized;
Step 5:
Finally, add appropriate resource places.
Remark 1:
This method can help one to construct an LPN in a top-down manner. The major benefits are that 1) the details can be introduced in an incremental way such that modeling difficulty can be alleviated; and 2) the important properties can be guaranteed making costly analysis for some qualitative properties unnecessary.
Remark 2:
The refinement by the basic design modules and the addition of shared places in Steps 2 and 3 can be alternatively applied and repeated. This means that no strict order between them needs to be followed.
Remark 3:
The complexity of the procedure of the synthesis of LPNs depends on the scale and the number of subsystems and in detail on the number of the states (or buffer) denoted by places and operations denoted by transitions as well as the state space.
LPN Modeling of an E-Commerce System
A. System Description
In an e-commerce system, a merchant can trade with several buyers at the same time. Batch processing function and passing value indeterminacy in such a system can be depicted by LPNs. There are mainly three sub-systems: customers, merchants, and a third-party. Each sub-system has to realize the specific operations, cooperates properly with the other systems, and finally complete the transactions. After going through the products of the merchant, customers mainly accomplish order requisition, order purchase, and product receipt one after another. A merchant sequentially processes orders, receives and checks the payment, and deliveries the products. In order ensure the benefits of both merchants and customers, a third-party is involved in the payment process. In detail, the third-party kept the money of the customer during the order purchase, and after customers ensures their product receipt, they restart the payment to transfer the money from the third-party to the merchant. During the purchase process, the activities can be refined and some more-detailed processes can be modeled. For example, after the payment, customers must give their detailed address to merchant. Notice that, time plays an important role in the system. For example, when a customer does not ensure the payment after receiving the products, the system will automatically make the payment after a certain period of time. There are also some conditions that if there are no enough quantity of products, merchants have to refuse the order or announce their restocking plan. These process can be modeled by replacing places with more detailed basic design modules.
B. Modeling Process
There are three sub-systems in the e-commerce systems modeled by LPNs, i.e., a merchant sub-system
Step 1:
Sequence PN modules are required to model sub-systems as shown in Fig. 6. The top-level contains three PN models of three basic sub-systems, i.e., (a) customer sub-system, (b) merchant sub-system, and (c) third-party subsystem.
Step 2:
More detailed basic design modules are designed as shown in Fig. 7(a)-(c). In Fig. 7(a), it contains both sequence and choice PN modules. Initially,
contains a token meaning that customerp_{in\_{}j} is ready for purchasing a product.j places an order and waits for the merchant to ensure it, which is modeled by the firing ofj . The merchant checks the order and chooses to accept or reject it. When the order is accepted, the customer should continue to do the payment described by transitiont_{order\_{}j} ; or it may be rejected for example because of shortage of the products from the merchant such thatt_{payment\_{}j} fires. If the order is accepted, customers will go on the order purchase and product receipt, which is modeled by the firing oft_{refused\_{}j} andt_{payment\_{}j} , respectively. The merchant sub-system and the third-party subsystem models are both sequence PN modules in Fig. 7 (b) and (c), respectively. It can be seen that the merchant will process the orders and payments and delivery the products as described by transitionst_{product\_{}j} ,t_{order} , andt_{payment} , respectively, in sequence. The third-party sub-system has mainly two steps, i.e., receiving and keeping the payment of customers, denoted byt_{product} , and pay for the merchant until the successful accomplishment of the transactions, denoted byt_{payment\_{}step1} .t_{payment\_{}step2} Step 3:
Appropriately add shared places among the models of the three sub-systems. Eight shared places
-p_{j1} and arcs with transitions are added as shown in Fig. 8.p_{j8} Step 4:
As shown in Fig. 9, template predicate logic expressions to logic transitions are designed as follows:
A specific logic expression is designed as follows.\begin{align*} f(^{\cdot }t_{order})=&p_{in}\wedge (p_{11}\vee p_{21}\vee \ldots \vee p_{j1});\\ f(^{\cdot }t_{payment})=&p_{decision}\wedge (p_{14}\vee p_{24}\vee \ldots \vee p_{j4});\\ g({t_{product}}^{\cdot })=&p_{out} \wedge (p_{15}\vee p_{25}\vee \ldots \vee p_{j5});\\ f(^{\cdot }t_{step10})=&p_{in\_{}TP}\wedge (p_{17}\vee p_{27}\vee \ldots \vee p_{j7});\\ g({t_{step11}}^{\cdot })=&p_{payment\_{}step11}\wedge (p_{14}\vee p_{24}\vee \ldots \vee p_{j4});\\ f(^{\cdot }t_{step20})=&p_{payment\_{}step11}\wedge (p_{18}\vee p_{28}\vee \ldots \vee p_{j8});\\ g(t_{step21}^{\cdot })=&p_{out\_{}TP}\wedge (p_{16}\vee p_{26}\vee \ldots \vee p_{j6});\quad \mathrm {and}\\ f(^{\cdot }t^{\ast })=&p_{out\_{}TP}\wedge (p_{16}\vee p_{26}\vee \ldots \vee p_{j6});\end{align*} View Source\begin{align*} f(^{\cdot }t_{order})=&p_{in}\wedge (p_{11}\vee p_{21}\vee \ldots \vee p_{j1});\\ f(^{\cdot }t_{payment})=&p_{decision}\wedge (p_{14}\vee p_{24}\vee \ldots \vee p_{j4});\\ g({t_{product}}^{\cdot })=&p_{out} \wedge (p_{15}\vee p_{25}\vee \ldots \vee p_{j5});\\ f(^{\cdot }t_{step10})=&p_{in\_{}TP}\wedge (p_{17}\vee p_{27}\vee \ldots \vee p_{j7});\\ g({t_{step11}}^{\cdot })=&p_{payment\_{}step11}\wedge (p_{14}\vee p_{24}\vee \ldots \vee p_{j4});\\ f(^{\cdot }t_{step20})=&p_{payment\_{}step11}\wedge (p_{18}\vee p_{28}\vee \ldots \vee p_{j8});\\ g(t_{step21}^{\cdot })=&p_{out\_{}TP}\wedge (p_{16}\vee p_{26}\vee \ldots \vee p_{j6});\quad \mathrm {and}\\ f(^{\cdot }t^{\ast })=&p_{out\_{}TP}\wedge (p_{16}\vee p_{26}\vee \ldots \vee p_{j6});\end{align*}
. At last,g({t_{decision}}^{\cdot })=p_{decision}\wedge (((\neg p_{12}\wedge p_{13})\vee (p_{12}\wedge \neg p_{13}))\vee ((\neg p_{22}\wedge p_{23})\vee (p_{22}\wedge \neg p_{23}))\vee \ldots \vee ((\neg p_{j2}\wedge p_{j3})\vee (p_{j2}\wedge \neg p_{j3}))) . According to Theorems 1 and 2, we can conclude that the synthesis of LPN models in Fig. 10 is live, safe, and reversible.M_{0}= \Sigma _{j}p_{in\_{}j}+p_{in}+p_{in\_{}TP} Step 5:
Some resource places are drawn and according to Theorem 3, the synthesis of LPN models is conservative on resource places.
The top-level PN models of three basic sub-systems: (a) customer sub-system, (b) merchant sub-system, and (c) third-party subsystem.
The detailed LPN models with template predicate logic expressions of the sub-systems.
Conclusion
This paper designs a systematic LPN synthesis method for cooperative systems. Based on basic design modules, we synthesize them to construct LPN models by connecting with shared resource places. Some control strategies are designed to guarantee the resulting LPNs with desirable properties such as boundedness, liveness, and reversibility. A case for constructing an E-commerce system is proposed to illustrate the proposed approach. The paper provides industrial engineers and academic researchers a methodology of applying LPNs to modeling and analysis of cooperative systems. Future work will study the synthesis of LPNs for other systems such as manufacturing systems [29] and knowledge-based systems [30], [31].