An Algorithm to Compute a Basis of Petri Net Invariants

Similar documents
EE249 Discussion Petri Nets: Properties, Analysis and Applications - T. Murata. Chang-Ching Wu 10/9/2007

Outline. Petri nets. Introduction Examples Properties Analysis techniques. 1 EE249Fall04

Petri Nets ee249 Fall 2000

From Task Graphs to Petri Nets

Petri Nets ~------~ R-ES-O---N-A-N-C-E-I--se-p-te-m--be-r Applications.

Contents Introduction Petri Net Toolbox at a First Glance... 4

An Approach for Ensuring Security and its Verification

MANUFACTURING SYSTEM MODELING USING PETRI NETS

APPLICATION OF COLORED PETRI NET IN MODELING OF AN AGRICULTURAL ENTERPRISE INFORMATION MANAGEMENT SYSTEM

A Schedulability-Preserving Transformation Scheme from Boolean- Controlled Dataflow Networks to Petri Nets

PETRI NET ANALYSIS OF BATCH RECIPES

Hierarchical Petri Net Simulator: Simulation, Design Validation, and Model Checking Tool for Hierarchical Place/Transition Petri Nets

Timed Petri Nets in Modeling and Analysis of Cluster Tools

Embedded Systems 7. Models of computation for embedded systems

On Petri Nets and Predicate-Transition Nets

Adaptive Petri Net Based on Irregular Cellular Learning Automata and Its Application in Vertex Coloring Problem

DM545 Linear and Integer Programming. Lecture 2. The Simplex Method. Marco Chiarandini

Petri Nets. Robert A. McGuigan, Department of Mathematics, Westfield State

COMPUTER AIDED PETRI NET DESIGN FOR DECISION-MAKING ORGANIZATIONS * I. M. Kyratzoglou Alexander H. Levis

Composability Test of BOM based models using Petri Nets

MATH 423 Linear Algebra II Lecture 17: Reduced row echelon form (continued). Determinant of a matrix.

Chapter 18 out of 37 from Discrete Mathematics for Neophytes: Number Theory, Probability, Algorithms, and Other Stuff by J. M. Cargal.

8 th International Conference on DEVELOPMENT AND APPLICATION SYSTEMS S u c e a v a, R o m a n i a, M a y 25 27,

Petri Net-based Thread Composition for Improved System Level Simulation

Łabiak G., Miczulski P. (IIE, UZ, Zielona Góra, Poland)

SOLVING DEADLOCK STATES IN MODEL OF RAILWAY STATION OPERATION USING COLOURED PETRI NETS

Ravi K. Gedela, Sol M. Shatz and Haiping Xu Concurrent Software Systems Lab The University of Illinois at Chicago Chicago, IL USA

Simulation of Petri Nets in Rule-Based Expert System Shell McESE

PETRI NET BASED SCHEDULING APPROACH COMBINING DISPATCHING RULES AND LOCAL SEARCH

PN Matlab Toolbox 2.0

Petri Nets and PNeS in Modeling and Analysis of Concurrent Systems

Topology Proceedings. COPYRIGHT c by Topology Proceedings. All rights reserved.

Computational problems. Lecture 2: Combinatorial search and optimisation problems. Computational problems. Examples. Example

Petri Nets: Properties, Applications, and Variations. Matthew O'Brien University of Pittsburgh

Qualitative Analysis of WorkFlow nets using Linear Logic: Soundness Verification

Winning Positions in Simplicial Nim

A Fast Method for Extracting all Minimal Siphons from Maximal Unmarked Siphons of a Petri Net

APETRI net (PN) (cf. [1] [3]) is said to be live if it is possible

Embedded Systems 7 BF - ES - 1 -

Geometric transformations assign a point to a point, so it is a point valued function of points. Geometric transformation may destroy the equation

Modular Petri Net Processor for Embedded Systems

MODERN automated manufacturing systems require. An Extended Event Graph With Negative Places and Tokens for Time Window Constraints

Lecture 2. Topology of Sets in R n. August 27, 2008

ON-LINE QUALITATIVE MODEL-BASED DIAGNOSIS OF TECHNOLOGICAL SYSTEMS USING COLORED PETRI NETS

An Improved Measurement Placement Algorithm for Network Observability

OPTIMIZING PRODUCTION WORK FLOW USING OPEMCSS. John R. Clymer

arxiv: v1 [math.ho] 7 Nov 2017

HYBRID PETRI NET MODEL BASED DECISION SUPPORT SYSTEM. Janetta Culita, Simona Caramihai, Calin Munteanu

