Performance Evaluation of Timed Petri Nets in Dioid Algebra

The theory of Discrete Event Dynamic Systems focuses on the analysis and conduct systems. This class essentially contains man-made systems that consist of a finite number of resources (processors or memories, communication channels, machines) shared by several users (jobs, packets, manufactured objects) which all contribute to the achievement of some common goal (a parallel computation, the end-to-end transmission of a set of packets, the assembly of a product in an automated manufacturing line).


Introduction
The theory of Discrete Event Dynamic Systems focuses on the analysis and conduct systems. This class essentially contains man-made systems that consist of a finite number of resources (processors or memories, communication channels, machines) shared by several users (jobs, packets, manufactured objects) which all contribute to the achievement of some common goal (a parallel computation, the end-to-end transmission of a set of packets, the assembly of a product in an automated manufacturing line).
Discrete Event Dynamic Systems can be defined as systems in which state variables change under the occurrence of events. They are usually not be described, like the classical continuous systems, by differential equations due to the nature of the phenomenon involved, including the synchronization phenomenon or mutual exclusion. These systems are often represented by state-transition models. For such systems, arise, among others, three problems: Performance evaluation (estimate the production rate of a manufacturing system), resource optimization (minimizing the cost of some resources in order to achieve a given rate of production). To deal with such problems, it is necessary to benefit of models able to take into account all dynamic characteristics of these systems. However, the phenomena involved by Discrete Event Dynamic Systems, and responsible for their dynamics, are much and of diverse natures: sequential or simultaneous, delayed tasks or not, synchronized or rival. From this variety of phenomena results the incapacity to describe all Discrete Event Dynamic Systems by a unique model which is faithful at once to the reality and exploitable mathematically.
The study of Discrete Event Dynamic Systems is made through several theories among which we can remind for example the queuing theory, for the evaluation of performances of timed systems, or the theory of the languages and the automatons, for the control of other systems. The work presented here is in line with theory of linear systems on dioids. This theory involves subclass of Timed Discrete Event Dynamic Systems where the evolution of the state is representable by linear recurrence equations on special algebraic structures called diod algebra. The behavior of systems characterized by delays and synchronization can be described by such recurrences [1]. These systems are modeled by Timed Event Graphs (TEG). This latter constitute a subclasses of Timed Petri Nets with each place admits an upstream transition and downstream transition. When the size of model becomes very significant, the techniques of analysis developed for TEG reach their limits. A possible alternative consists in using Timed Event Graphs with Multipliers denoted TEGM. Indeed, the use of multipliers associated with arcs is natural to model a large number of systems, for example, when the achievement of a specific task requires several units of a same resource, or when an assembly operation requires several units of a same part.
This chapter deals with the performance evaluation of TEGM in dioid algebra. Noting that these models do not admit a linear representation in dioid algebra. This nonlinearity is due to the presence of weights on arcs. To mitigate this problem of nonlinearity and to apply the results used to evaluate the performances of linear systems, we use a linearization method of mathematical model reflecting the behavior of a Timed Event Graphs with Multipliers in order to obtain a linear model.
Few works deal with the performance evaluation of TEGM. Moreover, the calculation of cycle time is an open problem for the scientific community. In the case where the system is modeled by a TEGM, in the most of works the proposed solution is to transform the TEGM into an ordinary TEG, which allows the use of well-known methods of performances evaluation. In [12] the initial TEGM is the object of an operation of expansion. Unfortunately, this expansion can lead to a model of significant size, which does not depend only on the initial structure of TEGM, but also on initial marking. With this method, the system transformation proposed under single server semantics hypothesis, or in [14] under infinite server semantics hypothesis, leads to a TEG with |θ| transitions.
Another linearization method was proposed in [17] when each elementary circuit of graph contains at least one normalized transition (i.e., a transition for which its corresponding elementary T-invariant component is equal to one). This method increases the number of transitions. Inspired by this work, a linearization method without increasing the number of transition was proposed in [8]. A calculation method of cycle time of a TEGM is proposed in [2] but under restrictive conditions on initial marking. We use a new method of linearization without increasing the number of transition of TEGM [6].
This chapter is organized as follows. After recalling in Section 2 some properties of Petri nets, we present in Section 3, modeling the dynamic behavior of TEGM, which are a class of Petri nets, in dioid algebra, precisely in (min, +) algebra. In this section we will show that TEGM are nonlinear in this algebraic structure, unlike to TEG. This nonlinearity prevents us to use the spectral theory developed in [5] for evaluate the performances of TEG in (min, +) algebra. To mitigate this problem of nonlinearity, we will encode the mathematical equations governing the dynamic evolution of TEGM in a dioid of operators developed in [7], inspired by work presented in [3]. The description of this dioid and the new state model based on operators will be the subject of Section 4. To exploit the mathematical model obtained, a linearization method of this model will be presented in Section 5, in order to obtain a linear model in (min, +) algebra and to apply the theory developed for performance evaluation. This latter will be the subject of Section 6. Before concluding, w e give a short example to illustrate this approach for evaluate the performances of TEGM in dioid algebra.

