Petri nets analysis using incidence matrix method inside ATOM 3

Similar documents
Analysis and Optimization of Discrete Event Systems using Petri Nets

DES. 4. Petri Nets. Introduction. Different Classes of Petri Net. Petri net properties. Analysis of Petri net models

Petri Nets (for Planners)

Modeling and Stability Analysis of a Communication Network System

Elementary Siphons of Petri Nets and Deadlock Control in FMS

A REACHABLE THROUGHPUT UPPER BOUND FOR LIVE AND SAFE FREE CHOICE NETS VIA T-INVARIANTS

A Deadlock Prevention Policy for Flexible Manufacturing Systems Using Siphons

Numerical Linear Algebra

MATH 304 Linear Algebra Lecture 10: Linear independence. Wronskian.

Embedded Systems 6 REVIEW. Place/transition nets. defaults: K = ω W = 1

Lecture 9: Low Rank Approximation

3 Net Models of Distributed Systems and Workflows

c 2011 Nisha Somnath

The Singular Value Decomposition (SVD) and Principal Component Analysis (PCA)

Matrices and Vectors

Petri nets. s 1 s 2. s 3 s 4. directed arcs.

Representations of All Solutions of Boolean Programming Problems

An Holistic State Equation for Timed Petri Nets

Specification models and their analysis Petri Nets

ONE NOVEL COMPUTATIONALLY IMPROVED OPTIMAL CONTROL POLICY FOR DEADLOCK PROBLEMS OF FLEXIBLE MANUFACTURING SYSTEMS USING PETRI NETS

The Singular Value Decomposition

B553 Lecture 5: Matrix Algebra Review

Linear Algebra Section 2.6 : LU Decomposition Section 2.7 : Permutations and transposes Wednesday, February 13th Math 301 Week #4

Time(d) Petri Net. Serge Haddad. Petri Nets 2016, June 20th LSV ENS Cachan, Université Paris-Saclay & CNRS & INRIA

ADVANCED ROBOTICS. PLAN REPRESENTATION Generalized Stochastic Petri nets and Markov Decision Processes

A Note on Google s PageRank

Simulation of Spiking Neural P Systems using Pnet Lab

OPTIMAL TOKEN ALLOCATION IN TIMED CYCLIC EVENT GRAPHS

Biological Pathways Representation by Petri Nets and extension

Automata-based Verification - III

Applications of Petri Nets

AMS 209, Fall 2015 Final Project Type A Numerical Linear Algebra: Gaussian Elimination with Pivoting for Solving Linear Systems

HYPENS Manual. Fausto Sessego, Alessandro Giua, Carla Seatzu. February 7, 2008

Example Linear Algebra Competency Test

Automata-based Verification - III

On minors of the compound matrix of a Laplacian

Linear Time Analysis of Properties of Conflict-Free and General Petri nets

The State Explosion Problem

Conceptual Questions for Review

12/1/2015 LINEAR ALGEBRA PRE-MID ASSIGNMENT ASSIGNED BY: PROF. SULEMAN SUBMITTED BY: M. REHAN ASGHAR BSSE 4 ROLL NO: 15126

Markings in Perpetual Free-Choice Nets Are Fully Characterized by Their Enabled Transitions

Methods for the specification and verification of business processes MPB (6 cfu, 295AA)

Georg Frey ANALYSIS OF PETRI NET BASED CONTROL ALGORITHMS

A Structure Causality Relation for Liveness Characterisation in Petri Nets

Lab 8: Measuring Graph Centrality - PageRank. Monday, November 5 CompSci 531, Fall 2018

STRUCTURED SOLUTION OF STOCHASTIC DSSP SYSTEMS

Time and Timed Petri Nets

Preliminaries and Complexity Theory

Computational Complexity and Intractability: An Introduction to the Theory of NP. Chapter 9

Linear Algebra review Powers of a diagonalizable matrix Spectral decomposition

Finite Frames and Graph Theoretical Uncertainty Principles