DEADLOCK AVOIDANCE FOR FLEXIBLE MANUFACTURING SYSTEMS WITH CHOICES BASED ON DIGRAPH CIRCUIT ANALYSIS

INTRODUCTION TO CLUSTER ALGEBRAS

TRANSPARENCY ANALYSIS OF PETRI NET BASED LOGIC CONTROLLERS A MEASURE FOR SOFTWARE QUALITY IN AUTOMATION

Stochastic Petri nets

A Brief Introduction to Coloured Petri Nets

Essentially Decision Free Petri Nets for Real-Time Resource Allocation

ON SOME METHODS OF CONSTRUCTION OF BLOCK DESIGNS

Using Petri Nets to Enhance Web Usage Mining 1

TIMED PETRI NETS FOR SOFTWARE APPLICATIONS

Algebraic Topology: A brief introduction

Feedback Control Logic for Forbidden-State Problems of Marked Graphs: Application to a Real Manufacturing System

Models of Petri Nets

A Comparative study on Algorithms for Shortest-Route Problem and Some Extensions

Protocol Verification And Analysis Using Colored Petri Nets. Technical Report Submitted By

Coloured Petri Net Model f Two-Phase Commit Protocol With Multiple Participants

A Quality of Service Decision Model for ATM-LAN/MAN Interconnection

LabVIEW Based Embedded Design [First Report]

Relational Database: The Relational Data Model; Operations on Database Relations

Coverability Graph and Fairness

INTEGRATING COLORED PETRI NET AND OBJECT ORIENTED THEORY INTO WORKFLOW MODEL

MA4254: Discrete Optimization. Defeng Sun. Department of Mathematics National University of Singapore Office: S Telephone:

Analysis of high dimensional data via Topology. Louis Xiang. Oak Ridge National Laboratory. Oak Ridge, Tennessee

Estimating normal vectors and curvatures by centroid weights

A counter-example to the minimal coverability tree algorithm

A Visual Editor for Reconfigurable Object Nets based on the ECLIPSE Graphical Editor Framework

A New Algorithm for Measuring and Optimizing the Manipulability Index

On Rainbow Cycles in Edge Colored Complete Graphs. S. Akbari, O. Etesami, H. Mahini, M. Mahmoody. Abstract

ALGORITHMS FOR HIGH LEVEL PETRI NETS SIMULATION AND RULE-BASED SYSTEMS

4. Simplicial Complexes and Simplicial Homology

Formal Support for QVT-Relations with Coloured Petri Nets

Packed Integer Wavelet Transform Constructed by Lifting Scheme

Discrete Mathematics

Simplicial Complexes of Networks and Their Statistical Properties

Linear Optimization. Andongwisye John. November 17, Linkoping University. Andongwisye John (Linkoping University) November 17, / 25

Conic Duality. yyye

Generating edge covers of path graphs

Using the incidence matrix in an evolutionary algorithm for Computing minimal siphons in Petri net models

PETRI NET MODELLING OF CONCURRENCY CONTROL IN DISTRIBUTED DATABASE SYSTEM

Application of Bounded Variable Simplex Algorithm in Solving Maximal Flow Model

SEQUENCES, MATHEMATICAL INDUCTION, AND RECURSION

Integration of analytic model and simulation model for analysis on system survivability

Seamless design methodology of manufacturing cell-control software based on activity-control-condition and object diagram

RGB Digital Image Forgery Detection Using Singular Value Decomposition and One Dimensional Cellular Automata

TAGUCHI TECHNIQUES FOR 2 k FRACTIONAL FACTORIAL EXPERIMENTS

SDSU CS 662 Theory of Parallel Algorithms Networks part 2

Modeling and Verification of Deadlock Potentials of a Concurrency Control Mechanism in Distributed Databases Using Hierarchical Colored Petri Net

A geometric non-existence proof of an extremal additive code

Petri Nets. Petri Nets. Petri Net Example. Systems are specified as a directed bipartite graph. The two kinds of nodes in the graph:

Studying Graph Connectivity

THE BASIC THEORY OF PERSISTENT HOMOLOGY

Computation of enabled transition instances for colored Petri nets

Incremental Algorithms for the Minimum Cost Flow Problem

Transcription:

An Algorithm to Compute a Basis of Petri Net Invariants S. Cayir and M. Ucer Electronics and Communication Department, Istanbul Technical University, Istanbul, Turkey cayirs@itu.edu.tr and murvet@ehb.itu.edu.tr Abstract - A fast, simple and effective method to compute a basis of Petri Net invariants is presented in this paper. Another algorithm to obtain a basis with only positive elements is also initiated. Both of the algorithms are based on simple row operations. Where as the second algorithm is a modified form of the first one under specific constraints. Results of the algorithms applied on an example net are covered and the running times for different sized nets are given. INTRODUCTION Petri Nets are known as one of the best defined approaches to modeling of discrete and concurrent systems. Petri Nets are a graphical and mathematical modeling tool used to model and analyze information processing systems, communication systems and protocols, real-time systems, multi-processor systems, automatic production systems, flow charts, chemical reactions, ecological systems which may show concurrent, asynchronous, distributed, parallel, nondeterministic and/or stochastic behavior [], [2]. Using Petri Nets in system design takes the steps of modeling, analysis and implementation. Modeling step includes graphical visualization of complex systems, while implementation step is comprised of well defined synthesis procedures. Petri Net analysis step includes system analysis of structural and behavioral properties. Reachability, boundedness, liveness, reversibility, coverability, persistence and fairness are the most known behavioral properties. Behavioral properties rely on the initial state of the Petri Net, whereas structural properties dep on the topology of the net. Structural boundedness, conservativeness, controllability, structural liveness, and consistency are the most known structural properties. Murata in [2] argues structural and behavioral properties of Petri Nets in detail. Properties such as boundedness and conservativeness can be completely determined by means of Petri Net invariants. While reachability and liveness properties can be tested using Petri Net invariants. A detailed discussion on the relation between controllability and boundedness of Petri Nets based on invariants can be found in [3]. Many definitions of place invariants and transition invariants have been made in the literature [4- ]. In this paper, the main concern is to find a basis of invariants which figure a powerful tool to study structural properties of Petri Nets. Several methods have been proposed in the literature. These methods can be classified in two groups ; algorithms to obtain all and/or minimal positive invariants in [4] and [5], and algorithms to obtain basis of invariants in [6] and [7]. The method proposed in this study focuses on finding a basis of invariants based on simple row operations applied on the incidence matrix. The first method is focused to find basis without consideration if the results are positive or negative. Then a more restricted approach to find a basis with positive or semi-positive elements is researched. The constraints and necessary conditions of the approach are also established. Though the method is simple it is also effective, fast and open to further development. TATION AND DEFINITIONS A generalized Petri net is a 5-tuple, PN = (P, T, F, W, M ) where, P = {p, p 2 p m } is a finite set of places, T = {t, t 2 t n } is a finite set transitions, F (PxT) (TxP) is set of directed arcs defining the relations between the places and the transitions, W: F {, 2, 3 } is a weight function, M: P {,, 2 } is the initial marking, P T and P T=, m is the number of places and n is the number of transitions. [2] The graphical representation of a place p i is with a circle, whereas a transition t j is represented with a box or bar. The relation between a place and a transition is represented with a directed weighted arc. The weight of an arc from place p i to transition t j is represented as w(p i, t j ), whereas an arc in reverse direction is represented with w(t j, p i ). The dynamic behavior of a system is modeled through flow of tokens on the net. A marking M assigns a nonnegative integer to every place. M is m-vector,