Definitions and notations
Petri Nets (PN) are a graphical and mathematical tool, introduced in 1962 by Carl Adam Petri [15]. They allow the modeling of a large number of Discrete Event Dynamic Systems. They are particularly adapted to the study of complex processes involving properties of synchronization and resource sharing.
The behavior over time of dynamical systems, including evaluation of their performance (cycle time, ...), led to introduce the notion of time in models Petri Net. Several models Petri Net incorporating time have been proposed. These models can be grouped into two classes: deterministic models and stochastic models. The former consider the deterministic values for durations of activity, whereas the latter consider probabilistic values.Among the existing Timed Petri Net include: the Temporal Petri Net [11] associating a time interval to each transition and each place, the T-Timed Petri Net [4] associating a positive constant (called firing time of transition) at each transition and P-Timed Petri Net ; [4], [9] associating a positive constant (called holding time in the place) at each place of graph. It has been shown that P-Timed Petri Net can be reduced to T-Timed Petri Net and vice versa [13]. In the next, for consistency with the literature produced on the dioid algebra, we consider that P-Timed Petri Net.
A P-Timed Petri Net is a valued bipartite graph given by a 5-tuple (P, T, M, m, τ).
1. P is the finite set of places, T is the finite set of transitions.
2. M ∈ N P×T ∪ T×P . Given p ∈ P and q ∈ T, the multiplier M pq (resp. M qp ) specifies the weight of the arc from transition n q to place p (resp. from place p to transition n q ).
3. m ∈ N P : m p assigns an initial number of tokens to place p. 4. τ ∈ N P : τ p gives the minimal time a token must spend in place p before it can contribute to the enabling of its downstream transitions. More generally, for a Petri Net, we denote W − = [M qp ] (input incidence matrix), W + = [M pq ] (output incidence matrix), W = W + − W − (incidence matrix) and considering S a possible firing sequence from a marking m i to the marking m k , then a fundamental equation reflecting the dynamic behavior of Petri Net, is obtained: ( 1 ) S is the characteristic vector of the firing sequence S. In Figure 1, the firing sequence S = {n 2 }, the characteristic vector is equal to S t = (0, 1, 0, 0), and from marking m t 0 = (0, 3, 0, 0, 3, 0), is reached the marking m t 1 = (0, 0, 0, 3, 0, 0) by firing of the transition n 2 , after a stay of 2 time units of tokens in the places P 2 and P 5 .

Invariants of a Petri Net
There are two types of invariants in a Petri Net; Marking Invariants, also called P-invariant and Firing Invariant, also called T-invariant [4].

