Generalized nets and intuitionistic fuzzy pairs as tools for modelling of flexible manufacturing systems

: The concepts of Generalized Nets (GNs) and Intuitionistic Fuzzy Pairs (IFPs) are described and some of their basic properties are given. GNs are one of the extensions of Petri nets, which include as particular cases all other Petri net modiﬁcations. IFPs are the evaluations of elements of a given universe about some intuitionistic fuzzy set. Three GN models using IFPs of a concrete ﬂexible manufacturing system are used for an example of the possibility of the GNs, working with IFPs as evaluations, to describe the functioning and the results of the work of adaptive systems.


Introduction
The Generalized Nets (GNs, see [6,9]) are defined as extensions of the ordinary Petri nets and their modifications, but in a way that is principally different from the ways of defining the other 40 types of Petri nets. The additional components in the GN definition give more and broader modelling possibilities and determine the place of the GNs among the various types of Petri nets, comparable to the place of the Turing machine among the finite automata. GNs have more than 20 extensions and for each one of them it is proved that it is a conservative one, i.e., the functioning and results of the work of every net from each extension can be described by an ordinary GN. One of the recently defined extensions is a Generalized Nets with Characteristics of the Places (GNCP, see [2]). It is important for the applications because it allows simpler graphical representation.
In the past 20 years, the GNs have been applied for modelling of processes in the areas of systems theory (see [7]) and of the Artificial Intelligence (AI; see, e.g., [8,11]). Nowadays, GNs have many applications in medicine, chemical industry, public transportation, etc.
In Section 2, short remarks on GNs, GNCPs, and algorithms for tokens transfer are presented. The Intuitionistic Fuzzy Pairs (IFPs, see [13]) are intuitionistic fuzzy objects used for evaluation. In Section 2.4, short remarks on IFPs are given.
In Section 3, some of the possibilities for application of the GNs, using intuitionistic fuzzy evaluations, as tools for modelling of flexible manufacturing systems (FMS, see, for instance, [16-19, 21-24, 26-32, 37]) are discussed.