Outline. Time Petri Net State Space Reduction Using Dynamic Programming and Time Paths. Petri Net. Petri Net. Time Petri Net.

Relations Graphical View

Classes of Petri Nets That a Necessary and Sufficient Condition for Reachability is Obtainable

3.3 Easy ILP problems and totally unimodular matrices

15 Singular Value Decomposition

Discrete Event Systems Exam

Chapter 7 Network Flow Problems, I

Chapter 1 Vector Spaces

MTH 464: Computational Linear Algebra

7. Queueing Systems. 8. Petri nets vs. State Automata

Combinatorial optimization problems

Theory of Computation Chapter 1: Introduction

Linear Algebra I Lecture 10

ECS289: Scalable Machine Learning

ON COST MATRICES WITH TWO AND THREE DISTINCT VALUES OF HAMILTONIAN PATHS AND CYCLES

Refined Inertia of Matrix Patterns

Root systems and optimal block designs

MPRI 1-22 Introduction to Verification January 4, TD 6: Petri Nets

18.312: Algebraic Combinatorics Lionel Levine. Lecture 19

Numerical Linear Algebra

THE MIRROR SYMMETRY CONJECTURE FOR NETWORKS ON SURFACES

Facebook Friends! and Matrix Functions

DECOMPOSITION OF PETRI NETS

CHAPTER 1. Relations. 1. Relations and Their Properties. Discussion

J.I. Aliaga 1 M. Bollhöfer 2 A.F. Martín 1 E.S. Quintana-Ortí 1. March, 2009

Timed Automata VINO 2011

Math 322. Spring 2015 Review Problems for Midterm 2

Row Reduction and Echelon Forms

Linear Algebra I Lecture 8

Linear Algebra: Matrix Eigenvalue Problems

Coloured Petri Nets Based Diagnosis on Causal Models

An Introduction to Spectral Graph Theory

Lecture Notes Introduction to Cluster Algebra

Exploiting Symmetry in Computing Polyhedral Bounds on Network Coding Rate Regions

Basic Test. To show three vectors are independent, form the system of equations

Linear Algebra review Powers of a diagonalizable matrix Spectral decomposition

Notes. Relations. Introduction. Notes. Relations. Notes. Definition. Example. Slides by Christopher M. Bourke Instructor: Berthe Y.

Control of Hybrid Petri Nets using Max-Plus Algebra

The doubly negative matrix completion problem

Spectral Clustering on Handwritten Digits Database Mid-Year Pr

This section is an introduction to the basic themes of the course.

Integer Linear Programming (ILP)

series. Utilize the methods of calculus to solve applied problems that require computational or algebraic techniques..

COMPRESSED STATE SPACE REPRESENTATIONS - BINARY DECISION DIAGRAMS

Using DERIVE to Interpret an Algorithmic Method for Finding Hamiltonian Circuits (and Rooted Paths) in Network Graphs

Technische Universität München, Zentrum Mathematik Lehrstuhl für Angewandte Geometrie und Diskrete Mathematik. Combinatorial Optimization (MA 4502)

Process Model Formulation and Solution, 3E4

MAC Module 2 Systems of Linear Equations and Matrices II. Learning Objectives. Upon completing this module, you should be able to :

Travelling Salesman Problem

Transcription:

Petri nets analysis using incidence matrix method inside ATOM 3 Alejandro Bellogín Kouki Universidad Autónoma de Madrid alejandro. bellogin @ uam. es June 13, 2008

Outline 1 Incidence matrix Tools 2 State machine Marked graph Free-choice net Extended free-choice net Asymmetric choice net 3 4 Incidence matrix Tools

Incidence matrix Tools Analysis methods for Petri nets may be classified into the following three groups: 1 Coverability (reachability) tree method 2 Matrix-equation approach 3 Reduction or decomposition techniques

Incidence matrix Incidence matrix Tools Given a Petri net (from now on PN), if we want to analyse it from an algebraic point of view, we need to get its incidence matrix. Definition It is an n m matrix, for a PN with n transitions and m places, and its typical entry is given by a ij = a + ij + a ij where a + ij = w(i, j) is the weight of the arc from transition i to its output place j, and a ij = w(j, i) is the weight of the arc from transition i from its input place j.