Definition 1. (P-invariant)
Marking Invariants illustrate the conservation of the number of tokens in a subset of places of a Petri Net.
A vector, denoted Y, which has a dimension equal to the number of places of a Petri Net is a P-invariant, if and only if it satisfies the following equation: From Equation 1, we deduce that if Y is a P-invariant, then for a given marking, denoted m i , obtained from an initial marking m 0 , we have: This equation represents an invariant marking, it means that if Y is a P-invariant of Petri Net then the transpose of the vector Y multiplied by the marking vector m i of the Petri Net is an integer constant regardless of the m i marking reachable from the initial marking m 0 . All the places for which the associated component in the P-invariant is nonzero, is called the conservative component of the Petri Net.

Definition 2. (T-invariant)
A nonzero vector of integers θ of dimension | T | ×1 is a T-invariant of Petri Net if and only if it satisfies the following equation: From Equation 1, the evolution from a marking m i to a sequence whose characteristic vector θ back the graph to same marking m k = m i . The set of transitions for which the associated component in the T-invariant is nonzero is called the support of T-invariant. A T-invariant corresponding to a firing sequence is called feasible repetitive component.

Definition 3. (Consistent Petri Net)
A Petri Net is said consistent if it has a T-invariant θ covering all transitions of graph. A Petri Net which has this property is said repetitive.
The graph reaches a periodic regime when there is a firing sequence achievable with θ as characteristic vector.

Definition 4. (Conservative Petri Net)
A Petri Net is said conservative if all places in the graph form a conservative component.
The Petri Nets considered here are consistent (i.e., there exists a T-invariant θ covering all transitions: {q ∈ T|θ(q) > 0} = T) and conservative (i.e., there exists a P-invariant Y covering all places: {p ∈ P|Y(p) > 0} = P). Such graphs verify the next properties [13]: • A PNPetri Net allows a live and bounded initial marking m iff it is consistent and conservative.
• A consistent Petri Net is strongly connected iff it is conservative.
• A consistent Petri Net has a unique elementary T-invariant.
• The product of multipliers along any circuit of a conservative Petri Net is equal to one.
In the next, we denote by • q (resp. q • ) the set of places upstream (resp. downstream) transition q. Similarly, • p (resp. p • ) denotes the set of transitions upstream (resp. downstream) place p.

Dynamic behavior of Timed Petri Nets in dioid algebra
Definition 5. An ordinary Timed Event Graph (TEG) is a Timed Petri Net such that each place has exactly one upstream transition and one downstream transition. Weights of arcs are all unit.
These graphs are well adapted to model synchronization phenomena occurring in Discrete Event Dynamic Systems. They admit a linear representation on a particular algebraic structure called the dioid algebra [1].

Definition 6.
A dioid (D, ⊕, ⊗) is a semiring in which the addition ⊕ is idempotent (∀a, a ⊕ a = a). Neutral elements of ⊕ and ⊗ are denoted ε and e respectively.
• A dioid is commutative when ⊗ is commutative. The symbol ⊗ is often omitted. Due to idempotency of ⊕, a dioid can be endowed with a natural order relation defined by This set is endowed with a kind of module structure, called min-plus semimodule, the two associated operations are: • pointwise minimum of time functions to add signals: ∀t ∈ Z,(x ⊕ y)(t) = x(t) ⊕ y(t) = min(x(t), y(t)); • addition of a constant to play the role of external product of a signal by a scalar: ∀t ∈ To study a TEG in (min, +) algebra, considered state variable is a counter , denoted x q (t). This latter denotes the cumulated number of firings of transition x q up to time t (t ∈ Z). To illustrate the evolution of a counter associated with the transition x q of a TEG, we consider the following elementary graph: Note that this equation is nonlinear in usual algebra. This nonlinearity is due to the presence of the (min) which models the synchronization phenomena 1 in the transition x q . However, it is linear equation in (min, +) algebra: In the case where weight of an arc is greater than one, TEG becomes weighted. This type of model is called Timed Event Graph with Multipliers, denoted TEGM.
The inferior integer part is used to preserve the integrity of Equation 7. In general, a transition n q may have several upstream transitions {n q ∈ •• q} which implies that the associated counter variable is given by the min of transition to transition equations obtained for each upstream transition. Figure 4. The mathematical model representing the behavior of this TEGM does not admit a linear representation in (min, +) algebra. This nonlinearity is due to the presence of the integer parts generated by the presence of the weights on the arcs. Consequently, it is difficult to use (min, +) algebra to tackle, for example, problems of control and the analysis of performances. As alternative, we propose another model based on operators which will be linearized in order to obtain a (min, +) linear model.