Definition of the concept of a Generalized Net (GN)
The concept of a Generalized Net (GN) is described in details in [6,9].
The GNs are defined in a way that is principally different from the ways of defining the other types of Petri nets. The first basic difference between GNs and the ordinary Petri nets is the "place -transition" relation (see, e.g., [35]). Here, the transitions are objects of a more complex nature. A transition may contain m input places and n output places where m, n ≥ 1.  (b) t 1 is the current time moment of the transition's firing; (c) t 2 is the current value of the duration of its active state; (d) r is the transition's condition determining which tokens will pass (or transfer) from the transition's inputs to its outputs. It has the form of an Index Matrix (IM; see [5,10]): r i,j is the predicate that corresponds to the i-th input and j-th output place. When its truth value is "true", a token from the i-th input place transfers to the j-th output place. Otherwise, this is not possible; (e) M is an IM of the capacities of transition's arcs: (f) is an object of a form similar to a Boolean expression. It may contain as variables the symbols that serve as labels for a transition's input places, and is an expression built up from variables and the Boolean connectives ∧ and ∨ and the semantics of which is defined as follows: ∧(l i 1 , l i 2 , . . . , l iu ) − every place l i 1 , l i 2 , . . . , l iu must contain at least one token, ∨(l i 1 , l i 2 , . . . , l iu ) − there must be at least one token in all placesl i 1 , l i 2 , . . . , l iu , where {l i 1 , l i 2 , . . . , l iu } ⊂ L .
When the value of a type (calculated as a Boolean expression) is "true", the transition can become active, otherwise it cannot.
The ordered four-tuple A is a set of transitions; (b) π A is a function giving the priorities of the transitions, i.e., π A : (c) π L is a function giving the priorities of the places, i.e., π L : L → N , where L = pr 1 A ∪ pr 2 A, and pr i X is the i-th projection of the n-dimensional set, where n ∈ N, n ≥ 1 and 1 ≤ k ≤ n (obviously, L is the set of all GN places); (d) c is a function giving the capacities of the places, i.e., c : L → N ; (e) f is a function that calculates the truth values of the predicates of the transition's conditions. For the GN described here, let the function f have the value "f alse" or "true", that is, a value from the set {0, 1}; (f) θ 1 is a function which indicates the next time moment when a certain transition Z can be activated, that is, θ 1 (t) = t , where pr 3 Z = t, t ∈ [T, T + t * ] and t ≤ t . The value of this function is calculated at the moment when the transition ceases to function; (g) θ 2 is a function which gives the duration of the active state of a certain transition Z, i.e., θ 2 (t) = t , where pr 4 Z = t ∈ [T, T + t * ] and t ≥ 0. The value of this function is calculated at the moment when the transition starts functioning; (h) K is the set of the GN's tokens.
(i) π K is a function which gives the priorities of the tokens, that is, π K : K → N ; (j) θ K is a function which gives the time moment when a given token can enter the net, that is, θ K (α) = t, where α ∈ K and t ∈ [T, T + t * ]; (k) T is the time moment when the GN starts to function. This moment is determined with respect to a fixed (global) time scale; (l) t o is an elementary time-step, related to the fixed (global) time-scale; (m) t * is the duration of the functioning of the GN; (n) X is the set of all initial characteristics which the tokens can obtain on entering the net; (o) Φ is the characteristic function that assigns new characteristics to every token when it makes the transfer from an input to an output place of a given transition.
(p) b is a function which gives the maximum number of characteristics a given token can obtain, that is, b : K → N .
For example, if b(α) = 1 for any token α, then this token will enter the net with some initial characteristic (marked as its zero-characteristic) and subsequently it will keep only its current characteristic.
When b(α) = ∞, token α will keep all of its characteristics. When b(α) = k < ∞, except its zero-characteristic, token α will keep its last k characteristics (characteristics older than the last kth one will be "forgotten"). Hence, in general, every token α has b(α) + 1 characteristics on leaving the net.
It is also convenient to assume that functions f, θ 1 , θ 2 and Φ have other forms. For example, function Φ can be represented in the form: where Φ i calculates the characteristics that the tokens will receive in the i-th GN place and |X| is the cardinality of the set X.
A given GN may not have some of the above components. In these cases, any redundant component will be omitted. The GNs of this kind form special classes of GNs called reduced GNs.
The static part of a given GN is specified by the elements of the set pr 1,2,6,7 A, where for a given n-dimensional set X(n ≥ 2) , that is, the static part of a GN is specified by the collection of the following elements for each transition: the input and output places, the index matrix of the arcs and the transition type. The dynamic character of the net is due to the GN's tokens and the transitions' conditions (pr 5 A), the temporal character comes from components T, t o , t * and from the elements of the set pr 3,4 A. Finally, components Φ, X and b play the role of the memory of the GN.
Various functions are also related to these four GN components: functions π A , π L , c to the static structure; f, π K to the dynamical elements; θ 1 , θ 2 and θ K to the temporal components.
The definition of a GN is more complex than the definition of a Petri net and so the algorithms of the tokens' transfer in the GNs are also more complex. On the other hand, as the GNs are more general, the algorithms for the tokens' movements in the GN are more general than those for Petri nets. In a Petri net implementation, parallelism is reduced to a sequential firing of its transitions and the order of their activation in the general case is probabilistic or dependent on the transitions' priorities, if such exist. The GN's algorithms provide means for a more detailed modelling of the described process. The algorithms for the token's transfers take into account the priorities of the places, transitions and tokens, that is, they are more precise.
Following [6,9] we note that the GNs have more than 20 conservative extensions (i.e., such that the functioning and the results of their work can be represented by an ordinary GN). In the next subsection, one of them will be described.
Operations and relations are defined over the transitions, as well as over the GNs in general. The operations, defined over the GNs -"union", "intersection", "composition" and "iteration" (see [6,9]) do not exist anywhere else in the Petri net theory. They can be transferred to virtually all other types of Petri nets (obviously with some modifications concerning the structure of the corresponding nets). These operations are useful for constructing GN models of real processes.
The idea of defining operators over the set of GNs in the form suggested below dates back to 1982 (see [6,9]). It is a proper extension of the Valk's idea from [36]. Now, the operator aspect has an important place in the theory of GNs. Six types of operators are defined in its framework. Every operator assigns to a given GN a new GN with some desired properties. The comprised groups of operators are:

Algorithms for transition functioning and GN functioning
The definition of a GN is significantly more complicated than the definition of a Petri net. Therefore, it is naturally to expect that the algorithm for transfer of tokens is also more complicated.
During the years the algorithms for transitions and GN's functioning have been modified with the aim of optimizing them. Despite this, the later modifications (see [14,15,20]) follow more or less the algorithms described in [6].
The most general form of the algorithm of transition functioning, referred to as Algorithm A, is presented here. In this form of the algorithm, the possibility of transferring tokens to output places which have reached their capacities, if the incoming token can merge with one of the tokens in the output place, is considered (see [4]).
Algorithm A (A01) The input and output places of the transition are ordered according to their priorities.
(A02) The tokens in the input places are ordered according to their priorities. The tokens in a given place are divided into two groups. The first group consists of those tokens which can be transferred to output places at the current time step. The second group is initially empty.
(A03) An empty IM R is generated which corresponds to the IM r of the predicates of the transition's conditions. Value "0" is assigned to all elements R i,j of R which are: (a) in a row corresponding to empty input place; (b) in a column corresponding to a full output place; (c) in a place with indexes (i, j) for which the predicate r i,j is given as f alse or m i,j = 0.
Value "1" is assigned to all other elements of R which have indexes (i, j) for which the predicate r i,j is given as true.
(A04) The ordered places are processed starting with the place having the highest priority in which there is at least one token and from which a token has not been transferred to output place at the current time step. The following steps are done one after the other: (a) The value of R i,j in R is checked and if R i,j = 1, then go to (A04c). If R i,j has no assigned value, then go to (A04b). If R i,j = 0, then check if in the corresponding output place there is a token which can merge with the current token. If there is such token, go to (A04c), else go to (A04d).
(b) The truth value of the predicate r i,j of r is checked. If this value is true, then go to (A04c), else go to (A04d).
(c) The current token is transferred to the j-th output place. If there is a suitable token there, it merges with it. If it cannot merge with another token in the j-th output place or if it has merged but there are no other tokens in the input places which can merge with it, the token obtains its next characteristic.
If there is at least one token in the input places of the transition which can be merged with the current token, it will wait in the output place for this to happen and will obtain new characteristic either after the token is merged with the last of the suitable tokens from the input places or at the last time moment of the functioning of the transition.
(d) If a transfer has been made and the current token cannot split, or if it can split and all predicates of the corresponding row of r have been checked, go to step (A05), else go to (A04a).
(A05) If the token cannot be transferred during the current time step, it is moved to the second group of tokens of the input place.
(A06) The current number of tokens in all places to which token has been transferred, without merging, is increased by 1.
(A07) The current number of tokens in the input places from which a token has been transferred to the output places is decreased by one. If the number of tokens in the input place becomes 0, then 0 is assigned to the elements of the corresponding row of R.
(A08) The capacities of all arcs through which a token has been transferred are decreased by 1.
If the current capacity of an arc becomes 0, 0 is assigned to the corresponding element of the IM R.
(A09) If there are input places with lower priority from which token has not been transferred to the output places, the algorithm continues with step (A04). Otherwise, go to step (A10).
(A10) The current model time is increased by t 0 .
(A11) Check if the current model time is greater or equal to t 1 + t 2 . If it is not, then the algorithm continues with step (A04). Otherwise, the algorithm continues with step (A12).
(A12) End of the transition functioning.
The general algorithm for GN's functioning is denoted by Algorithm B. It uses the notion of abstract transition which is a union of all activated transitions at a certain time moment.
Algorithm B (B01) All tokens α for which θ K (α) ≤ T enter the input places of the GN.
(B02) An abstract transition is constructed. It is initially empty.
(B03) Check whether the current time moment is greater or equal to T + t * .
(B04) If the answer to the question in (B03) is "no", go to step (B12), else go to step (B05).
(B05) Search for all transitions for which the value of t 1 is greater or equal to the current time. (B07) All transitions for which the truth value of their types, evaluated according to step (B06), is 1 are added to the abstract transition.
(B08) Algorithm A is applied to the abstract transition.
(B09) All transitions which become non-active at the current time step are removed from the abstract transition.
(B10) The current time moment is increased with t 0 .
For the functioning of each GN according to the algorithms above, the following important theorem is proved in [6] Theorem 1. No conflict situations appear in a GN which has no missing components.