Incidence matrix Tools Incidence matrix: state equation Definition M k = M k 1 + A t u k where A = [a ij ] is the incidence matrix, u k is an n 1 column vector of n 1 0 s and one nonzero entry, indicating the transition fired, and M j is the net marking after j transitions have been fired.

Incidence matrix Tools Incidence matrix: applications We are going to explain how we have used these matrices in order to obtain results with using the techniques herewith listed: Subclassification or detection of particular structures Detection of siphons and traps

Incidence matrix Tools Incidence matrix: applications We are going to explain how we have used these matrices in order to obtain results with using the techniques herewith listed: Subclassification or detection of particular structures Detection of siphons and traps Structural properties Subclassification Detection of siphons and traps

Tools Incidence matrix Tools Name Functionality Finally used Matlab System solver No Numarray Python s library to work with matrices Yes Pipe Tool for creating and analysing PNs Yes slepc4py Python s library to wrap SLEPc eigensolver package No Table: Tools or libraries checked

Outline 1 Incidence matrix Tools 2 State machine Marked graph Free-choice net Extended free-choice net Asymmetric choice net 3 4

We use the following notation: t = {p : (p, t) F} is the set of input places of t t = {p : (t, p) F} is the set of output places of t p = {t : (t, p) F} is the set of input transitions of p p = {t : (p, t) F} is the set of output places of p All Petri nets considered in this section are ordinary, what means that all of its arc weights are 1 s.

State machine In this kind of net, each transition has exactly one input place and exactly one output place: t = t = 1 t T

State machine In this kind of net, each transition has exactly one input place and exactly one output place: t = t = 1 t T This condition, given the input and output matrices, is very simple: i j aij = 1, {, +} In other words, in all the rows of input and output matrices must be a nonzero element, and only one.

Marked graph Each place has exactly one input transition and exactly one output transition: p = p = 1 p P

Marked graph Each place has exactly one input transition and exactly one output transition: p = p = 1 p P This is very similar to the previous case: j i aij = 1, {, +} Equivalent to the following restriction: in all the columns of input and output matrices must be a nonzero element, and only one. Actually, this property is equivalent to check if the transpose net is a state machine.

Free-choice net In these nets, every arc from a place is either a unique outgoing arc or a unique incoming arc to a transition: p P, p 1 or (p ) = {p}

Free-choice net In these nets, every arc from a place is either a unique outgoing arc or a unique incoming arc to a transition: p P, p 1 or (p ) = {p} We can not express this condition in a simpler way, but we can give an algorithm: For each place in the input matrix (output place is equivalent to input transition): If it has more than one element nonzero (the place has two or more output transitions): For each transition from this place, check that it has only one element nonzero in its row (its only input is this place). If it is not true, the net is not a free-choice net.

Extended free-choice net It is a PN such that p 1 p 2 p 1 = p 2 p 1, p 2 P

Extended free-choice net It is a PN such that p 1 p 2 p 1 = p 2 p 1, p 2 P Like in the previous case, we can only give an algorithm: For each place p in the input matrix: For each place q p: Check that if their set of output transitions have empty intersection. If it is the case, continue. If not, the intersection has to be equal to the set of output transition of each place, i.e. both places must have the same output transitions, if it is not true, this net is not an extended free-choice net.

Asymmetric choice net This type of net is characterised by the following equation: p 1 p 2 p 1 p 2 or p 1 p 2 p 1, p 2 P

Asymmetric choice net This type of net is characterised by the following equation: p 1 p 2 p 1 p 2 or p 1 p 2 p 1, p 2 P This is a more relaxed form of the previous net, where the last equal condition is smoothed by the subset condition: For each place p in the input matrix: For each place q p: Check that if their set of output transitions have empty intersection. If it is the case, continue. If not, the set of output transition of one place must contain the other, or viceversa, if it is not true, this net is not an asymmetric choice net.