Operatorial representation of TEGM
We now introduce three operators, defined from Z ∪ {±∞} to Z ∪ {±∞}, which are used for the modeling of TEGM.
• Knowing that the signal n q (t) is non decreasing, we have : • Operator μ r to represent a scaling of factor r (r ∈ Q + ). It is defined as follows: ∀t ∈ Z, ∀ n q ∈ Z Z , n q (t) = μ r n q (t) = r × n q (t) , with r ∈ Q + (r is equal to a ratio of elements in N).

Property 3.
Operator μ r satisfies the following rules when composed with operators δ τ and γ ν : Indeed, we have: Denote by D min the (noncommutative) dioid of finite sums of operators {μ r , γ ν } endowed with pointwise min (⊕) and composition (⊗) operations, with neutral elements equal to ε = μ +∞ γ +∞ and e = μ 1 γ 0 respectively. Thus, an element in D min is a map p = k i=1 μ r i γ ν i defined from S to S such that ∀ t ∈ Z, p (n(t)) = min 1≤i≤k ( r i (ν i + n(t)) ).
We define the power series H(δ) in the indeterminate δ with coefficients in D min by: The set of these formal power series endowed with the two following operations: . (8) • N q (δ) is the counter n q (t) associated with the transition n q , encoded in D min [[δ]]. It is equal to the counter N q (δ) shifted by the composition of operators μ M pq , δ τ p , γ m p and μ M −1 qp connected in series. Let us express some properties of operators γ, δ, μ in dioid D min [[δ]]. Proposition 1. Let a, b ∈ N, we have: 3. Let N(δ) such that, ∀t ∈ Z, n(t) is a multiple of a, then μ a −1 γ b N(δ) = γ a −1 b μ a −1 N(δ).

Linearization of TEGM
The presence of integer part modeled by operator μ induces a nonlinearity in Equation 8 used to represent a TEGM. So, as far as possible, we seek to represent a TEGM with linear equations in order to apply standard results of linear system theory developed in the dioid setting, which leads to transform a TEGM into a TEG (represented without operator μ).

Principle of linearization
A consistent TEGM has a unique elementary T-invariant in which components are in N * . The used method is based on the use of commutation rules of operators and the impulse inputs (Proposition 1 and 2).
In the next, we suppose that all tokens in a TEGM are "frozen" before time 0 and are available at time 0 which is a classical assumption in Petri Nets theory. Hence, with each counter variable of a TEGM is added a counter variable corresponding to an impulse input e (i.e., e(t) = 0 for t < 0 and e(t) = +∞ for t ≥ 0). These initial conditions are weakly compatible. For more details, see [10].
To linearize the expression of counters variables written as Equation 8, one expresses each counter according to an entry impulse. This latter will permit to linearize the mathematical model reflecting the behavior of a TEGM in order to obtain a linear model in (min, +) algebra.
We now give the state model associated to the dynamic of counters of a TEGM. Consider the vector N composed of the counter variable. The counter variables corresponding to impulse input e added with each transition n i : Knowing that such equation admits the following earliest solution: Proposition 3. For initial conditions weakly compatible, consistent and conservative TEGM is linearizable without increasing the number of its transitions.