Generalized nets with characteristics of the places
Up to 2013, the only GN extension in which the places receive characteristics was the Intuitionistic Fuzzy Generalized Nets of type 2 (IFGN2). However, the tokens in IFGN2 are considered quantities of some substance that flow into the net and they do not obtain characteristics.
This leads to the idea of combining in one net tokens in the sense of the ordinary GNs with places in the sense of IFGN2.
One justification for the introduction of the new extension is that in many GN models the places represent some real objects whose properties change with time. For instance, the place can be a bus station and its characteristic the number of people at a given time moment. In order to model such processes with GNs we need additional tokens, places and arcs which would make the graphical representation of some models way too complicated. The resulted extension was called Generalized Nets with Characteristics of the Places (GNCP). Formally, a GNCP E CP is the oredered four-tuple where all other components with the exception of the characteristics functions Y and Ψ have the same meaning as in the ordinary GNs. Here, the function Y assigns initial characteristics to some of the places of the net and Ψ assigns characteristics to some of the places but only if tokens have entered them at the current time step. The places which can obtain characteristics are represented by two concentric circles in the graphical representation of the net.
The GNCP is first defined in [2]. Also there it is proved that if Σ CP is the class of all GNCP, then Algorithms for transition and GNCP functioning in the case when merging of tokens is allowed are described in [4]. The algorithms are almost identical to the ones in the ordinary GNs. The most important difference is that the values of the characteristic function Ψ are evaluated at the current time step only for those places which can obtain charcteristics, and only if a token has entered them during the current time step.
Apart from the simplification of the graphical representation of the models, the GNCP can be used for evaluation of places, tokens, transitions and whole nets on the basis of the characteristics of the tokens and the places [1, 3].

Intuitionistic fuzzy pairs (IFPs)
The Intuitionistic Fuzzy Pair (IFP; see [13]) is an object in the form a, b , where a, b ∈ [0, 1] and a + b ≤ 1, that is used as an evaluation of some object or process and which components (a and b) are interpreted as degrees of membership and non-membership, or degrees of validity and non-validity, or degrees of correctness and non-correctness, etc.
Let us have two IFPs x = a, b and y = c, d . Below, we give examples for definitions of operations "conjunction" and "disjunction", and of relations: x ∨ 1 y = max(a, c)), min(b, d) , x ∧ 1 y = min(a, c), max(b, d) , x ≤ y if and only if a ≤ c&b ≥ d, The last operation can play simultaneously a role of "conjunction" and "disjunction".

