Version 2.3 (December 1989) (This document was scanned and formatted from an old printed manual).
This software was developed at the Control and Microinformatics Laboratory (LCMI) of Electrical Engineering Department of the Federal University of Santa Catarina, Brazil, between 1985 and 1990.
WARNING: this program is reliable but quite old (1990). I'm no more providing any kind of support on it, please don't ask me to do so. Feel free to download the source code and modify/patch it if you want.
The ARP (Portuguese for “Petri Net Analyzer and Simulator”) tool is a program for helping design with Petri nets. It was developed in the LCMI/UFSC (Brazil) between 1985 and 1990. It provides some useful tools for place-transition, timed, and extended timed Petri nets.
The ARP tool was written in Turbo Pascal 6.0. It's structure is very modular and provides a simple and intuitive user interface, using textual windows. The program structure is modular and allows to easily design and integrate new tools for Petri net analysis or manipulation.
The program can be used on PC-like systems running DOS 3.0 or above (including all Windows variants), with 256 KBytes of RAM or more. It has two files:
To start the program, just type “arp” in the command prompt (or double-click the program icon in Windows File Manager). After starting, it will present you the program main screen and enters the edition window:
The commands are activated by typing the highlighted characters of the options shown in the active window (that one with the highlighted frame). To leave a window, just type ESC, the space bar or any key not used by that window's options. Results are also presented in a text window, which can be scrolled using the arrow keys.
The edition window concentrates all the file manipulation functions. A Petri net file is just a flat ASCII text file with the extension ”.pn”, containging the Petri net description. A Petri net is described using a simple language, similar to Pascal, wich will be described later in this document. The commands allowed in the edition window are:
The language used for describing Petri nets in the ARP tool has a Pascal-like syntax. It allows to identify places and transitions by names with up to 20 characters. The accepted characters are:
A..z a..z 0..9! + - # @ ^ %
The basic structure of a Petri net description is:
net network_name ; constants declaration ; nodes (places and transitions) declaration ; structure (arcs) declaration ; endnet.
Constants can be defined as following:
const free_places = 7; sent_items = 10; TimeOut = 45;
The nodes declaration includes the declaration of transitions and places, with a maximum of 150 nodes of each type. The declaration of places has of the following form (the value between brackets indicates the initial marking of the declared places, with default zero and maximum 254):
nodes robot_stopped, mach1_running : place; robot_waiting, mach1_stopped, mach2_waiting : place (1); items_in_stock : place (free_places);
The declaration of transitions is similar. In the case of time Petri nets (using the Merlin timing model), one can define the Static Earliest Firing Time (SEFT) and Static Latest Firing Time (SLFT) for each transtion, with default in [0,0]. The probability distribution function associated to each firing interval can also be defined (default is UNIFORM):
nodes robot_starts, robot_resets : transition; mach1_starts : transition [5,TimeOut]; item_arrives : transition [0,5] EXPON (10); robot1_stops : transition [2,8] NORMAL (5);
The intervals accept integer values or constants between 0 and 32000. The probability distribution curves (used only by the performance evaluation module) accepted are:
One should observe that the shapes of probability density curves does not depend on absolute values but only on the ratio between their maximum and minimum values.
The structure declaration allows to define the arcs bounding places to transitions and vice-versa. Its general form is:
transition: (input places), (output places) ;
This structure must be repeated for each transition of the net. The names of the places are separate for commas. In the case of weighted arcs we have:
transition: (..., weight * place, ... )
where the weight can be a numerical value or a constant between 0 and 254.
The example bellow illustrates the description language. The Petri net describes a manufacuring system with a machine-tool and a robot that feeds it, loading and unloading items from/to a stock.
Net Example;
Const
Input_items = 2; { items in the input of the machine-tool }
Nodes
Stock: Place (Input_items); { item stock }
{ robot nodes }
Robot_free: Place (1);
Loading, Unloading: Place;
Take_new_item: Transition [ 1,10 ];
Drop_old_item: Transition [ 3,5 ];
Load_machine, Unload_machine : Transition [ 5,15 ] Normal (5);
{ machine-tool nodes }
Machine_busy: Place;
Machine_free: Place (1);
Structure
Take_new_item : (Stock, Robot_free), (Loading);
Load_machine : (Loading, Machine_free), (Machine_busy, Robot_free);
Unload_machine : (Machine_busy, Robot_free), (Unloading, Machine_free);
Drop_old_machine : (Unloading), (Stock, Robot_free);
endNet.
The state enumeration analysis is based on building a graph which represents all the states reachable in a Petri net by firing its transitions. The ARP tool uses the basic Karp-Miller algorithm, as described in [Peterson XX]. However, we introduce a small modification in the criteria used to attribute the ω symbol to a place marking (meaning infinite growth of tokens in that place). Our approach allows a more refined analysis of unlimited Petri nets. The maximum number of markings depends on the available memory.
For time Petri nets the states are grouped in state classes with common features. Each state class is composed by a marking and a firing domain (enabled transitions set, each transition with its respective dynamic firing interval).
When activated, this module shows the initial marking to be used in the state/class enumeration. The marking can be modified using the arrow keys and typing the desired values (between 0 and 254). To leave this window and to start the enumeration just press ESC. The program then builds the enumeration graph and produces three textual outputs:
The observed properties output informs about some good properties verified in the generated graph:
The graph output indicates the structure of a graph representing all the transitions firings leading from a marking to another. Each text line has the following form:
E37: (t4 [3,7]: E51) (t9 [5]: E102)
This means that, from the E37 state the transition t4 can be fired (between 3 and 7 time units) leading to the E51 state, or the transition t9 can be fired (at 5 time units, leading to state E102).
The markings output text indicates the contents of each state and the firing domain of the transitions enabled in each state. Each text line has the following form:
E37: { p1, p2, 3*p3, w*p4 } D: { ta, tb [3], tc[4,9] }
This indicates that in the E37 state the places p1 and p2 have one token each, the place p3 has 3 tokens and the place p4 has infinite tokens (a token growth was detected in this place). In the firing domain, transition ta firing is allowed in [0,0], tb in [3,3] and tc in [4,9] time units, respectively.
The invariant analysis determines, through calculations on the Petri net incidence array, sets of places or transitions with special features, as token conservation or cyclical behavior.
The linear place invariants indicate the conservative components of the net under analysis. Conservative components are sets of places in which the weighed sum of tokens is constant for any reachable marking. Any integer vector xn such that Cmn x = 0 is a linear place invariant, where xi is the weight of place pi in the invariant (Cmn is the incidence array of a Petri net with m transitions and n places).
The linear transition invariants indicate the cyclical components of the network. A cyclical component is a set of transitions that when fired in some order forms a cycle leaving back to the starting state. Any integer vector y such that ym Cmn = 0 is a linear transition invariant, where yi indicates the number of firings of transition ti needed to form the cycle (the firing order is not calculated). It must be observed that the invariants depend only on the structural features of the net, and not on its initial state. Therefore some indicated transition invariants can be unreachable for a given initial marking.
The invariant analysis module allows to define a set of mandatory or forbidden nodes. This allows to filter the results, showing only invariants that contain the mandatory nodes and not contain the forbidden nodes. For selecting mandatory or forbidden nodes you can use the arrow keys, ENTER and ESC.
As result, The module provides linearly independent invariant base and all the minimum positive invariantes (which are not superposition of other positive invariants). A covering test is also performed, and a topology test, indicating which invariants are state machines or event graphs:
One must observe that such tests ignore the net timing information; only the topology aspects are considered.
The language equivalence verification allows to observe details of a Petri net behavior, focusing attention in some parts of the state graph and abstracting on the remaining. It consists on considering a set of transitions as being “visible” events, while the other transitions are considered invisible. From that, the state graph is reduced in order to get a minimum finite deterministic automata, containing only the visible events.
The user can define which transitions are visible (through the arrow keys, ENTER and ESC) and the program then calculates the state graph and process it in order to get the reduced automata containing only the visible transitions. It also calculates all the possible firing sequences in the reduced automata. In the firing path description, the symbols ”{” and ”}” indicate repetition. Therefore, a firing path described as “t1 {t3 t4}” means ” t1 t3 t4 t3 t4 …”. The module also allows the user to describe another state graph, in order to automatically compare it with the reduced automata found, but the graph matching is not completely implemented.
The simulation module allows the user to follow the net evolution, choosing the transitions to fire and observing the net state, step by step. The simulation window looks like this:
The right window has a diagram of the current simulation track. In the left side of the track the name of each state is shown (if memorized), or its depth from the initial state is indicated. In the right side of the track the name of each fired transition is indicated. The numbers indicated by ”«” show the number of transitions still not fired in each state.
If the track reachs a deadlock it finishes in a horizontal bar. If the state reached by a transition firing is duplicate of some state already in the track, this is indicated by a hatched line (in this case, the current state will not change).
The commands available are:
This module works with extended time Petri nets (Petri nets with a firing time interval associated to transitions, and a probability density function associated to each firing interval). Roughly, in this module the Petri net under evaluation is quickly and continuously played (simulated), while statistical information is gathered. The evaluation is concluded (and results are shown) when the statistical data reaches some stability criteria.
Two approaches for performance evaluation are considered: state-driven and event-driven. In the state-driven mode, the user defines an initial state (marking) and up to 10 final states. The evaluation module then simulates the net through simulation cycles. Each simulation cycle evolves the net from the initial state, by firing enabled transitions until a final state is reached. Transitions are fired at random times, respecting their associated firing intervals and firing probabilities. Also, if a deadlock state is found, or if a maximum number of firings is reached, the cycle is finished. After each cycle, statistical information is gathered and the net is put back in the initial state. Simulation cycles are repeated until a given precision is attained or the user press a key. The event-driven mode has a similar behavior, but the user defines an initial event (transition) and up to 10 final events (transitions). With this approach the user can estimate average times between events and the probability of occurrence of events.
During the evaluation some intermediate results are shown, just to give the user an idea of the final values and their convergence.
The user has as allowed options of input:
The performance evaluation report contains the following statistical measures:
The printing module transform the data into memory in a listing in the printer or a file. The output can be redirected by the user to a file in the current directory, where all the outputs are appended. The output file gets the ”.LST” extension.