Proof: Consider a consistent and conservative TEGM represented by the equation
Using Equation 11, and then apply the Proposition 2, we obtain a linear equation between transitions of graph (corresponding to a linear TEG). This linearization method may be applied to all transitions of graph, since for any transition, one can involve an impulse input.
Example 5. The TEGM depicted in Figure 9 admits the elementary T-invariant θ t = (3, 2, 1). The inputs e correspond to the impulse inputs. They have not influence on the evolution of the model. Indeed, ∀t ≥ 0, ∀n q ∈ T , min(n q (t), e(t)) = n q (t), since e(t) → +∞. ⎛ Using Equation 11, N(δ) = A * E(δ). The Proposition 2 allows to calculate A * E(δ): which is the earliest solution of the following equations: Let us express these equations in usual counter setting (dioid Z min ), we have, ∀t ∈ Z: These equations are quite (min, +) linear. It turns out that the TEG depicted in Figure 10, composed of three elementary circuits: (n 1 , n 1 ), (n 2 , n 2 ), (n 3 , n 3 ), is a possible representation of the previous equations.

Performance evaluation of TEGM
• General case: To evaluate the performance of a TEGM returns to calculate the cycle time and firing rate associated with each transition of a graph. This cycle time is equivalent to the average time between two successive firing of a transition. It is calculated by the following relation: • θ q is the component of T-invariant associated with transition n q , and λ m q is the firing rate associated with transition n q of TEGM corresponding to the average number of firing of one transition per unit time.
• For an industrial system, the cycle time corresponds to the average manufacturing time of a piece, and the firing rate is the average number of pieces produced per unit of time.
• Particular case: Elements of performance evaluation for TEG. We recall main results characterizing an ordinary TEG modeled in the dioid Z min . Knowing that a TEG is a TEGM with unit weights on the arcs, and their components of T-invariant are all equals 1.

Definition 10.
A matrix A is said irreducible if for any pair (i,j), there is an integer m such that (A m ) ij = ε. Theorem 1. [5] Let A be a square matrix with coefficient in Z min . The following assertions are equivalent: • Matrix A is irreducible, • The TEG associated with matrix A is strongly connected.
One calls eigenvalue and eigenvector of a matrix A with coefficients in Z min , the scalar λ and the vector υ such as: Theorem 2. [5] Let A be a square matrix with coefficients in Z min . If A is irreducible, or equivalently, if the associated TEG is strongly connected, then there is a single eigenvalue denoted λ. The eigenvalue can be calculated in the following way: λ corresponds to the firing rate which is identical for each transition. This eigenvalue λ can be directly deduced from the TEG by: • C is the set of elementary circuits of the TEG.
• T(c) is the sum of holding times in circuit c.
• M(c) is the number of tokens in circuit c.
In the case of Ordinary TEG strongly connected, The inverse of eigenvalue λ is equivalent to cycle time, denoted TC.
Example 6. The TEG depicted in Figure 10, which is not strongly connected, is composed of three circuits : (n 1 , n 1 ), (n 2 , n 2 ) and (n 3 , n 3 ). Each circuit admits a T-invariant composed of one component equals 1.
The cycle time of TEGM depicted in Figure 4, corresponds to the time required to fire each transition a number of times equal its corresponding elementary T-invariant component. Hence Note that the cycle time is identical for all transitions of the graph which is equal to 4 time units. This means that each transition is asymptotically fired once every four time units.
About the firing rate associated with each transition of the graph, using the relation (12): Confirmation of these results can be deducted directly to the following marking graph of the initial TEGM. • kn i /t: after t time units, the transition n i is firing k time.

Conclusion
Performance evaluation of TEGM is the subject of this chapter. These graphs, in contrast to ordinary TEG, do not admit a linear representation in (min, +) algebra. This nonlinearity is due to the presence of weights on the arcs. For that, a modeling of these graphs in an algebraic structure, based on operators, is used. The obtained model is linearized, by using of pulse inputs associated with all transitions of graphs, in order to obtain representation in linear (min+) algebra, and apply some results basic spectral theory, usually used to evaluate the performance of ordinary TEG. The work presented in this chapter paves the way for other development related to evaluation of performance of these models. In particular, the calculation of cycle time for any timed event graph with multipliers is, to our knowledge, an open problem to date.