where m is the number of places. M(p i ) is the number of tokens in place p i. M is the initial marking. A marking M k corresponds to the state of the net at a given moment. A transition t j is said to be enabled at marking M in case all of the input places have at least as many tokens as weight of the arc from the input places to that transition. After a transition is fired under marking M k, distribution of the tokens changes according to weights of the arcs. And the state changes to M k+. [2] The change of states in Petri Nets is captured with State Equation. The state equation is based on algebraic equation. M = M + A.u () Where, M is the initial marking. M is the marking reachable from M after consecutive transition firings. A is the incidence matrix. It is nxm matrix of integers. The a ij th element of the incidence matrix is computed in 2. a ij = w(t i, p j ) w(p j, t i ) (2) i =, 2,, n, j =, 2,, m, n and m denotes the number of transitions and places respectively. u is called the firing count vector. It is nx vector of non-negative integers. The ith element of σ implies how many times t i transition must be fired in a sequence of firings. P-invariants are integer solutions of homogenous equation 3. A.x = (3) Place invariants formalize invariant properties regarding places in Petri Net. For example in a set of places the sum of tokens remains unchanged after firing. Then this set can define a place invariant. A good discussion of various implications of P-invariants can be found in [8] and [9]. T-invariants are positive integer solutions of homogenous equation 4. A T.x = (4) T-invariants are especially useful when the solution of 4 is positive, in such case x corresponds to a cyclic sequence. By that means T-invariants define invariant properties regarding firing sequences applicable to a Petri Net. They are useful to define consistent components with in a net. When a net is not consistent it can not be lively and boundedly marked []. Computation of invariants is based the solutions of homogenous equations 3 and 4. Actually equation 4 is the dual of equation 3. Here after only the solution of P- invariants will be considered. T-invariants can be calculated by applying the same computing steps on the inverse of the incidence matrix A. PROPOSED ALGORITHMS First, an algorithm to compute a basis of invariants in generalized Petri nets that derives invariants with both positive and negative elements is considered. This algorithm is based on theorem 4 covered in the previous section. Then verbal definition of the second algorithm used to obtain positive and/or semi positive only is given. This algorithm is applicable only if the condition defined in theorem 5 holds. Algorithm : Computation of a basis for P - invariants Input: The mxn dimensional incidence matrix A, m = P, n = T Output: The matrix B whose rows form the basis Step : Take the transpose of the incidence matrix A. Define nxn dimensional identity matrix I n. Step 2: for i = to m;. Apply simple row operations on A T. These row operations shall form the A T matrix an upper triangular form. 2. Apply the same row operations on the Identity matrix I n. Step 3: Abstract the last (n-r) rows as matrix B from identity matrix I n which correspond to zero rows on A T. The rows of B form a basis for P invariants. Flow chart of algorithm can be seen in Fig.. Algorithm 2: Computation of a positive basis for P - invariants Input: The mxn dimensional incidence matrix A, m= P, n= T Output: The matrix B whose rows form the basis Step : Take the transpose of the incidence matrix A. Define nxn dimensional identity matrix I n. Step 2: for i = to m;. Apply additive simple row operations on A T. These row operations shall form the A T matrix an upper triangular form. 2. Apply the same additive row operations on the identity matrix I n. Step 3: Abstract the last (n-r) rows as matrix B from identity matrix I n which correspond to zero rows on A T. The rows of B form a positive basis for P invariants.

Matrix Data The pseudo code for subroutine Row Elimination is as follows, l > no of cols k > no of rows l++ k++ Apply row elimination along the column Apply row substitution. Do the same operation on the identity matrix. a[k, l]!= Is the rest of column l all zero? Return the induced matrixes l++ l > no of cols Subroutine RowElimination(a, id). if (a(k,l).a(i,l) < ) 2. a(j,i) a( j,i).a(k,l) + a(k,i).a(j, l) 3. id(j,i) id(j,i).a(k,l) + id(k,i).a(j, l) 4. else if (a(k, l).a(i,l) > ) 5. a(j,i) a( j,i).a(k,l) - a(k,i).a(j, l) 6. id(j,i) id(j,i).a(k,l) - id(k,i).a(j, l) if The pseudo code for Algorithm 2 is the same except at steps 5 and, where positive row elimination subroutine is applied. The subroutine of positive row elimination is as follows; Figure : Algorithm Flow Chart In order to obtain a basis for T invariants the same steps will be applied on the incidence matrix A. This holds for both algorithms. The code developed with regard to the algorithms defined has the following pseudo code structures. Pseudo Code for Algorithm Input: An incidence matrix a, nxm dimensional Output: (n-r)xn dimensional basis matrix b. define id /* nxn dimensional identity matrix */ 2. while (k < n) and (l < m) 3. if (a(k,l)!= ) 4. for (i = k+; i < n) 5. RowElimination(a, id); 6. k++, l++; 7. else if (RestofColumnZero(a) == false) 8. ExchangeWithNonZeroRow(a, id); /* exchange the row with a non zero one */ 9. for(i = k+; i < n). RowElimination(a, id);. k++, l++; 2. else if (RestofColumnZero(a) == true) /* checks if the rest of he column is zero */ 3. l++ Subroutine PositiveRowElimination (a, id). if (a(k,l) > ) 2. FindFirstNegative (a(k)) /* finds first negative row */ 3. EAPR_FirstNegative (a, id) /* eliminates all positive rows with the first negative one*/ 4. EANR_FirstRow (a, id) /* eliminates all negative rows with the first row */ 5. else if (a(k, l) < ) 6. FindFirstPositive (a(k)) /* find first positive row */ 7. EANR_FirstPositive(a, id) /* eliminate all negative rows with first positive row */ 8. EAPR_FirstRow(a, id) /* eliminate all positive rows with the first row */ if AN EXAMPLE The algorithms are applied to the Petri Net in Fig. 2. The incidence matrix of the net follows.