GNs and FMSs
In a series of papers (see, e.g, [12,33,34] In the paper, we describe three GN models of a FMS. In them, for the first time, we describe (in terms of GNs) the possibility for evaluation of the scores of the separate machines. Each machine is represented by a separate place. In the second GN model, we represent all machines from one type by one place with capacity equal to the number of these machines. In this model, for the first time we describe (in terms of GNs) the possibility of a wreck in some machine. In the third model, also for the first time, the process is modelled by a GNCP which is a modification of the first GN model. In it, the transfer of workpieces by transport units is described.

First GN model of a FMS
Following [34], we shall construct a GN (see Fig. 2), describing the functioning of a given FMS and, simultaneously, make decisions when some conflicts are generated in the system.
Let us have again three types of machines and three types of workpieces -large, middle, and small, obtaining workpieces by the above described conditions; and let again their numbers are m, n, p ≥ 1, as in the first model. Each workpiece is represented by a GN token with an initial characteristic: "type of the workpiece (large, medium or small), list of the procedures that must be realized over it, duration of each one of the procedures, time moment of workpiece entering the GN, priority".
The token δ stays permanently in place l 16 . Initially, it has a characteristic: "score of the first large-sized up machine; ...; score of the m-th large-sized up machine; score of the first mediumsized up machine; ...; score of the n-th medium-sized up machine; score of the first small-sized up machine; ...; score of the p-th small-sized up machine".
Each score has the form of an IFP and a natural number, representing the number of workpieces that have been processed by the respective machine. Initially, each score has the form 0, 0, 0 . The GN places have the following meaning: l 1 : beginning of the process; l 2 : the workpiece is in warehouse and waits to be processed; l 3 : the workpiece goes for a procedure; l 4 : the workpiece leaves the system after processing; l 5,1 : the workpiece starts to be processed by the first large-sized up machine; . . . l 5,m : the workpiece starts to be processed by the m-th large-sized up machine; l 6,1 : the workpiece starts to be processed by the first medium-sizes up machine; . . . l 6,n : the workpiece starts to be processed by the n-th medium-sized up machine; l 7,1 : the workpiece starts to be processed by the first small-sized up machine; . . . l 7,p : the workpiece starts to be processed by the p-th small-sized up machine; l 8,1 : the workpiece is being processed by the first large-sized up machine; l 9,1 : the workpiece process finishes by the first large-sized up machine and it goes for measurement; . . . l 8,m : the workpiece is in a process by the m-th large-sized up machine; l 9,m : the workpiece process finishes by the m-th large-sized up machine and it goes for measurement; l 10,1 : the workpiece is in a process by the first medium-sizes up machine; l 11,1 : the workpiece process is finished by the first medium-sized up machine and it goes for measurement; . . . l 10,n : the workpiece is being processed by the n-th medium-sized up machine; l 11,n : the workpiece process is finished by the n-th medium-sized up machine and it goes for measurement; l 12,1 : the workpiece is being processed by the first small-sized up machine; l 13,1 : the workpiece process is finished by the first small-sized up machine and it goes for measurement; . . . l 12,p : the workpiece is being processed by the p-th small-sized up machine; l 13,p : the workpiece process is finished by the p-th small-sized up machine and it goes for measurement; l 14 : the workpiece waits for measurement; l 15 : the workpiece is measured; l 16 : the workpiece goes for a next procedure; l 17 : the workpiece parameters are not standard and it is shelved; l 18 : the workpiece is suitable for successive processing.   , where • W 1,2 ="there is not a suitable free machine or there are workpieces in place l 2 from the same type", • W 1,3 = ¬W 1,2 , • W 2,3 ="there is a suitable free machine and a suitable workpiece in place l 2 from the same type", • W 2,2 = ¬W 2,3 , • W 16,2 ="there is not a suitable free machine and the workpiece will not leave the system", • W 16,3 ="there is a suitable free machine and the workpiece will not leave the system", • W 16,4 ="the workpiece must leave the system", where ¬P is the negation of predicate P .
After the tokens have been transferred to the output places of transition Z 1 , they obtain, respectively, the following characteristics: • "moment of entering of the workpiece" in place l 2 , • "identifier of a free machine" in place l 3 , • "duration of the processing of the workpiece; estimation (e.g., from financial point of view) of the workpiece" in place l 4 .    where • U = "the current machine is free, it can realize the current procedure for the current workpiece and it has the highest score among all free large machines", • U = "the current machine is free, it can realize the current procedure for the current workpiece and it has the highest score among all free middle machines", • U = "the current machine is free, it can realize the current procedure for the current workpiece and it has the highest score among all free small machines", • W = "the work-piece is large-sized up", • W = "the work-piece is medium-sized up", • W = "the work-piece is small-sized up". After the tokens have been transferred to the output places of transition Z 2 , they obtain, respectively, the following characteristics: "identifier of the large-sized up machine" in places l 5,1 . . . l 5,m , "identifier of the medium-sized up machine" in places l 6,1 . . . l 6,n , and "identifier of the small-sized up machine" in places l 7,1 . . . l 7,p .
Transitions After the tokens are transferred to the output places of transitions Z 3,1 , . . . , Z 3,m , they do not obtain any characteristic in place l 8,k and they obtain the characteristics: "current procedure by a large machine is finished" in place l 8,k .
After the tokens transfer to the output places of transitions Z 4,1 , . . . , Z 4,m , the tokens do not obtain any characteristic in place l 10,k and they obtain the characteristics: "current procedure by a middle machine is finished" in place l 10,k .
When some of the predicates W 9,i,14 , W 11,j,14 , W 13,k,14 have a truth value true, workpieces enter place l 14 with a characteristic: "time moment of current token entering place l 14 ".
In the case when some of the predicates W 9,i,15 , W 11,j,15 , W 13,k,15 has a truth value true, workpieces enter place l 15 with a characteristic: "duration of the staying of current token in place l 14 ".
Therefore, this characteristic gives information for the duration of the waiting of the current workpiece before entering measuring instrument.
The current characteristic of the δ-token in place l 18 is changed every time some measuring machine finishes its work as follows. If before the current measurement of a workpiece from the j-th machine from the i-th type, the score of this machine is where x old i,j is the number of all proceeded workpieces by the current machine before the current time moment, then the next score of this machine will be: x old i,j ν old i,j + 1 x old i,j + 1 , x old i,j + 1 , if the workpiece is directed for processing in another machine The places capacities are infinite (i.e., they can accumulate arbitrary many tokens) with the exception of places l 5 , l 6 , l 7 , l 10 , which have the following capacities: c(l 5 ) = n L , c(l 6 ) = n M , c(l 7 ) = n S , c(l 10 ) = n E , where n E is the number of measuring machines.
Each transition is activated in each time step of the GN functioning and has duration of one time step. The transitions are activated when there exists at least one token in at least one of their input places.

Second GN model of a FMS
Extending [34], we shall construct a GN (see Fig. 3), describing the functioning of a given FMS and simultaneously, make decisions when some conflicts are generated in the system.
Let us have three types of machines and three types of workpieces: big (or large), middle (or medium), and small. The small-sized up machines can process only small-sized up workpieces. The medium-sized up machines can process small-and medium-sized up workpieces. The largesized up machines can process all types of workpieces. It is not effective, when a larger machine processes smaller workpieces either when there is a free smaller machine, or when there is at least one larger workpieces pending.
Each workpiece is represented by a GN token with an initial characteristic: "type of the workpiece (large, medium or small), list of the procedures, that must be realized over it, duration of each one of the procedures, time moment of workpiece entering the GN".
Let m, n, p ≥ 1 be three fixed natural numbers, that correspond to the numbers of large, middle and small machines.
The token δ stays permanently in place l 23 . Initially, it has a characteristic: "score of the first large-sized up machine; ...; score of the m-th large-sized up machine; score of the first mediumsized up machine; ...; score of the n-th medium-sized up machine; score of the first small-sized up machine; ...; score of the p-th small-sized up machine".
The GN places have the following sense: l 1 : beginning of the process; l 2 : the workpiece is in warehouse and waits to be processed; l 3 : the workpiece goes for a procedure; l 4 : the workpiece leaves the system after processing; l 5 : the workpiece is processed by a large-sized up machine (its capacity is m); l 6 : the workpiece is processed by a medium-sized up machine (its capacity is n); l 7 : the workpiece is processed by a small-sized up machine (its capacity is p); l 8 : the workpiece is returned to the warehouse or it must leave the system; l 9 , l 12 , l 15 : the workpiece waits its machine to be repaired (their capacities are m, n, p, respectively); l 10 , l 13 , l 16 : the workpiece goes for measurement (their capacities are m, n, p, respectively); l 11 , l 14 , l 17 : the workpiece goes to another machine, because the damage cannot be repaired (their capacities are m, n, p, respectively); l 18 : the workpiece waits for measurement (its capacity is m + n + p); l 19 : the workpiece is measured; l 20 : the workpiece goes for a next procedure; l 21 : the workpiece is suitable for successive processing; l 22 : the workpiece parameters are not standard and it is shelved.
The GN model contains 8 transitions that we shall describe below.
, where • W 1,2 ="there is not a suitable free machine or there are workpieces in place l 2 from the same type", • W 1,3 = ¬W 1,2 , • W 2,3 ="there is a suitable free machine and a suitable workpiece in place l 2 from the same type", • W 2,2 = ¬W 2,3 , • W 8,2 ="there is not a suitable free machine and the workpiece will not leave the system", • W 8,3 ="there is a suitable free machine and the workpiece will not leave the system", • W 8,4 ="the workpiece must leave the system".
After tokens transfer in the output places of transition Z 1 , these tokens obtain, respectively, the following characteristics: • "moment of entering of the workpiece in place l 2 " in place l 2 , • "identifier of a free machine" in place l 3 , • "duration of the processing of the workpiece; all time for the repair", if the token had been in place l 9 , l 12 or l 15 ; • "estimation (e.g., from financial point of view) of the workpiece" in place l 4 . After tokens transfer in the output places of transition Z 2 , these tokens obtain, respectively, the following characteristics: • "identifier of the large-sized up machine" in place l 5 , • "identifier of the medium-sized up machine" in place l 6 , and • "identifier of the small-sized up machine" in place l 7 , while, they do not obtain any characteristic in place l 8 .

57
Only here and in transition Z 6 the place priorities have essential role. It must be valid that if we would like to be sure that the order of the processing over the workpieces is as follows: 1. the workpieces from the failed machines (if they are good); 2. the workpieces from the non-failed machines for which the current procedure is not finished; 3. the other workpieces then the inequalities.
Transitions Z 3 , Z 4 , Z 5 have the same form and by this reason, for k = 1, 2, 3, , where • W 2+k,6+3k = "the machine breaks and it can be repaired quickly", • W 2+k,7+3k = "the machine works well by the end of its work over the current work-piece", • W 2+k,8+3k = "the machine breaks and it cannot be repaired quickly", • W 6+3k,6+3k = "the machine has not been repaired by the current time step", • W 6+3k,7+3k = "the machine is repaired and its work over the current workpiece can continue (eventually, after measurement)", • W 6+3k,8+3k = "the machine cannot be repaired".
After the tokens transfer to the output places of transition Z 2+k , these tokens obtain, respectively, the following characteristics: • "time moment of the damage" in place l 6+3k , • "duration of the processing in place l k " in place l 7+3k , if the token arrives from place l 2+k , • "duration of the waiting in place l 6+3k " in place l 7+3k , if the token arrives from place l 6+3k , • "duration of the processing of the workpiece before the damage in place l 2+k " in place l 8+3k .   When some of the predicates W 10,18 , W 13,18 , W 16,18 has a truth value true, workpieces enter place l 18 with a characteristic: "time moment of current token entering place l 18 ".
In the case when some of the predicates W 10,19 , W 13,19 , W 16,19 has a truth value true, workpieces enter place l 19 with a characteristic: "duration of the staying of the current token in place l 18 ".
Therefore, this characteristic gives information for the duration of the waiting of the current workpiece to enter measuring instrument.
If we would like to have the procedure of the measurement following the order of workpiece preparation, the inequality π L (l 18 ) > max(π L (l 10 ), π L (l 13 ), π L (l 16 )) must be valid.  After the tokens transfer to the output places of transition Z 8 , these tokens obtain, respectively, the following characteristics: "duration of the current step of the processing" in places l 21 and l 22 .
The current characteristic of the δ-token in place l 23 will be changed after each finishing of the work of some measuring machine, as follows. If before the current measurement of a workpiece from the j-th machine from the i-th type, the score of this machine is i,j is the number of all proceeded workpieces by the current machine before the current time moment, then the next score of this machine will be: x old i,j ν old i,j + 1 x old i,j + 1 , x old i,j + 1 , if the workpiece is directed for processing in another machine The places capacities are infinite (i.e., they can accumulate arbitrary many tokens) with the exception of places l 5 , l 6 , l 7 , l 10 , that have the following capacities: where M is the number of measuring machines.
Each transition is activated in each time step of the GN functioning and has duration of one time step. The transitions are activated when there exists at least one token in at least one of their input places.

Third GN model of a FMS
Here, we describe more complex process in which we add transport units that transfer workpieces to the warehouse, to the machines and to the measuring instruments. The machines and the workpieces have the above forms. For brevity, similarly to the second model, we use places with capacities equal to the number of the machines from the separate types.
The most important difference of the present model with the previous two ones, is that the GN is an extended one -it is a GNCP. Now, some of its places will obtain characteristics. As in the previous models, some of these characteristic have the form of IFPs.
Each workpiece is represented by a GN token with an initial characteristic: "type of the workpiece (large, medium or small), list of the procedures, that must be realized over it, duration of each one of the procedures, time moment of workpiece entering the GN, priority".
The token δ stays permanently in place l 6 . Initially, it has a characteristic: "score of the first large-sized up machine; ...; score of the m-th large-sized up machine; score of the first mediumsized up machine; ...; score of the n-th medium-sizes up machine; score of the first small-sized up machine; ...; score of the p-th small-sized up machine".
Each score has the form of an IFP and a natural number, representing the number of workpieces that have been proceesed by the respective machine. Initially, each score has the form 0, 0, 0 . The GN places have the following sense: l 1 : beginning of the process; l 2 : the workpiece is in warehouse and waits to be processed; l 3 : the workpiece goes for a procedure; l 4 : the workpiece leaves the system after processing; l 5 : a transport unit that transfers a workpiece from the warehouse to the respective machine; l 6 : the place of the δ-token; l 7,1 : the workpiece is processed by the first large-sized up machine; . . . l 7,m : the workpiece is processed by the m-th large-sized up machine; In place l 16 the token obtains the characteristic: "the new procedure that must be realized over the work-piece or the list of procedures finishes" and it does not obtain any characteristic in place l 17 .
The token from place l 14 obtains the characteristic: "number of the workpiece that the current transport unit must transfer from the measuring instrument to the warehouse or the final position of the process".
Each of places, related to the moving of the transport units (l 5 , l 10 , l11, l 14 , l 15 , l 16 ) obtains as a current characteristic: "number of the workpiece that the current transport unit had transfered by the moment to respective direction".
This information can be used for determination of the loading of the transport units.

Conclusion
The GN model from the previous section can be used for optimization of the way of functioning of each given AS. This optimization can be realized on the basis of different procedures or on the basis of expert knowledge and data bases. The processes in the AS can be represented in essential details than by other types of Petri nets, because the GN tokens have characteristics and the GN transitions -predicates. The GN operators and esspecially these that can be used in the self-modifying GNs, give possibility to construct essentially complex ASs than FMSs, hybrid intelligent systems (see, e.g., [25]), etc. There are already program tools which realize parts of the above described procedures related to modelling, simulation and optimization.
By all these reasons, the authors assume that the apparatus of the GNs in the near future will be used with success for modelling of ASs.