I Definitions x is a T -invariant (transition invariant) if A t x = 0 y is a P-invariant (place invariant) if Ay = 0

II At first sight, we thought this problem was a simple eigenvector problem, where the invariants are the eigenvectors. But: Problems 1 The incidence matrix is not, generally, a square matrix. 2 Even in the square matrix situation, the eigenvector found does not have the information we want. 1 pipe2.sourceforge.net

II At first sight, we thought this problem was a simple eigenvector problem, where the invariants are the eigenvectors. But: Problems 1 The incidence matrix is not, generally, a square matrix. 2 Even in the square matrix situation, the eigenvector found does not have the information we want. We use PIPE library 1 to find the minimal generating set of all place invariants, since it worked properly in all tested examples. It uses the algorithm proposed by D Anna and Trigila in [1] (very good performance). 1 pipe2.sourceforge.net

I Definitions Siphon (or deadlock) is a set of places S such that every transition having an output place in S has an input place in S: S S Trap is a set of places Q where every transition having an input place in Q has an output place in Q: Q Q The word set implies the calculations over all the possible groups of places that can be created. Fortunately, the order is not important.

II The total number of sets that have to be checked is m k=1 ( ) m = k m k=1 m! k!(m k)! = 2m 1, with m = P For each set of places, the sets of input and output transitions are generated. At this point, a simple comparison between sets (operation subset of ) is carried out, and depending on the answer, we have a trap, a siphon or nothing at all Example In the problem of philosophers, our program finds 255 siphons and 255 traps when 4 philosophers come into play (this net has 8 transitions and 10 places).

I Motivation The problem of generating the reachability (coverability) graph of a specific PN is a very complex and time consuming task.

II Algorithm Find all the sequences U that can potentially reach to the marking M Take into account the order

II Algorithm Find all the sequences U that can potentially reach to the marking M Take into account the order Combinatorial problems Calculate all the possible firing sequences. At this point we have to limit the number of times each transition can be executed. Calculate all the permutations of a given sequence of transitions, to consider the order.

: performance P T L Time 1 (secs.) Time 2 (secs.) Valid sequences found Max. length of sequence 3 4 1 1 1 1 3 3 4 3 1 4 1 7 3 4 5 1 38 2 8 3 4 10 1 38 2 8 4 3 1 1 1 1 2 4 3 3 1 1 1 6 4 3 5 1 540 1 9 4 3 10 2 460 0 (HE) 0 10 8 1 1 2 (HE) 8 7 10 8 2 1 860 (HE) 17 9 10 8 3 1 754 (HE) 11 7 Table: Time spent to obtain a solution for the reachability to a marking problem (if any). Time 1 is the time to get all possible firing sequences, while Time 2 is the time spend to check if the ordered sequences are valid. HE means that a heap error has occurred.

Outline 1 Incidence matrix Tools 2 State machine Marked graph Free-choice net Extended free-choice net Asymmetric choice net 3 4

Future work Future work Suggest some reduction rules (preserving system properties) to the user if some specific configurations have been found, using the analysis already explained Continue working on the performance issue when deciding about the reachability to a marking.

Conclusions Conclusions Theoretically, algebraic analysis is more appropriate for big Petri nets than other analysis methods, like reachability graph, but in practice, some of these applications require to work with too many combinations, what makes algebraic analysis unfeasible in these cases. We have provided a dictionary between some properties that can be analised in a Petri net, and the equivalent equations/algorithms that the corresponding matrices (related with the Petri net) must hold.

Outline 1 Incidence matrix Tools 2 State machine Marked graph Free-choice net Extended free-choice net Asymmetric choice net 3 4

M. D. Anna and S. Trigila. Concurrent system analysis using petri nets: an optimized algorithm for finding net invariants. Comput. Commun., 11(4):215 220, August 1988. René David and Hassane Alla. Discrete, Continuous, and Hybrid Petri Nets. Springer, 1 edition, November 2004. T. Murata. Petri nets: Properties, analysis and applications. Proceedings of the IEEE, 77(4):541 580, 1989.