t p 2 p t 3 t 2 p 3 t 9 p 4 p 9 p 8 t 5 t 4 t 8 t 7 p 6 p 5 EXPERIMENTAL RESULTS A computer program implementing both standard and positive algorithms was developed. The computer program was named Petri Net Invariant Analysis (PNIA). It was developed with C#. PNIA generates basis both for P invariants and T invariants. Invariants of different sized Petri Nets were executed with PNIA on a computer with Pentium 4 2.4GHz processor and 52MB memory. Results are listed in Table. p 7 Figure 2: An example Petri Net t 6 The proposed invariant finding algorithms are applied. The example Petri Net has 9 places and the rank of the incidence matrix is 5, so the resultant basis is comprised of four row vectors. Results of the standard analysis has both positive and negative elements, where as results of the positive analysis has only positive elements. Positive only P invariant basis; Notice out that there can be found at least one invariant covered by positive elements. Size of A Positive P Positive T P analysis T analysis (mxn) analysis analysis 9x9 4,56E-5 6,58E-5 4,4E-5 6,3E-5 8x8,39E-4 3,74E-4,48E-4 3,83E-4 36x36 5,38E-4 2,59E-3 5,82E-4 2,63E-3 72x72 2,29E-3,84E-2 2,48E-3,96E-2 44x44 9,7E-3,39E-,6E-2,49E- 26x26 2,2E-2 4,5E- 2,28E-2 4,45E- Table : Running time results (in s) CONCLUSION In this paper, a new approach to determine invariant basis of Petri Nets have been presented. Using the bases the complete set of P invariants and T invariants can be generated. Both of the proposed algorithms have computing time complexities of Θ((M+N).N). The positive invariant analysis is slower because of the more controls present in its algorithm. When the results from the previous section are examined the computing time complexity shows the pattern of Θ((M+N). log N). Further improvements can be made on the algorithm to find solutions with more constraints. Here the constraint was to find positive basis. Other constraints can be to find a semi positive basis or a minimal basis. The resultant sets of invariants can be used to find all of the minimal invariants or any other type of invariant regarding the goal of the applications. REFERENCES [] J. L. Peterson, Petri Net Theory and the Modeling of Systems, Prentice-Hall, Inc, Englewood Cliffs, 98 [2] T. Murata, Petri Nets: Properties, Analysis and Applications, Proceeding of the IEEE, 989, Vol. 77, No.4, 54-58

[3] P. Ramachandran, M. Kamath, On Place Invariant Sets and the Rank of the Incidence Matrix of Petri Nets, Proc. IEEE Int. Conf. on Systems, Man, and Cybernetics, San Diego, USA, 998, pp. 6-65 [4] J. Martinez, M. Silva, A simple and fast algorithm to obtain all invariants of a generalized Petri Net, 2 nd Eu. Ws. on app. and theo. of PN, Bod-honneff, 98 [5] K. Takano, S. Taoka, M. Yamauchi, T. Watanabe, T., Two Efficient Methods For Computing Petri Net Invariants, IEEE Int. Conf. on Sys., Man, and Cybernetics, Tucson, USA, 2, Vol. 4, 277 2722 [6] A. Bourjij, M. Boutayeb, D. Koenig, T. Cecchin, On Generating a Basis of Invariants in Petri Nets, IEEE Int. Conf. on Sys., Man, and Cybernetics, Comp. Cyber. and Simulation, Orlando, USA, 997, Vol.3, 2228-2233 [7] T. Tanida, T. Watanabe, K. Onega, A Polynomial- Time Algorithm For Finding a Semi-Gen. of Petri Net Invariants, IEEE Int. Sym. on Cir. and Sys., Singapore, 99, Vol. 5, 2838-284 [8] J. Desel, W. Reising, Place or Transition Petri Nets, Lectures on Petri Nets I: Basic Models, Advances in Petri Nets, Springer, 998, pp. 22-73 [9] J. Desel, Basic Linear Algebraic Techniques for Place/Transition Nets, Lectures on Petri Nets I: Basic Models, Advances in Petri Nets, Springer, 998, pp. 257-38 [] M. Silva, E. Teruel, J. M. Colom, Linear Algebraic and Linear Programming Tech. for the Anal. of Place/Trans. Net Sys., Lectures on Petri Nets I: Basic Models, Advances in Petri Nets, Springer, 998, pp.39-373