Approximated Timed Reachability Graphs for performance evaluation and control of DES

Approximated Timed Reachability Graphs for performance evaluation and control of DES

May - June 1, 2018.on Sorrento 14th 30 IFAC Workshop DiscreteCoast, EventItaly Systems Available 14th 30 IFAC Workshop DiscreteCoast, Event Systemsonl...

824KB Sizes 0 Downloads 47 Views

May - June 1, 2018.on Sorrento 14th 30 IFAC Workshop DiscreteCoast, EventItaly Systems Available 14th 30 IFAC Workshop DiscreteCoast, Event Systemsonline at www.sciencedirect.com May - June 1, 2018.on Sorrento Italy May 30 - June 1, 2018. Sorrento Coast, Italy

ScienceDirect

Approximated Timed Reachability Graphs for performance evaluation IFAC PapersOnLine 51-7 (2018) 224–229 Approximated Timed Reachability Graphs for performance evaluation and control of DES Approximated Timed Reachability Graphs for performance evaluation and control of DES Approximated Timed Reachability Graphs for performance evaluation andDimitri control of DES Lefebvre and control of DES

Dimitri Lefebvre Normandie Univ, UNIHAVRE, GREAH, 76600 Le Havre, France, DimitriGREAH, Lefebvre e-mail: [email protected] Normandie Univ, UNIHAVRE, 76600 Le Havre, France, Dimitri Lefebvre e-mail: [email protected] Normandie Univ, UNIHAVRE, GREAH, 76600 Le Havre, France, Normandie Univ, UNIHAVRE, GREAH, 76600 Le Havre, France, e-mail: [email protected] e-mail: [email protected] Abstract: This paper is about the performance analysis and control issues for discrete event systems (DESs) including time andperformance modeled with time Petri nets (TPNs). Petri nets are known as efficient Abstract: This specifications paper is about the analysis and control issues for discrete event systems (DESs) mathematical graphical that arewith widely describe distributed DESs including choices, including specifications andperformance modeled timeused Petri nets (TPNs). Petri nets are known as efficient Abstract:time Thisand paper is aboutmodels the analysis andtocontrol issues for discrete event systems (DESs) synchronizations and parallelisms. Thearedomains of include butDESs are not restricted to Abstract: Thisand paper is about the analysis andapplication issues for discrete event systems (DESs) mathematical graphical models that widely tocontrol describe distributed including choices, including time specifications andperformance modeled with timeused Petri nets (TPNs). Petri nets are known as efficient manufacturing systems, computer and transportation networks. Incorporating theknown time restricted inasthe model including timeand specifications and science modeled with timeused Petri (TPNs). Petri nets are efficient synchronizations and parallelisms. Theare domains of application include butDESs are not to mathematical graphical models that widely tonets describe distributed including choices, is important toand consider many control problems. Thisused paper algorithm toare design inrestricted a systematic mathematical graphical models that widely toproposes describean distributed choices, manufacturing systems, computer science and transportation networks. Incorporating theincluding time in the model synchronizations and parallelisms. Theare domains of application include butDESs not to way exact approximated timed reachability graphs all feasible timed trajectories at given synchronizations and parallelisms. The and domains of encode application buttoare to is important to consider many control problems. Thisthat paper proposes aninclude algorithm design inrestricted a systematic manufacturing systems, computer science transportation networks. Incorporating the not time in thea model accuracy earliest firing policy. Some applications ofencode these graphs are discussed. manufacturing systems, computer science and transportation networks. the time thea model way exactunder approximated timed reachability graphs all feasible timedto trajectories at given is important to consider many control problems. Thisthat paper proposes anIncorporating algorithm design in in a systematic is important to consider many control problems. This paper proposes an algorithm to design in a systematic accuracy under earliest firing policy. Some applications of these graphs are discussed. way exact approximated timed reachability graphs Control) that encode all feasible timed at a given © 2018, IFAC (International Federation of Automatic Hosting by Elsevier Ltd.trajectories All rights reserved. way exactunder approximated timed reachability graphs thatofencode all feasible timed trajectories at a given Keywords: Discrete event systems, Time Petri nets, Time specifications Reachability graph. accuracy earliest firing policy. Some applications these graphs are discussed. accuracy under earliest firing policy.Time Some applications these graphs are discussed.graph. Keywords: Discrete event systems, Petri nets, Timeofspecifications Reachability Keywords: Discrete event systems, Time Petri nets, Time specifications Reachability graph. Keywords: Discrete event systems, Time Petri nets, Time specifications Reachability graph. 2003) is a similar approach inspired by the Region Graph 1. INTRODUCTION technique. (Lime and Roux, inspired 2006), thebyauthors build aGraph timed 2003) is aInsimilar approach the Region 1. INTRODUCTION that preserves the inspired behavior of the Region Timed In Performance analysis and control design for scheduling and automaton technique. (Lime and Roux, 2006), theby authors build aPN. timed 2003) is aIn similar approach the Graph INTRODUCTION 1. (Klai et al., 2013), the authors introduce a Timed Aggregate 2003) is a similar approach inspired by the Region Graph planning of discrete event systems is a major challenge in automaton that preserves the behavior of the Timed PN. In Performance analysis and control design for scheduling and technique. In (Lime and Roux, 2006), the authors build a timed 1. INTRODUCTION Graph of the net where each state includes the marking, the set technique. In (Lime and Roux, 2006), the authors build a timed numerous domains as flexible manufacturing, communication, (Klai et al., 2013), the authors introduce a Timed Aggregate planning of discrete event systems is a major challenge in Performance analysis and control design for scheduling and automaton that preserves the behavior of the Timed PN. In of enabled transitions, minimum timeofthe system must automaton that the behavior the Timed PN. In computer science, robotic, the net preserves where each state includes marking, thestay set Performance analysis and control design forbiotechnologies, scheduling numerous domains astransportation, flexible manufacturing, communication, (Klai etofal., 2013), thethe authors introduce athe Timed Aggregate planning of discrete event systems is a major challengeand in Graph in the state, and the maximal time the system can stay in the (Klai et al., 2013), the authors introduce a Timed Aggregate business, and so on (Lopez and Roubellat, 2008). In this paper, planning of discrete event systems is a major challenge in of enabled transitions, the minimum time the system must stay computer science, transportation, robotic, biotechnologies, numerous domains as flexible manufacturing, communication, Graph of the net where each state includes the marking, the set state. abstraction oftime a TPNs has been alsostay proposed Graph of explicit the net where each state includes the marking, the set Time Petriand nets (TPNs) areand used to robotic, model2008). the system to in numerous domains as flexible manufacturing, communication, theAn state, and the maximal the system can instay the business, so on (Lopez Roubellat, In this and paper, of enabled transitions, the minimum time the system must computer science, transportation, biotechnologies, in ettransitions, al. 2015) with aof Modified State Class All of (Basile enabled the minimum time the system must incorporate the temporal specifications. An important computer science, transportation, biotechnologies, explicit abstraction a TPNs has been alsoGraph. proposed Time Petriand nets (TPNs) areand used to robotic, model2008). the system and to state. in theAn state, and the maximal time the system can stay instay the business, so on (Lopez Roubellat, In this paper, previous approaches have for model checking, theAn state, the maximal time the has system can stay in All the advantage ofnets PNs istemporal that are specific properties such asthis conflicts, (Basile et and al. 2015) withbeen aof Modified State Class business, so on (Lopez and Roubellat, In paper, incorporate the specifications. An important state. explicit abstraction aproposed TPNs been alsoGraph. proposed Time Petriand (TPNs) used to model2008). the system and to in orhave estimation and diagnosis issues and All are state. An approaches explicit abstraction aproposed TPNs has been alsoGraph. proposed deadlocks, limited sizes, and previous for model checking, Time Petriof nets used to finite modelresource the system and to verification advantage PNs isbuffer that are specific properties such asconstraints conflicts, in (Basile etissues, al. 2015) withbeen aof Modified State Class incorporate the(TPNs) temporal specifications. An important not suitable to control and scheduling issues. In (Lefebvre, in (Basile et al. 2015) with a Modified State Class Graph. All can be easily represented within a single formal model (Tuncel verification issues, or estimation and diagnosis issues and are incorporate the temporal specifications. An important deadlocks, limited sizes, and finite resource advantage of PNs isbuffer that specific properties such asconstraints conflicts, previous approaches have been proposed for model checking, 2017) the author encodes in a Timed Extended Reachability previous approaches have been proposed for model checking, and Bayhan, 2007). advantage of PNs is that specific properties such as conflicts, not suitable to control and scheduling issues. In (Lefebvre, can be easily represented within a single formal model (Tuncel deadlocks, limited buffer sizes, and finite resource constraints verification issues, or estimation and diagnosis issues and are Graph (TERG) marking, the temporal constraints and verification issues, or estimation and diagnosis issues andalso are deadlocks, limited buffer within sizes, finiteformal resource constraints the author encodes a Timed Extended and Bayhan, 2007). The TPNs are frequently used and for performance analysis and 2017) not suitable to the control andin scheduling issues. InReachability (Lefebvre, can be easily represented a single model (Tuncel the earliest firing policy. But this last graph suffers from the not suitable to control and scheduling issues. In (Lefebvre, can be easily represented within a single formal model (Tuncel Graph (TERG) the marking, the temporal constraints and also control issues, in particular for scheduling problems (Baker The Bayhan, TPNs are frequently used for performance analysis and 2017) the author encodes in a Timed Extended Reachability and 2007). same drawback asencodes other timed reachability graphs: thefrom number 2017) the author in the athis Timed Reachability earliest firing policy. But last Extended graph suffers the and 2007). Trietsch, 2009. Leung,used 2004, Jeng and al., 1998; Wang, Graph (TERG) the marking, temporal constraints and also control issues, in particular forfor scheduling problems (Baker The Bayhan, TPNs are frequently performance analysis and the of states increases in a rapid way not only in function of the Graph (TERG) the marking, the temporal constraints and also same drawback as other timed reachability graphs: the number Wang, 2012; Lei et al., 2014, Meija). Control strategies the earliest firing policy. But this last graph suffers from the The TPNs are frequently used for performance analysis and and Trietsch, 2009. Leung, 2004, Jeng and al., 1998; Wang, control issues, in particular for scheduling problems (Baker size of the net but also in function of the number of temporal the earliest firing policy. But this last graph suffers from of states increases in a rapid way not only in function of the can be developed in local subparts of the reachability graph or same drawback as other timed reachability graphs: the number control issues, in particular for scheduling problems (Baker and Wang, 2012; Lei et al., 2014, Meija). Control strategies Trietsch, 2009. Leung, 2004, Jeng and al., 1998; Wang, paper improves previous result by same as other timed reachability graphs: the number size ofdrawback theincreases netThis but also function ofthe the number of temporal in complete graph. the2004, first of case, large systems can be of states in a in rapid way not only in function of the and Trietsch, 2009. Leung, Jeng al., 1998; Wang, can be developed in local subparts theand reachability graph or constraints. andthe Wang, 2012; Lei etInal., 2014, Meija). Control strategies introducing an Approximated Timed Reachability Graph of states increases in a rapid way not only in function of the constraints. This paper improves the previous result by addressed but the methods result inthe sub-optimal strategies and Wang, 2012; Lei etInal., Meija). Control in complete graph. the2014, first of case, large systems can be canthe be developed in local subparts reachability graph or size of the net but also in function of the number of temporal (ApTERG) that approximates the time behaviors of the net and size of the net but also in function of the number of temporal introducing an Approximated Timed Reachability Graph because exploration remains (Lee systems and. DiCesare, canthe be complete developed inmethods local reachability graph or constraints. This paper improves the previous result by addressed but the result inthe sub-optimal strategies in graph. In subparts theuncomplete first of case, large can be by illustrating advantage thisthe graph for of performance constraints. This paper improves previous result by that approximates theofTimed time behaviors the net and 1994; etremains al., Jeng Chen, 1998; Pan be et (ApTERG) introducing ansome Approximated Reachability Graph in the Reyes-Moro complete graph. In 2002; theuncomplete first case, large systems can because exploration (Lee and. DiCesare, addressed but the methods result inand sub-optimal strategies evaluation and control issues. introducing an Approximated Timed Reachability Graph by illustrating some advantage of this graph for performance al., 2014; Tarek Lopez-Benitez, 2004; Lefebvre addressed but the and methods result sub-optimal strategies 1994; Reyes-Moro etremains al., 2002; Jenginand Chen,and. 1998; Panand et (ApTERG) that approximates the time behaviors of the net and because exploration uncomplete (Lee DiCesare, thatsome approximates the net and evaluation and control issues. theoftime Leclercq 2015, Lefebvre, 2016a, 2016b). In the second case, by illustrating advantage this behaviors graph for of performance because exploration uncomplete (Lee and. DiCesare, al., Tarek and Lopez-Benitez, Lefebvre and 1994;2014; Reyes-Moro etremains al., 2002; Jeng and2004; Chen, 1998; Pan et (ApTERG) by illustrating some advantage of this graph for performance 2. CONTROLLED TIME PNS the control strategies solve a global optimization problem and evaluation and control issues. 1994; Reyes-Moro et al., 2002; Jeng and Chen, 1998; Pan et Leclercq 2015, Lefebvre, 2016a, 2016b). In the second case, al., 2014; Tarek and Lopez-Benitez, 2004; Lefebvre and and control issues. 2. CONTROLLED TIME PNS lead to an2015, optimal solution but such strategies are restricted to evaluation al., control 2014; Tarek andsolve Lopez-Benitez, 2004; Lefebvre the strategies a global optimization problem and Leclercq Lefebvre, 2016a, 2016b). In the second case, This paper concerns time PNs (Merlin and Faber, 1976). Such small size systems with a reasonable set of states because they Leclercq 2015, Lefebvre, 2016a, 2016b). In the second case, lead to an optimal solution but such strategies are restricted to 2. CONTROLLED TIME PNS the control strategies solve a global optimization problem and This models, referred in the next as (Merlin TPNs, are to represent paper concerns time PNs andsuitable Faber, 1976). Such 2. CONTROLLED TIME PNS require an extended reachability graph to take into account the the control strategies solve a global optimization problem and small size systems with a reasonable set of states because they lead to an optimal solution but such strategies are restricted to models, many timed DESs in uncertain environments like production referred in the next as TPNs, are suitable to represent This paper concerns time PNs (Merlin and Faber, 1976). Such temporal Class Graph (Berthomieu lead tosize an optimal butStates such strategies arebecause restricted to systems require anspecifications. extendedsolution reachability graph into accountthey the small systems with aThe reasonable settooftake states (Cassandras, 1993). This paper concerns time PNs andsuitable Faber, Such many timed DESs uncertain environments like1976). models, referred in in the next as (Merlin TPNs, are toproduction represent and Menasche, 1983) was the firstClass ofbecause state space small size systems with aThe reasonable setmethod states they temporal States Graph (Berthomieu require anspecifications. extended reachability graph tooftake into account the A , Wlike where P= PN structure isin defined as as G =TPNs, , many timed DESs in uncertain environments representation adapted towas Timed PNs with firing intervals require anspecifications. extended reachability graph to take into account the A and Menasche, 1983) the firstClass method oftime state space temporal The States Graph (Berthomieu p(Cassandras, a issetdefined of 1993). n places =W {t1PR ,…, tPO isproduction a set of {pPN many timed in uncertain environments , Wlike where P =q structure as G =and , systems associated to the transitions. The hasoftime been further temporal specifications. The States Class Graph (Berthomieu representation adapted towas Timed PNs with firing intervals nq} is a set of q and Menasche, 1983) the firstmethod method state space A systems p(Cassandras, is aindexes setdefined of 1993). n {1,...,q}, places and =W {t1PR ,…, {pPN (N) and WPRP  transitions WT 1,…, n} of q >, PO , WtPO where = structure is as G = ,iswhere Pof =q PO {t1(N) Wset  transitions of indexes are andn {1,...,q}, pre incidence matrices (N) PO= PR pn}the is apost set of places andWT ,…, t(N athe set of {p1,…, q} and and Vernadat, 2003). The Zones Based Graph et al., {p ,…, representation adapted to Timed PNs with firing time intervals improved with thetransitions. Atomic States Class Graph (Berthomieu associated to the The method has(Gardey been further nq nq p } is a set of n places and T = {t ,…, t } is a set of 1 n 1 q Wthe is non-negative and WPO(N–and post andnumbers), pre incidence matrices set of (N) are the PRW =(N) q of integer indexes {1,...,q}, WPOW PRthe associated to the The method has(Gardey been further and Vernadat, 2003). The Zones Based Graph et al., transitions nq improved with thetransitions. Atomic States Class Graph (Berthomieu nq  (N) and W  transitions of indexes {1,...,q}, W PRthe non-negative andPOW = WPO(N– isWthe PR is post andnumbers), pre incidence matrices set of (N) are the integer improved with2003). the Atomic StatesBased ClassGraph Graph(Gardey (Berthomieu nq and Vernadat, The Zones et al., are the post and pre incidence matrices (N is the set of (N) Copyright © 2018 IFAC and Vernadat, 2003). The Zones Based Graph (Gardey et al., 224 non-negative integer numbers), and W = WPO – WPR is the Copyright © 2018 IFAC 224 non-negative integer numbers), and W = WPO – WPR is the 2405-8963 © 2018, IFAC (International Federation of Automatic Control) Hosting by Elsevier Ltd. All rights reserved. Copyright 2018 responsibility IFAC 224Control. Peer review©under of International Federation of Automatic 10.1016/j.ifacol.2018.06.305 Copyright © 2018 IFAC 224

IFAC WODES 2018 May 30 - June 1, 2018. Sorrento Coast, Italy Dimitri Lefebvre / IFAC PapersOnLine 51-7 (2018) 224–229

incidence matrix. is a PN system with initial marking MI and M  (N) n represents the PN marking vector. A transition tj is enabled at marking M if its enabling degree n(tj,M) = min{mk / wPRkj : pk  °tj} satisfies n(tj,M) > 0, where °tj stands for the preset of tj, mk = M(pk) is the marking of place pk, wPRkj is the entry of matrix WPR in row k and column j. When tj is enabled, one writes M [tj >. When tj fires once, the marking varies according to M = M’ – M = W(:, j), where W(:, j) is the column j of incidence matrix and M’ the new marking reached after the firing of tj. When tj fires, one writes M [tj > M’ or M’ = M +W.X(tj) where X(tj) represents the firing count vector of transition tj (David and Alla 1992). Each transition tj  T is associated with a static time interval [dmin j.dt dMAX j.dt] where dt is a given sampling period and (dmin j, dMAX j)  (N)  (N). Consequently, the time specifications are assumed to be defined as multiples of dt. The product dmin j.dt is the earliest firing time that must elapse starting from the time at which tj is enabled until tj can fire (i.e. minimal firing delay). On the contrary, the product dMAX j.dt is the maximal time during which tj can be enabled without being fired (i.e. maximal firing delay). In case no constraint exists on the maximal firing duration, then dMAX j =  and the transition tj behaves as in T-timed PNs (Ramchandani, 1976). If no time specification exists at all for tj, then dmin j = 0 and dMAX j =  and the firing could occur immediately once tj is enabled. A firing sequence  is defined as  = tj1 tj2…tjh where j1,... jh are the indexes of the transitions. X()  (N) q is the firing count vector associated to , || = h is the length of , and  =  stands for the empty sequence. A marking M is said reachable from initial marking MI if there exists a firing sequence  such that (st) MI [ >M and  is said feasible at MI. S(MI) is the set of all reachable markings from MI. A timed firing sequence  of length || = h and of duration h is defined as  = (tj1, 1) (tj2, 2)…(tjh, h) where j1,... jh are the indexes of the transitions and 1,..., h represent the dates of the firings that satisfy 0  1  2  … h. The timed firing sequence  fired at M leads to the timed trajectory (,M):

225

transition tj when tj is enabled. Control error are not considered in this paper and Assumption A1 is considered in the next: A1. Two transitions tj and tk with j  k are not mapped with the same control action. Formally a controlled TPN system is defined as where is a PN system, A is the mapping from the control actions to the transitions and STI is the set of static temporal intervals associated to the transitions. Assumption A2 is considered in the next: A2. The considered controlled TPN systems are k-bounded with k>0. A consequence of assumption A2 is that S(MI) is of finite cardinality N. The Reachability Graph of a given PN system is defined as < S(MI), , MI >. The transition matrix   (T  {})NN satisfies for all (M, M’)  S(MI)  S(MI), (M, M’) = tj if M [tj >M’ and (M, M’) =  otherwise. 3. APPROXIMATED TIMED REACHABILITY GRAPHS 3.1 Timed Reachability Graph In this section, Timed Reachability Graphs are defined and computed to preserve not only the untimed but also the timed properties of TPNs under earliest firing policy. For this purpose, an extended reachability set is first introduced that includes not only the markings M but also the minimal and maximal residual times. For each marking M(k) of a timed trajectory (1), the set of dynamic time intervals DTI(k) = {(tj1, j1, j1), (tj2, j2, j2),…} contains the list of the enabled transitions tj1, tj2,…, their minimal residual times j1.dt, j2.dt,…. and maximal residual times j1.dt, j2.dt,…. Note:  under infinite server semantic, the same transition may appear several times in DTI(k) with the same or different dynamic time intervals when it is enabled several times at M(k).  according to the definition of time PNs (Berthomieu and Diaz, 1991), a transition tj in DTI(k) cannot fire with a residual time that exceeds min{.dt : for all t in DTI(k)}. For this reason, maximal residual times must be considered even if the earliest firing policy is applied. For facility, the constraints are sorted in DTI(k) first by ascending order of transition indexes: t1, t2,…, and secondly for each transition tj by ascending order of the minimal residual times (when tj is enabled several times). The set DTI(0) assumes that the trajectory starts at date 0 and that no transition is enabled before this date. Note also that several sets DTI can be attached to the same marking M: DTI(M) refers to the sets of DTI consistent with M. Consequently, the extended reachability set is defined as SE(MI) = {(M, DTI) with (M, DTI)  S(MI)  DTI(M)}. Thus, each state S  SE(MI) is composed of a marking M(S)  S(MI) plus a set of dynamic time intervals DTI(S)  DTI(M(S)). The Timed Reachability Graph (TERG) of a given TPN is formally defined as < SE(MI), E, BE, S0 >. SE(MI) is the extended reachability set with NE states. E  (T  {})NENE

(,M) = M(0) [(tj1, 1) > M(1)…. > M(h-1) [(tjh, h) > M(h) (1) where M(0) = M, M(1),...,M(h-1) are the intermediate markings and M(h) is the final marking (in the next, we write M(k)  (,M), k = 0,…h). The aim of the controller is to compute a firing sequence  of minimal duration such that MI [ > Mref where Mref is a reference marking to be reached in minimal time. For this purpose, the controller decides which transition should fire next and then the transition fires according to the earliest firing policy: when a transition is preselected by the controller for the next firing, it will fire as soon as its residual time has elapsed and the firing cannot be deferred. No other transition can fire even if its residual time is zero. For control issues, a set of kc distinct control actions C = {c1,…ckc} is considered. The firing of each transition is controlled by a subset of control actions. More formally, the function A maps the control actions with the transitions: for c  C, A(c)  T is the transition whose firing is enforced by c when the transition is enabled. Reversely, for tj  T, A-1(tj)  C is the set of control actions that enforce the firing of the 225

IFAC WODES 2018 226 May 30 - June 1, 2018. Sorrento Coast, Italy Dimitri Lefebvre / IFAC PapersOnLine 51-7 (2018) 224–229

transition tj2 = E(S1, S2) is enabled at M(1) and must fire within the dynamic time intervals in DTI(S1), it will fire at earliest at date 2 = 1 + j2.dt where j2 = BE(S1, S2). The firing of tj2 results in marking M(2) = M(S2). The reasoning is the same up to Sh. 

is the transition matrix such that (st) for all (S, S’)  SE(MI)  SE(MI), E(S, S’) = tj if M(S) [tj >M(S’) and E(S, S’) =  otherwise. BE  (N)NENE is the earliest firing time matrix st for all (S, S’)  SE(MI)  SE(MI), BE(S, S’) = j if M(S) [tj >M(S’) and j.dt is the minimal residual time required to fire the earliest occurrence of tj, otherwise BE(S, S) = 0 and BE(S, S’) =  for S  S’. S0 is the initial state corresponding to the initial marking and to the static time intervals of transitions enabled at date 0. The TERG of a given TPN system that behaves under earliest firing policy is obtained with Algorithm 1 (detailed in Section 3.2) and parameter  = 0. Note that the TERG is similar to the Timed Aggregated Graph (Klai et al., 2003) and to the Modified State Class Graph (Basile et al. 2015). But the TERG abstracts the earliest firing policy from the matrix BE and this is not the case for the Timed Aggregated Graph and the Modified State Class Graph. The reason is that these two graphs have been developed for model checking and diagnosis issues whereas the TERG is proposed for control issues. Proposition 1 proves that the TERG preserves the timed behaviors of the TPN: all legal timed trajectories starting from MI are encoded in TERG.

A corollary of Proposition 1 is that any timed feasible trajectory (,MI) where transitions fire at earliest is encoded in a specific path in TERG. The duration of this trajectory is obtained by summing the durations reported in matrix BE. Proposition 2: If S(MI) is of finite cardinality N, then SE(MI) is of finite cardinality NE that satisfies: N  NE  N.((Dm + 1).(DM + 1))k.q

(3)

with Dm = max{dmin j : tj  T} and DM = max{dMAX j : tj  T and dMAX j < }. Proof: as long as S(MI) is of finite cardinality, it is sufficient to prove that each marking M  S(MI) is associated to a set of dynamic time intervals DTI(S) of finite cardinality. M enables at most q transitions and each enabled transition has an enabling degree at most k (the TPN is assumed to be kbounded). Thus there are at most kq dynamic intervals in DTI(S). To prove that there is only a finite number of possible dynamic time intervals, it is sufficient to prove that for each transition in DTI(S) the possible minimal delays before firing are in finite number. Such delays are multiples of the sampling period dt and this multiples do not exceed Dm .The key point is that each transition is enabled from the date the system enters in a new marking. As long as the number of different markings is finite and the minimal delays of all transitions belong to the finite set 0 : Dm, the number of possible dates is also finite. This last number does not exceed Dm + 1. The argument is the same for maximal residual times. Thus, NE does not exceed N  (Dm + 1)k.q (DM + 1)k.q (this is in fact a very pessimist upper bound). In addition, NE equals at least N and (3) holds. 

Proposition 1: Let be a controlled TPN system that behaves under earliest firing policy and its corresponding TERG . (a) If the timed trajectory (,MI) = M(0) [(tj1, 1) > M(1)…. > M(h-1) [(tjh, h) > M(h) with M(0) = MI and tjk  T, k = 1,…h, is feasible in TPN system, then a path S0 S1…Sh exists in st (1) M(Sk) = M(k) for k = 0,…,h; (2) E(Sk-1, Sk) = tjk and BE(Sk-1, Sk).dt = k - k-1 for k = 1,…,h. (b) If S0 S1…Sh is a path in TERG with S0 the root node of the TERG then the timed trajectory (,MI) = M(0) [(tj1, 1) > M(1)…. > M(h-1) [(tjh, h) > M(h) with (1) M(k) = M(Sk), k = 0,…,h; (2) tjk = E(Sk-1, Sk), k = 1,…,h; (3) 1 = BE(S0, S1).dt; (4) k = k-1 + BE(Sk-1, Sk).dt, k = 1,…,h; is feasible in TPN. Proof: To prove (a), consider first a timed trajectory (,MI) = M(0) [(tj1, 1) > M(1)…. > M(h-1) [(tjh, h) > M(h) with M(0) = MI and tjk  T, k = 1,…h, that is feasible in TPN system. The proof is iterative. tj1 is enabled at M(0) because the trajectory is feasible. Moreover, as long as the TPN behaves with earliest firing policy, 1 coincides necessarily with the minimal firing time dmin1.dt associated to transition tj1. Thus, an elementary path S0 S1 exists in TERG with E(S0, S1) = tj1 and BE(S0, S1) = dminj1. Then tj2 is enabled at M(1) and 2 coincides necessarily with 1 + j2.dt where j2.dt is the minimal residual time to fire transition tj2. Thus, an elementary path S1 S2 exists in TERG with E(S1, S2) = tj2 and BE(S0, S1) = j2. The reasoning is the same up to M(h). To prove (b), consider a path S0 S1…Sh in TERG with S0 the root node of the TERG. The proof is iterative. Let us define M(0) = M(S0) = MI. The transition tj1 = E(S0, S1) is enabled at M(0) and must fire within static time interval [dmin j1.dt, dMAX j1.dt]. As long as the TPN behaves with earliest firing policy, it will fire at earliest at date 1 = dminj1.dt computed according to the smallest firing duration of tj1 in DTI(S0). The firing of tj1 results in marking M(1) = M(S1). The

Note that if no maximal firing times are specified (i.e. dMAXj = , j = 1,..,5) then NE  N.(Dm + 1)k.q. From a practical point of view, the computation complexity to design the TERG can be measured by the ratio NE / N that equals at least 1. Note that in some particular cases, NE / N = 1 and SE(MI) coincides with S(MI). This will be the case, in particular, if the firing of any transition at any reachable marking disables all other transitions. In that case the dynamic time intervals coincide with the static ones for each reachable marking. Example: Let us consider TPN1 in Fig.1 as an example of Timed Petri net that illustrates the increase in size of the TERG compared to the size of the usual untimed reachability graph. p1

Fig. 1: Example TPN1

226

t1 : a

p2

t2 : b

IFAC WODES 2018 May 30 - June 1, 2018. Sorrento Coast, Italy Dimitri Lefebvre / IFAC PapersOnLine 51-7 (2018) 224–229

The initial marking is MI = (1 1)T = 1p1+ 1p2, the sampling period has an arbitrary value dt and the time specifications are defined with the static time intervals [c.dt, ] for transition t1 and [1.dt, ] for transition t2 with c  N. The two transitions {t1, t2} are mapped according to the function A: A(a) = t1, A(b) = t2. The TERG of TPN1 is reported in fig. 2. One can notice that the TERG has c+3 states that differ only by their DTI whereas the untimed reachability set contains only one marking 1p11p2. This example illustrates that the TERG may ultimately grows depending on the time specifications. {(t1,c,), t2,1 {(t1,c-1,), (t2,1,)} (t2,1,)}

t1, c

t2, 0

t1, c-1

{(t1,c,), (t2,0,)}

t2,1 t1, 1 t1, 0

6.

compute DTI’ in M’ from DTI(S) by preserving the transitions that remain enabled and by adding the new transitions enabled at M’ 7. S’  (M’, DTI’), new_state  1, DTI1  DTI’ 8. for each (M”, DTI”)  SApE 9. if M’ = M" 10. new_state  0, DTI2  DTI” 11. for each (tj, ’j, ’j)  DTI1 12. if  (tj, ”j ”j)  DTI2 st (|’j - ”j|<)  (|’j - ”j|<) 13. remove (tj, ’j, ’j) in DTI1 14. remove (tj, ”j, ”j) in DTI2 15. else 16. new_state  1 17. end if 18. end for 19. if new_state = 0, break, end if 20. end if 21. end for 22. if new_state = 1, SApE  SApE  S’, end if ApE(S, S’)  t, BApE(S, S’)   23. 24. end for 25. end while

{(t1,1,), t2,1 {(t1,0,), (t2,1,)} (t2,1,)}

t1, 0

t2, 1

227

t2, 0

{(t1,0,), (t2,0,)}

Fig. 2 : TERG of TPN1 3.2 Approximated Timed Reachability Graph As illustrated by Proposition 2, the size of the TERG may become large even for small nets with a few number of reachable markings as soon as the temporal constraints are different. For such nets, an Approximated TERG (ApTERG) is proposed that aggregates the states of the TERG for which the markings are equal and the temporal constraints are not too far ones from each other. A parameter   N is introduced for this purpose: .dt represents the maximal acceptable difference between 2 dynamic time intervals, related to the same transition in two states that have the same marking. Formally, the Approximated Timed Reachability Graph (ApTERG) of a given TPN is defined as ApTERG() = < SApE(MI), ApE, BApE, S0 > where SApE(MI) is the reachability set of aggregated states, ApE  (T  {})NApENApE, BApE  (N)NApENApE, are defined consequently and S0 is the initial state. Note that  =  leads to the usual reachability graph (temporal constraints are no longer considered) and  = 0 leads to the TERG previously introduced. Algorithm 1 computes ApTERG() in an incremental way. For each state S  SApE, all transitions t enabled by M(S) are consecutively explored: the new marking M’ (line 5) and the new dynamic time intervals DTI’ (line 6) resulting from the firing of t are computed. States in SApE are tagged as long as they remain unexplored. A new state is generated only if the current couple (M’, DTI’) cannot be aggregated with any other state already existing in SApE (lines 24 - 25). On the contrary, a state S’ is aggregated with an already existing state S if M(S’) = M(S) (lines 10-11) and the dynamic time intervals defined in DTI(S) and DTI(S’) differ at most by  (lines 14-21).

Proposition 3: Let be a TPN system that behaves under earliest firing policy and its corresponding ApTERG() = < SApE(MI), ApE, BApE, S0 >. (a) If the timed trajectory (,MI) = M(0) [(tj1, 1) > M(1)…. > M(h-1) [(tjh, h) > M(h) with M(0) = MI and tjk  T, k = 1,…h, is feasible in TPN system, then a path S0 S1…Sh exists in st (1) M(Sk) = M(k) for k = 0,…,h; (2) ApE(Sk-1, Sk) = tjk and |BApE(Sk-1, Sk).dt – (k - k-1)|  .dt for k = 1,…,h. (b) If S0 S1…Sh is a path in ApTERG() = with S0 the root node of the TERG then a timed trajectory (,MI) = M(0) [(tj1, 1) > M(1)…. > M(h-1) [(tjh, h) > M(h) with (1) M(k) = M(Sk), k = 0,…,h; (2) tjk = ApE(Sk-1, Sk), k = 1,…,h; (3) |1 – BApE(S0, S1).dt|  .dt; (4) |k - k-1 – BApE(Sk-1, Sk).dt |  .dt, k = 1,…,h; is feasible in TPN. Proof: the proof is similar to the proof of Proposition 1 excepted condition (2) for statement (a) and condition (4) for statement (b). Consider first (a). As long as the trajectory does not visit twice the same marking, k coincides necessarily with the sum of the minimal residual times (j1+…+jk).dt because each new marking M(k) corresponds to a new state Sk in ApTERG() and DTI(Sk) is composed of the exact dynamic time intervals associated to Sk. If the trajectory visits twice the same marking: M(k) = M(k’) with k’>k, then the state S(M(k’)) is either a new state and k’ coincides with the sum (j1+…+jk +…+jk’).dt or S(M(k’)) = S(M(k)) and this state may have resulted from an aggregation with tolerance . In this case, |k’ – (j1+…+jk+…+jk’).dt |  .dt. To prove (b), consider a path S0 S1…Sh in ApTERG() = . For each k = 1,…,h, if Sk does not result from the aggregation of any other state, then BApE(Sk-1, Sk) contains no error. On the contrary if state Sk results from

Algorithm 1: construction of ApTERG() (Inputs: MI, G, STI, ; Outputs: SApE, ApE, BApE, S0) 1. initialization: MMI, DTI{(tj, dmin j, dMAX j) if M [ tj > }, S0  (M, DTI), SApE  { S0 } 2. while  S  SApE that is not explored and st DTI(S)   3. for each t in DTI(S) 4. find the minimal residual time  of t in DTI(S) 5. compute M’ such that M(S) [ t > M’ 227

IFAC WODES 2018 228 30 - June 1, 2018. Sorrento Coast, Italy Dimitri Lefebvre / IFAC PapersOnLine 51-7 (2018) 224–229 May

the aggregation of two states, then BApE(Sk-1, Sk) may contain an error with maximal value . Note that the same holds if Sk results from the aggregation of more than 2 states: the error in BApE(Sk-1, Sk) will not exceed . Extending Proposition 1, there exists a timed trajectory M(0) [(tj1, 1) > M(1)…. > M(h-1) [(tjh, h) > M(h) that is feasible in TPN with |h – (BApE(S0, S1)+…+BApE(Sh-1, Sh)).dt |  h..dt. 

difference between the true duration of the sequence and its corresponding path in ApTERG(). One can notice the decrease of complexity and performance wrt . One can also notice in Table 2 that the number of nodes NApE satisfies the Proposition 2 (N.(Dm + 1)k.q = 15. 532.6 = 7e21!) and that the mean duration error is always much lower than h..dt (corollary of Proposition 3).

A corollary of Proposition 3 is that any feasible timed trajectory (,MI) where transitions fire at earliest is encoded by a specific path in ApTERG().The duration of this trajectory is approximated by summing the entries reported in matrix BE and the duration error does not exceed h..dt where and h is the length of (,MI). Example: Let us consider TPN2 in Fig.3 as an example of Timed Petri net that illustrates the influence of the parameter  in the design of ApTERG(). The initial marking is MI = (2 0 0 0 0)T = 2p1, the sampling period is dt = 0.1 time units (TUs) and the time specifications considered are defined in Table 1: Table 1: Time specification (in TUs) for TPN2 tj dmin j dMAX j

t1 18 

t2 27 

t3 4 

t4 52 

t5 21 

t6 31 

Fig. 4: ApTERG() of TPN2

The transitions {t1, t2, t3, t4, t5, t6} are mapped with controllable events with the function A: A(a) = t1, A(b) = t2, A(c) = t3, A(d) = t4, A(f) = t5, A(g) = t6. Fig. 4 is the ApTERG obtained for  = . The states of ApTERG() coincide exactly with the markings (the states are aggregated whatever the value of their DTI) and the durations reported on the edges correspond to the maximal durations required to fire the considered transitions when the control actions are applied. ApTERG() has exactly 15 states as the usual reachability graph.

Fig. 3: Example TPN2 Fig. 5: ApTERG(30) of TPN2

Fig. 5 is the approximated TERG obtained for  = 30. In that case, 9 additional states are added in ApTERG(30) such that the errors in the durations do not exceed 3 TUs. Tables 2 and 3 illustrates the influence of parameter  on the computational effort and on the performance. The complexity is evaluated according to the number of states in ApTERG() in Table 2 and the performance is evaluated as the mean duration error computed for 100 feasible sequences of length h and randomly chosen. The duration error is the unsigned

Table 2: Number of states in ApTERG() for TPN2



NApE

228

 15

50 18

40 19

30 24

20 37

10 42

1 214

0 327

IFAC WODES 2018 May 30 - June 1, 2018. Sorrento Coast, Italy Dimitri Lefebvre / IFAC PapersOnLine 51-7 (2018) 224–229

REFERENCES

Table 3: Mean duration errors in ApTERG() for TPN2 h/ 10 20 50 100 200 300

 3.9 5.8 11.9 26.7 52.3 76.8

50 2.6 4.0 7.1 10.3 17.0 21.3

40 1.9 2.8 4.5 6.7 13.7 18.4

30 1.2 2.3 4.4 7.2 11.1 15.4

20 0.5 1.5 3.3 7.1 13.7 19.6

10 0.3 1.0 2.7 6.0 11.4 17.7

1 <0.01 <0.01 <0.01 0.01 0.03 0.04

229

K.R. Baker, D. Trietsch, Principles of Sequencing and Scheduling, John Wiley & Sons, 2009. R. E. Bellman. Dynamic Programming. Princeton University Press, Princeton, NJ, 1957. B. Berthomieu and M. Menasche. An Enumerative Approach for Analyzing Time Petri Nets. In IFIP Congress, pages 41– 46, 1983. B. Berthomieu and F. Vernadat. State Class Constructions for Branching Analysis of Time Petri Nets. In TACAS 2003, volume 2619 of LNCS, pages 442–457. Springer, 2003. B. Berthomieu and M. Diaz. Modeling and verification of time dependent systems using time Petri nets. IEEE Trans. On Soft. Eng., 17(3): 259-273, 1991. C. Cassandras, Discrete Event Systems: Modeling and Performances Analysis, Aksen Ass. Inc. Pub., 1993. R. David and H. Alla, Petri nets and grafcet – tools for modelling discrete events systems, London: Prentice Hall, 1992. G. Gardey, O. H. Roux, and O. F. Roux. Using Zone Graph Method for Computing the State Space of a Time Petri Net. In FORMATS 2003, volume 2791 of LNCS, pages 246–259. Springer, 2003. M.D. Jeng, S.C. Chen, Heuristic search approach using approximate solutions to Petri net state equations for scheduling flexible manufacturing systems. Int J FMS, vol. 10, no. 2, pp. 139–162, 1998. K. Klai, N. Aber, L. Petrucci, A New Approach To Abstract Reachability State Space of Time Petri Nets, 20th International Symposium on Temporal Representation and Reasoning, 2013. A. Larach, C. Daoui, S. Chafik. Accelerated decomposition techniques for large discounted Markov decision processes. J Ind Eng Int, Springer, 2017. D.Y. Lee, F. DiCesare, Scheduling flexible manufacturing systems using Petri nets and heuristic search, IEEE Trans. Robot. Autom. 10(2): 123–133, 1994. D. Lefebvre and E. Leclercq, Control design for trajectory tracking with untimed Petri nets, IEEE Trans. Aut. Contr., vol. 60(7), pp. 1921-1926, 2015. D. Lefebvre, Approaching minimal time control sequences for timed Petri nets, IEEE Trans. Au. Sc. and Eng., vol. 13, no. 2, pp. 1215-1221, 2016a. D. Lefebvre, Deadlock-free scheduling for Timed Petri Net models combined with MPC and backtracking, Proc. IEEE WODES 2016, pp. 466-471, Xi’an, China, 2016b. H. Lei, K. Xing, L. Han, F. Xiong, Z. Ge, Deadlock-free scheduling for flexible manufacturing systems using Petri nets and heuristic search, Computers & Industrial Engineering, vol. 72, pp. 297–305, 2014. Y-T. Leung, Handbook of Scheduling: Algorithms, Models, and Performance Analysis, Chapman & Hall/CRC Comp. & Information Science Series, 2004. D. Lime and O. H. Roux. Model Checking of Time Petri Nets Using the State Class Timed Automaton. Discrete Event Dynamic Syst., 16(2):179–205, 2006. P. Lopez, F. Roubellat, Production Scheduling, ISTE/Wiley, London, 2008. L. Pan, Z. Ding and M. C. Zhou, “A Configurable State Class Method for Temporal Analysis of Time Petri Nets,” IEEE Trans. Syst. Man and Cyb.: Systems, 44(4): 482 - 493, 2014. M. Puterman, Markov Decision Processes: Discrete Stochastic Dynamic Programming, John Wiley & Sons, Inc., New York, USA, 1994. C. Ramchandani, "Analysis of asynchronous concurrent systems by timed Petri nets," Ph. D, MIT, USA, 1973. A. Reyes-Moro, H. Hu G. Kelleher, Hybrid Heuristic Search for the Scheduling of Flexible Manufacturing Systems Using Petri Nets, IEEE Trans. Robotic and Autom., 18(2): 240-245, 2002. A. Tarek, N. Lopez-Benitez, Optimal Legal Firing Sequence of Petri Nets Using Linear Programming, Optimization and Engineering, 5, 25–43, 2004. G. Tuncel, G.M. Bayhan, Applications of Petri nets in production scheduling: a review. Int. J. of Advanced Manufacturing Technology, 34, 762–773, 2007. P. Merlin, D.J. Faber, Recoverability of communication protocols, IEEE Trans. Commun., 24(9), 1976. E.W. Dijkstra, A short introduction to the art of programming, 1971. T. H. Cormen, C. E. Leiserson, R. L. Rivest, C. Stein, Introduction to Algorithms, MIT Press and McGraw-Hill, pp. 595–601 2001. Lefebvre D., A Timed Extended Reachability Graph for the simulation and analysis of bounded TPNs, ESM, pp. 33-37, October 2017, Lisbon, Portugal. F. Basile, M.P. Cabasino, C. Seatzu, State Estimation and Fault Diagnosis of Labeled Time Petri Net Systems With Unobservable Transitions, IEEE Transactions on Automatic Control, 60(4) : 997-1009, 2015.

0 0 0 0 0 0 0

4. APPLICATION TO PERFORMANCE EVALUATION AND CONTROL The approximated timed reachability graph can be used to evaluate the performance and to design control sequences for discrete event systems with time specification. A first direct application is to check if a given timed trajectory (, MI) is feasible for a given TPN: (, MI) is feasible if and only if a path exists in the corresponding ApTERG(0) obtained for initial marking MI that satisfies Proposition 1. In case an approximated graph ApTERG() is used with  > 0, then the feasibility condition is checked with a tolerance .dt. A second application is to compute mean time indicators in a systematic way. Considering a given reference marking Mref it is easy to evaluate the mean and maximal time required to reach Mref from any marking M. To do that, it is first required to search all states S of ApTERG() such that M(S) = Mref and then to search all paths to such states, to finaly compute then the mean and longest ones in duration. Last but not least, ApTERG() can be used with search algorithms like Dijkstra algorithm (Dijkstra, 1957; Cormen et al. 2001) in deterministic environment or Markov decision process in stochastic environment to find shortest path in duration from the initial marking MI to a reference one Mref (Bellman, 1957; Puterman, 1994, Larach et al., 2017) The path can be directly transformed into a timed sequence for which the transition indexes and dates of firing are respectively obtained from the entries of the matrices ApE and BApE. 5 CONCLUSION This paper has proposed a systematic design of timed reachability graphs used to represent the timed trajectories of Petri nets that include a set of temporal specifications. To limit the size of the resulting graph in number of node, and thus to limit the computation complexity in space and time, the aggregation of “neighbor” nodes is proposed. In our future works, we will used the approximated timed reachability graph for control and scheduling problems. A particular attention will be paid to the case of uncertain environments. ACKNOWLEDGEMENTS The Project MRT MADNESS 2016-2019 has been funded with the support from the European Union with the European Regional Development Fund (ERDF) and from the Regional Council of Normandie.

229