**3. Interrelation of languages of colored Petri nets and some traditional languages**

**Definition.** The mathematical definition of colored Petri net: CPN is a nine-tuple *CPN* ¼ ð Þ Σ, *P*, *T*, *A*, *N*,*C*, *G*, *E*,*I* , where:

P is a finite set of non-empty types called color sets [17].

*P* is a finite set of places which are depicted as ovals/circles.

*T* is a finite set of transitions which are depicted as rectangles.

*A* is a finite set of arches which are depicted as directed edges; moreover.

$$P \cap T = P \cap A = T \cap A = \mathcal{Q} \dots$$

*N* is a node function, *A* ! *P* � *T* ∪ *T* � *P*.

*C* is a color function, *C* : *P* ! Σ.

*G* is a guard function. It is defined from *T* into expressions such that

$$\forall t \in T: \left[Type(G(t)) = B \&Type(Var(G(t))) \subseteq \Sigma\right].$$

*E* is an arc expression function, which is defined as follows:

$$\forall a \in A: \left[ Type(E(a)) = C(p)\_{\text{MS}} \& Type(Var(E(a))) \subseteq \Sigma \right],$$

*I* is an initialization function [3–6, 9, 10],

$$\forall p \in P: \left[Type(I(p)) = C(p)\_{\text{MS}}\right].$$

*The Possibilities of Modeling Petri Nets and Their Extensions DOI: http://dx.doi.org/10.5772/intechopen.90275*

#### **Figure 4.**

Let us consider two cases:

Suppose the transition number of *y*<sup>0</sup> is less than *t*

*S y*ð Þ¼ *S y*<sup>0</sup> ð Þ& *<sup>T</sup>*<sup>∗</sup>

If *S y*ð Þ< *S y*<sup>0</sup> ð Þ) according to Lemma 1: *ts*ð Þ*y* ≤*ts y*<sup>0</sup> ð Þ. We've come into

1 � � �

Suppose succession transitions of *y*<sup>0</sup> is *s*1, ⋯, *sr*. As the tree does not contain any

The proven theorem and research reveal some important features of Petri nets from the point of view of optimization, that is, if the idea of Petri nets is used in technical devices, then the idea of sequential transitions save resources and time.

**3. Interrelation of languages of colored Petri nets and some traditional**

*A* is a finite set of arches which are depicted as directed edges; moreover.

*G* is a guard function. It is defined from *T* into expressions such that

*E* is an arc expression function, which is defined as follows:

*P* ∩ *T* ¼ *P* ∩ *A* ¼ *T* ∩ *A* ¼ ∅*:*

*t*∈*T* : ½ � *Type G t* ð Þ¼ ð Þ *B*&*Type Var G t* ð Þ ð Þ ð Þ ⊆Σ *:*

<sup>∀</sup>*a*<sup>∈</sup> *<sup>A</sup>* : *Type E a* ð Þ¼ ð Þ *C p*ð Þ*MS*&*Type Var E a* ð Þ ð Þ ð Þ <sup>⊆</sup> <sup>Σ</sup> � �,

∀*p* ∈*P* : *Type I p* ð Þ¼ ð Þ *C p*ð Þ*MS*

� �*:*

**Definition.** The mathematical definition of colored Petri net: CPN is

P is a finite set of non-empty types called color sets [17]. *P* is a finite set of places which are depicted as ovals/circles. *T* is a finite set of transitions which are depicted as rectangles.

According to the algorithm: *S y*ð Þ<*S y*<sup>0</sup> ð Þ or

*Numerical Modeling and Computer Simulation*

1 � � �

�<sup>&</sup>lt; *<sup>T</sup>* <sup>∗</sup> 2 � � �

a nine-tuple *CPN* ¼ ð Þ Σ, *P*, *T*, *A*, *N*,*C*, *G*, *E*,*I* , where:

*N* is a node function, *A* ! *P* � *T* ∪ *T* � *P*.

*I* is an initialization function [3–6, 9, 10],

*C* is a color function, *C* : *P* ! Σ.

0 1, ⋯, *t* 0

� ) according to Lemma 2: *ts*ð Þ*y* ≤ *ts y*<sup>0</sup> ð Þ. We've come

�<sup>&</sup>lt; *<sup>T</sup>*<sup>∗</sup> 2 � � � �*:*

*<sup>k</sup>* and *s*1, ⋯, *sr* are the same ) *ts*ð Þ*y* ≤*ts y*<sup>0</sup> ð Þ. The theorem is

*<sup>k</sup>* implementation number.

1.*y* 6¼ *y*<sup>0</sup>

a controversy.

2.*y* ¼ *y*<sup>0</sup>

cycle, *y* ¼ *y*<sup>0</sup> ) *t*

**2.3 Conclusion**

**languages**

**122**

proven.

into a controversy.

If *S y*ð Þ¼ *S y*<sup>0</sup> ð Þ& *<sup>T</sup>*<sup>∗</sup>

0 1, ⋯, *t* 0

*The consumers' process with the common usage and buffer is an action.*

The distribution of tokens, called marking, determines the state of the simulated system. The dynamic behavior of CPN is due to the triggering of a transition that transfers the system from one state to another. A transition is enabled if the associated arc expressions of all input arches can be evaluated as a multi-set, which is compatible with the current tokens in corresponding input places, and its guard is satisfied. After the transition is triggered, tokens are removed from the input places, respectively, by the specified expression of the arches of all incoming arches, and tokens are placed in the output places, respectively, by the specified expressions of the outgoing arches [3–6, 17].

### **3.1 The example of modeling consumers' process with CPN**

Let us suppose that there are two processes of producers and consumers [1, 9]. The following picture shows the process diagram (**Figure 4**).

There is a distribution problem in the described system. To use the channel, the pairð Þ *P*1, C1 must have priority toward ð Þ *P*2, C2 in the sense of using the channel. This is described as follows: while the buffer is not empty, the channel cannot report data from the buffer to the consumer. It is impossible to solve this problem with the help of classical Petri nets, since it is permissible in nature. The proof of this fact is described in the literature [1].

To solve that problem, it is needed to extend Petri net's several properties in such a manner that the proposed properties are headed toward the opportunity of checking the zero in Petri nets [13].

#### **3.2 Declaration**

Color E = {e}; Color Control = {0;1}; Color S = product E\*Control; Var ct:Control;

The CPN (**Figure 5**) is the model of the solved problem of priority usage [17, 19].

**Figure 5.** *The modeling of consumer problem with colored petri net.*
