Modelling, Analyzing and Petri Net-Based Supervision of Agents in - - PowerPoint PPT Presentation

modelling analyzing and petri net based supervision of
SMART_READER_LITE
LIVE PREVIEW

Modelling, Analyzing and Petri Net-Based Supervision of Agents in - - PowerPoint PPT Presentation

Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems sek Franti Capkovi c Institute of Informatics, Slovak Academy of Sciences D ubravsk a cesta 9, 845 07 Bratislava, Slovakia E-mail:


slide-1
SLIDE 1

Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems

Frantiˇ sek ˇ Capkoviˇ c

Institute of Informatics, Slovak Academy of Sciences D´ ubravsk´ a cesta 9, 845 07 Bratislava, Slovakia

E-mail: Frantisek.Capkovic@savba.sk URL: http://www.ui.sav.sk/home/capkovic/capkhome.htm

* * * * * * * * * * Institute of Information and Communication Technologies Bulgarian Academy of Sciences Sofia, BULGARIA * * * * * * * * * *

September 30 - October 6, 2013

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 1 / 146

slide-2
SLIDE 2

Content

1 Introduction and Preliminaries

Discrete Event Systems (DES) Behaviour of Agents vs. DES Petri Nets as the DES Modelling Tool

2 Modularity in DES

Three Kinds of Modular Structures

3 Supervision in DES

Two Kinds of Supervision

4 Agent Cooperation Based on Modularity & Supervision

Supervision Based on PN Invariants More General Supervision

5 Hybrid Agents and their Cooperation Based on Modularity &

Supervision

6 Agent Approach to Evacuation of the Endangered Area

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 2 / 146

slide-3
SLIDE 3

... Content

7 Manufacturing System

The Step 1 The Step 2 The Step 3 Concluding Remarks

8 Conclusion

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 3 / 146

slide-4
SLIDE 4
  • 1. Introduction and Preliminaries

1.1. Discrete Event Systems

Discrete Event Systems (DES) are systems discrete in nature - i.e. driven by discrete events. Namely, the course of a DES variable evolves in response to certain discrete qualitative changes, called events: Figure 1. The development of a state variable x of DES.

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 4 / 146

slide-5
SLIDE 5

... Introduction and Preliminaries

... Discrete Event Systems

Formally, DES can be described by the triplet X , U, A where X = {X0, X1, ..., XN} is the set of the DES states (the state space) Xk = {kx1, .., kxn}, k = 0, 1, ..., N, kxi ∈ {0, 1, ..., kci}, i = 1, ..., n is the set of the states of DES elementary (atomic) subsystems U = {U0, U1, ..., UN−1} is the set of the DES discrete events Uk = {ku1, .., kum}, k = 0, 1, ..., N − 1, kuj ∈ {0, 1}, j = 1, ..., m is the set of DES elementary (atomic) discrete events A ⊆ X × U → X is the set of mutual causal relations among the states and the discrete events.

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 5 / 146

slide-6
SLIDE 6

... Introduction and Preliminaries

1.2 Behaviour of Agents vs. DES

Agents are usually understood to be persistent (software, but not only software) entities that can perceive, reason, and act in their environment and communicate with other agents. From the external point of view the agent (a real or virtual entity)

evolves in an environment is able to perceive this environment is able to act in this environment is able to communicate with other agents exhibits an autonomous behaviour

From the internal point of view the agent

encompasses some local control in some of its perception, communication, knowledge acquisition, reasoning, decision, execution, and action processes

Because agents and groups of agents exhibit the behaviour driven by discrete events, DES can be utilized for modelling agents and multi agent systems (MAS).

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 6 / 146

slide-7
SLIDE 7

... Introduction and Preliminaries

1.3 Petri Nets as the DES Modelling Tool

1 Place/Transition Petri nets (P/T PN) as a description tool

PN defined in [Peterson, 1981; Murata, 1989] are widely used to describe the behaviour of DES PN are bipartite directed graphs with two kinds of nodes and two kinds

  • f edges.

Agents and Multi Agent Systems (MAS) can be (observing their behaviour) understood to be a kind of DES.

2 Why Petri Nets?

PN yields both the graphical model and the mathematical one PN have a formal semantics There are many techniques for proving PN basic properties like reachability, liveness, boundedness, conservativeness, reversibility, coverability, persistence, fairness, etc. Consequently, PN represent the enough general means to be able to model a wide class of systems, including agents and MAS.

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 7 / 146

slide-8
SLIDE 8

... Introduction and Preliminaries

... Petri Nets as the DES Modelling Tool / PN structure

As to PN structure, formally they are the quadruplet P, T , F, G; P ∩ T = ∅, F ∩ G = ∅ where P = {p1, p2, ..., pn} is set of PN places; pi ∈ P, i = 1, ..., n represents the states of elementary (atomic) activities of DES T = {t1, t2, ..., tm} is set of PN transitions; tj ∈ T , j = 1, ..., m represents the discrete events F ⊆ P × T is the set of interconnections (causal relations) from place to transitions (P → T ) G ⊆ T × P is the set of interconnections (causal relations) from transitions to places (T → P)

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 8 / 146

slide-9
SLIDE 9

... Introduction and Preliminaries

... Petri Nets as the DES Modelling Tool / PN Dynamics

As to PN dynamics, formally they are the quadruplet X , U, δ, x0 where X = {x0, x1, ..., xN} is the set of state vectors; xk ∈ X , k = 0, 1, ..., N represents the state vectors of elementary places; xk = (σk

p1, ..., σk pn)T;

σk

pi ∈ {0, 1, ..., cpi }, i = 1, ..., n;

0 ≤ σk

pi ≤ cpi;

cpi is the capacity U = {u0, u1, ..., uM} is the set of control vectors; uk ∈ U, k = 0, 1, ..., M represents the state vectors of elementary transitions; uk = (γk

t1, ..., γk tm)T;

γk

tj ∈ {0, 1}, j = 1, ..., m;

δ : X × U → X is the transition function x0 is the initial state vector

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 9 / 146

slide-10
SLIDE 10

... Introduction and Preliminaries

... Petri Nets as the DES Modelling Tool / Mathematical Model

The following linear discrete system is the effective PN model xk+1 = xk + B.uk , k = 0, ..., K B = GT − F F.uk ≤ xk where k is the discrete step of the dynamics development B, F, G are structural (incidence) matrices of constant elements F = {fij}n×m, fij ∈ {0, Mfij}, i = 1, ..., n , j = 1, ..., m express the causal relations between the states and the discrete events G = {gij}m×n, where gij ∈ {0, Mgij}, i = 1, ..., m, j = 1, ..., n express the causal relations between the discrete events and the DEDS states

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 10 / 146

slide-11
SLIDE 11

... Introduction and Preliminaries

... Petri Nets as the DES Modelling Tool / Example of PN

Example of a PN: Figure 2. The PN-based model of the DEDS subsystem P = {p1, ..., p4}, T = {t1, ..., t3}, F → F =     2 1 1 2    , G → G =   1 1 1 1 2  , x0 =     2 1    

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 11 / 146

slide-12
SLIDE 12

... Introduction and Preliminaries

... Petri Nets as the DES Modelling Tool / Example of PN

The enabled transition and its firing: Figure 3. The enabled transition tj (the left picture) and the state after its firing (the right picture).

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 12 / 146

slide-13
SLIDE 13

... Introduction and Preliminaries

... Petri Nets as the DES Modelling Tool / Example of PN

Which PN transitions are enabled? Namely, enabled PN transitions can be fired (but not simultaneously) and change the PN state in such a way. uk = neg(FT.neg(xk)) u0 = neg(FT.neg(x0)) = (1, 0, 1)T Because

  • nly one of the enabled transitions can be fired

u0 = (1, 0, 0)T

  • r

u0 = (0, 0, 1)T x1 = x0 + B.u0 if u0 = (1, 0, 0)T then x1 = (0, 1, 2, 0)T (0, 0, 1)T then x1 = (3, 0, 0, 2)T if x1 = (0, 1, 2, 0)T then u1 = (0, 1, 1)T (3, 0, 0, 2)T then u1 = (1, 0, 0)T It means that a branching occurs ⇒ Reachability Tree of the PN.

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 13 / 146

slide-14
SLIDE 14

... Introduction and Preliminaries

... Petri Nets as the DES Modelling Tool / Example of PN

The reachability tree (RT) and the reachability graph (RG) corresponding to the PN. Figure 4.a. The reachability tree of the PN

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 14 / 146

slide-15
SLIDE 15

... Introduction and Preliminaries

... Petri Nets as the DES Modelling Tool / Example of PN

The RG corresponding to the RT can be found by connecting the RT nodes with the same name. Figure 4.b. The reachability graph of the PN

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 15 / 146

slide-16
SLIDE 16

... Introduction and Preliminaries

... Petri Nets as the DES Modelling Tool / Example of PN

The RT adjacency matrix is ART =           1 3 3 1 2 3 2 1 2 3 2           The set of the reachable states can be expressed by columns of Xreach =     2 3 1 2 1 1 1 1 2 2 1 2 1 1 2 2 4 4 6    

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 16 / 146

slide-17
SLIDE 17

... Introduction and Preliminaries

... Petri Nets as the DES Modelling Tool / PN Simulator

The PN simulator Figure 5. The simulator screen at simulation of a PN

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 17 / 146

slide-18
SLIDE 18

... Introduction and Preliminaries

... Petri Nets as the DES Modelling Tool / PN Simulator

The RT of the PN displayed by the simulator Figure 6. The simulator screen with the PN reachability tree

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 18 / 146

slide-19
SLIDE 19

... Introduction and Preliminaries

... Petri Nets as the DES Modelling Tool / Conflict and Parallelism

Figure 7. The illustration of the PN modelling the conflict (the left picture) and

parallelism (the right picture)

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 19 / 146

slide-20
SLIDE 20

... Introduction and Preliminaries

... Petri Nets as the DES Modelling Tool / RG Simulator GraSim

The RG of a PN displayed by the RG simulator GraSim Figure 8. The RG simulator screen with the PN reachability graph

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 20 / 146

slide-21
SLIDE 21
  • 2. Modularity in DES

The structure of a group of autonomous DES modules (agents) can be expressed by means of diagonal incidence matrices F=        F1 0 . . . 0 F2 . . . 0 . . . . . . ... . . . . . . . . . FNA−1 0 . . . 0 FNA        = blockdiag(Fi)i=1,NA G=        G1 0 . . . 0 G2 . . . 0 . . . . . . ... . . . . . . . . . GNA−1 0 . . . 0 GNA        = blockdiag(Gi)i=1,NA

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 21 / 146

slide-22
SLIDE 22

... Modularity in DES

2.1 Three Kinds of Modular Structures

There are three possibilities how to connect the DES modules (agents):

1 by PN transitions - here the DES modules modelled by PN subnets

are mutually connected by the interface consisting from PN transitions

2 by PN places - here the DES modules modelled by PN subnets are

mutually connected by the interface consisting from PN places

3 by both the PN transitions and the PN places - here the DES modules

modelled by PN subnets are mutually connected by the interface consisting from PN transitions and PN places, i.e. by a PN subnet

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 22 / 146

slide-23
SLIDE 23

... Modularity in DES

... Three Kinds of Modular Structures / Interconnections by PN transitions

Interconnections by PN transitions F=        F1 0 . . . 0 | Fc1 F2 . . . 0 | Fc2 . . . . . . ... . . . . . . | . . . . . . FNA−1 0 | FcNA−1 . . . 0 FNA | FcNA        G=            G1 . . . G2 . . . . . . . . . ... . . . . . . . . . GNA−1 . . . GNA Gc1 Gc2 . . . GcNA−1 GcNA           

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 23 / 146

slide-24
SLIDE 24

... Modularity in DES

... Three Kinds of Modular Structures / Interconnections by PN transitions

F =

  • blockdiag(Fi)i=1,NA

| Fc

  • G=

  blockdiag(Gi)i=1,NA Gd   B =

  • blockdiag(Bi)i=1,NA

| Bc

  • where Bi = GT

i − Fi; Bci = GT ci − Fci; i = 1, ..., NA;

Fc = (FT

c1, FT c2, ..., FT cNA)T; Gc = (Gc1, Gc2, ..., GcNA)

Bc = (BT

c1, BT c2, ..., BT cNA)T.

Here, Fi, Gi, Bi represent the parameters of the PN-based model of Ai. Fc, Gc, Bc represent the structure of the interface between the agents. This interface consists (exclusively) of additional PN transitions.

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 24 / 146

slide-25
SLIDE 25

... Modularity in DES

... Three Kinds of Modular Structures / Interconnections by PN transitions

Communication of Agent Models through the PN Transitions Consider three agents (e.g. intelligent robots) A1, A2, A3. Figure 9. The communication of three agents A1, A2, A3

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 25 / 146

slide-26
SLIDE 26

... Modularity in DES

... Three Kinds of Modular Structures / Interconnections by PN transitions

The sets of the places of the agents PN models are PA1 = {p1, p2, p3}, PA2 = {p4, p5, p6}, PA3 = {p7, p8, p9}, while the sets of transitions of their PN models are TA1 = {t1, t2, t3, t4}, TA2 = {t5, t6, t7, t8}, TA3 = {t9, t10, t11, t12}. The places represents three basic states of the agents

  • the particular agent is either available (p2, p5, p8) or
  • it wants to communicate (p3, p6, p9) or
  • it does not want to communicate (p1, p4, p7).

The autonomous agents have the same structure given as follows FAi =   1 1 1 1   ; GT

Ai =

  1 1 1 1   ; i = 1, 2, 3

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 26 / 146

slide-27
SLIDE 27

... Modularity in DES

... Three Kinds of Modular Structures / Interconnections by PN transitions

The communication channels between the corresponding two agents: Ch1 between A1 and A2 consists of {p10, p11}, {t13, t14, t15, t16} Ch2 between A1 and A3 consists of {p12, p13}, {t17, t18, t19, t20} Ch3 between A2 and A3 consists of {p14, p15}, {t21, t22, t23, t24}. The states of the channels are:

  • available (p11, p13, p15)
  • realizing the communication of corresponding agents (p10, p12, p14).

The channels create the interface between the communicating agents. They can also be understood to be the agents. The structure of communication channels between the particular agents is FChi = 1 1 1 1

  • ; GT

Chi =

1 1 1 1

  • ; i = 1, 2, 3
  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 27 / 146

slide-28
SLIDE 28

... Modularity in DES

... Three Kinds of Modular Structures / Interconnections by PN transitions

Fc =                    | | 1 | 1 | 1 1 | 1 1 | − − − − | − − − − | − − − − | | 1 | | 1 1 1 | | 1 1 − − − − | − − − − | − − − − | | | 1 | 1 | 1 1 | 1 1                   

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 28 / 146

slide-29
SLIDE 29

... Modularity in DES

... Three Kinds of Modular Structures / Interconnections by PN transitions

GT

c =

                   | | 1 | 1 | | | − − − − | − − − − | − − − − | | 1 | | 1 | | − − − − | − − − − | − − − − | | | 1 | 1 | |                   

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 29 / 146

slide-30
SLIDE 30

... Modularity in DES

... Three Kinds of Modular Structures / Interconnections by PN transitions

FA =   FA1 FA2 FA3   ; GT

A =

  GT

A1

GT

A2

GT

A3

  FCh =   FCh1 FCh2 FCh3   ; GT

Ch =

  GT

Ch1

GT

Ch2

GT

Ch3

  F = FA Fc FCh

  • ; GT =

GT

A

GT

c

GT

Ch

  • Starting from the initial state

x0 = (xT

A10, xT A20, xT A30, xT Ch10, xT Ch20, xT Ch30)T, where xT Ai0 = (0, 1, 0)T,

xT

Chi0 = (0, 1)T, i = 1, 2, 3

we obtain the reachability graph with 36 nodes. It represents the space of feasible states reachable form the initial state x0.

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 30 / 146

slide-31
SLIDE 31

... Modularity in DES

... Three Kinds of Modular Structures / Interconnections by PN transitions

The feasible states are given as the columns of the matrix

Xreach =                          0 1 0 0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 0 0 0 0 0 0 0 0 0 1 0 0 1 1 1 1 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 1 1 0 1 0 0 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 0 0 1 1 0 0 0 1 1 0 0 0 1 1 1 0 0 0 0 0 0 1 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 0 0 0 1 1 0 0 0 1 1 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0 1 0 0 1 0 1 0 0 1 0 0 1 0 0 0 1 0 1 1 1 1 1 0 0 1 1 0 0 1 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0 1 0 0 1 0 1 0 0 1 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 1 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 0 1 1 1 1 1 1 0 1 1                         

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 31 / 146

slide-32
SLIDE 32

... Modularity in DES

... Three Kinds of Modular Structures / Interconnections by PN places

Interconnections by PN places F=   blockdiag(Fi)i=1,NA Fd   G=

  • blockdiag(Gi)i=1,NA

| Gd

  • B=

  blockdiag(Bi)i=1,NA Bd   where Bi = GT

i − Fi; Bdi = GT di − Fdi; i = 1, ..., NA;

Fd = (Fd1, Fd2, ..., FdNA); Gd = (GT

d1, GT d2, ..., GT dNA)T

Bd = (Bd1, Bd2, ..., BdNA). Here Fi, Gi, Bi represent the parameters of the PN-based model of Ai. Fd, Gd, Bd represent the structure of the interface between the agents. This interface consists (exclusively) of additional PN places.

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 32 / 146

slide-33
SLIDE 33

... Modularity in DES

... Three Kinds of Modular Structures / Interconnect. by PN transitions and PN places

Interconnection by PN transitions and PN places The interface is the PN subnet (quasi another agent) with nd places, mc transitions. F=   blockdiag(Fi)i=1,NA | Fc | Fd | Fd↔c   G=   blockdiag(Gi)i=1,NA | Gd | Gc | Gc↔d   B=   blockdiag(Bi)i=1,NA | Bc | Bd | Bd↔c   where Bi = GT

i − Fi; Bdi = GT di − Fdi; Bci = GT ci − Fci; i = 1, ..., NA;

Bd↔c = GT

c↔d − Fd↔c.

Fd↔c, Gc↔d, Bd↔c are the structural matrices of the interface kernel.

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 33 / 146

slide-34
SLIDE 34
  • 3. Supervision in DES

3.1 Two Kinds of Supervision

Supervision (supervisory control) provides a theoretical framework for the automatic control of DES. The theory of supervisory control of DES was introduced for designing controllers so that the controlled system satisfies certain desired qualitative constraints - e.g. a buffer in a manufacturing system should never

  • verflow, or a message sequence in a communication network must be

received in the same order as it was transmitted, etc. Here, two kinds of PN-based supervision will be presented. Namely, supervision based on PN place invariants (P-invariants) generalized supervision utilizing PN places, transitions and the Parikh’s vector

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 34 / 146

slide-35
SLIDE 35
  • 4. Agent Cooperation based on Modularity & Supervision

A supervisor is used here to avoid the egoistic effort of autonomous agents (when limited sources - e.g. working space, raw materials or semiproducts, energy, etc.). By means of prohibition some states of the global system a useless ’haggle’ of agents each other for a priority can be removed

  • n behalf of the global system purposes.

On the contrary, the supervision process can be understood to be a carrier (performer) of the cooperation wrt. the global system politics.

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 35 / 146

slide-36
SLIDE 36

... Agent Cooperation based on Modularity & Supervision

Thus, the conditions for the supervisor synthesis represent the desired cooperation of agents in a group of agents or in MAS. Some constraints has to be satisfied in order to achieve the desired behaviour (i.e. to synthesize the supervisor). Two kinds of constrains known from supervising methodology in DES control theory will be considered: (i) the constraints based on the P-invariants (ii) the generalized constraints based also on the PN Parikh’s vector and/or on the PN transitions.

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 36 / 146

slide-37
SLIDE 37

... Agent Cooperation based on Modularity & Supervision

4.1 Supervision based on PN Invariants

The principle of the method is based on the PN P-invariants. P-invariants are the vectors, v, with the property that multiplication of these vectors with any state vector xk ∈ Xreach (i.e. reachable from a given initial state vector x0 ∈ Xreach) yields the same result. It is the relation of the state conservation: vT.xk = vT.x0 vT.xk = vT.x0 + vT.B.uk−1 Hence, to satisfy the previous definition of P-invariants, the condition vT.B = 0 has to be met.

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 37 / 146

slide-38
SLIDE 38

... Agent Cooperation based on Modularity & Supervision

... Supervision based on PN Invariants

P-invariants are useful in checking the property of mutual exclusion. To eliminate a selfish behaviour of autonomous agents at exploitation of limited joint resources it is necessary to allocate the sources to individual agents rightly, with respect to the global goal of MAS. Such a constraint of the agents behaviour and violation of their autonomy is rather in favour of MAS than in disfavour. In case of the existence of several (e.g. nx) invariants in a PN, the set of the P-invariants is created by the columns of the (n × nx)-dimensional matrix V being the solution of the homogeneous system of equations VT.B = 0 / This equation represents the base for the supervisor synthesis method.

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 38 / 146

slide-39
SLIDE 39

... Agent Cooperation based on Modularity & Supervision

... Supervision based on PN Invariants

Some additional PN places (slacks) can be added to the PN-model in

  • question. The slacks create the places of the supervisor. Hence, the

previous equation can be rewritten into the form [L Is]. B Bs

  • = 0

/ where Is is (ns × ns)-dimensional identity matrix with ns ≤ nx being the number of slacks, (ns × n)-dimensional matrix L of integers represents (in a suitable form) the conditions L.x ≤ b ⇒ [L Is]. x xs

  • = b

imposed on marking of the original PN (where b is the vector of integers), and Bs is (ns × m)-dimensional matrix representing (after its finding by computing) the structure of the PN-based model of the supervisor. Hence, L.B + Bs = 0 /; Bs = −L.B; Bs = GT

s − Fs

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 39 / 146

slide-40
SLIDE 40

... Agent Cooperation based on Modularity & Supervision

... Supervision based on PN Invariants

The augmented state vector (i.e. the state vector of the original PN together with the supervisor) and the augmented matrices are as follows xa = x xs

  • ; Fa =

F Fs

  • ; GT

a =

GT GT

s

  • where the submatrices Fs and GT

s correspond to the interconnections of

the incorporated slacks with the actual PN structure. Because of the prescribed conditions we have [L | Is]. x0

sx0

  • = b

i.e. the supervisor initial state is: sx0 = b − L.x0 where b is the vector of the corresponding dimensionality (i.e. ns) with integer entries representing the limits for number of common tokens - i.e. the maximum numbers of tokens that the corresponding places can possess altogether (i.e. share).

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 40 / 146

slide-41
SLIDE 41

... Agent Cooperation based on Modularity & Supervision

... Supervision based on PN Invariants / Example 4.1

Example 4.1 Let us show how easy the Dijkstra’s ’dining philosophers’ problem can be solved by means of the supervisor synthesis. It is a classic multi-process synchronization problem where five computers competed for access to five shared tape drive peripherals. Namely, five philosophers are sitting at a circular table with a large bowl of spaghetti in the center doing one of two activities - eating or thinking. While eating, they are not thinking, and while thinking, they are not

  • eating. A chopstick is placed in between each philosopher.

Each philosopher has one chopstick to his left and one chopstick to his

  • right. It is assumed that a philosopher must eat with two chopsticks. The

philosopher can only use the chopstick on his immediate left or right.

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 41 / 146

slide-42
SLIDE 42

... Agent Cooperation based on Modularity & Supervision

... Supervision based on PN Invariants / Example 4.1

The PN-based model of the situation for one philosopher is given as Figure 10. The PN-based model of one philosopher activities. In case of five philosophers the thinking is modelled by the PN places p1, p3, p5, p7, p9 and eating is represented by the places p2, p4, p6, p8, p10. In this situation all of the philosophers are thinking - p1, p3, p5, p7, p9 are active - i.e. no forks are necessary. However, formally they are expressed by means of the PN places p11, p12, p13, p14, p15, apart from interconnections.

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 42 / 146

slide-43
SLIDE 43

... Agent Cooperation based on Modularity & Supervision

... Supervision based on PN Invariants / Example 4.1

The model of non-cooperating philosophers is the following Figure 10.a. The PN-based model of the five non-cooperating philosophers.

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 43 / 146

slide-44
SLIDE 44

... Agent Cooperation based on Modularity & Supervision

... Supervision based on PN Invariants / Example 4.1

The defined problem can be solved by the supervisor synthesis method. The incidence matrices of the PN models of the autonomous agents Ai, i = 1, ..., 5 are Fi = 1 1

  • ; GT

i =

1 1

  • ; Bi =

−1 1 1 −1

  • Consider that the initial states are the same

ix0 = (1, 0)T; i = 1, ..., 5

The parameters of the PN model of the group of autonomous agents can be expressed as follows F = blockdiag(Fi)i=1,5; G = blockdiag(Gi)i=1,5

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 44 / 146

slide-45
SLIDE 45

... Agent Cooperation based on Modularity & Supervision

... Supervision based on PN Invariants / Example 4.1

x0 = (1xT

0 , 2xT 0 , 3xT 0 , 4xT 0 , 5xT 0 )T

The conditions imposed on the autonomous agents are σp2 + σp4 ≤ 1 σp4 + σp6 ≤ 1 σp6 + σp8 ≤ 1 σp8 + σp10 ≤ 1 σp10 + σp2 ≤ 1 Verbally it means that two adjacent agents (neighbours) must not eat

  • simultaneously. These conditions yield the matrix L and the vector b as

follows

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 45 / 146

slide-46
SLIDE 46

... Agent Cooperation based on Modularity & Supervision

... Supervision based on PN Invariants / Example 4.1

L =       0 1 0 1 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 1 0 1 0 1 0 0 0 0 0 0 0 1       ; b =       1 1 1 1 1       Hence, Bs = −L.B; sx0 = b − L.x0 Bs =       −1 1 −1 1 0 0 0 0 0 0 0 0 −1 1 −1 1 0 0 0 0 0 0 0 0 −1 1 −1 1 0 0 0 0 0 0 0 0 −1 1 −1 1 −1 1 0 0 0 0 0 0 −1 1       ; sx0 =       1 1 1 1 1      

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 46 / 146

slide-47
SLIDE 47

... Agent Cooperation based on Modularity & Supervision

... Supervision based on PN Invariants / Example 4.1

Fs =       1 0 1 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 1 0 1 0 1 0 0 0 0 0 0 0 1 0       ; GT

s =

      0 1 0 1 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 1 0 1 0 1 0 0 0 0 0 0 0 1       The structural matrices Fs, Gs of the supervisor give us the structural interconnections between the philosophers and the forks. Using the supervisor synthesis the problem was easily resolved. The PN-based model of the solution - the cooperating agents - is given in

  • Fig. 11.
  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 47 / 146

slide-48
SLIDE 48

... Agent Cooperation based on Modularity & Supervision

... Supervision based on PN Invariants / Example 4.1

Figure 11. The PN-based model of the cooperating dining philosophers.

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 48 / 146

slide-49
SLIDE 49

... Agent Cooperation based on Modularity & Supervision

... Supervision based on PN Invariants / Example 4.2

Example 4.2 The conditions for cooperation can be more complicated. Consider e.g. the group of 5 simple autonomous agents GrA = {A1, A2, A3, A4, A5} with the same structure like those handled above. Solve the situation when it is necessary to ensure that only one agent from each of the subgroups Sgr1 = {A1, A4, A5}, Sgr2 = {A2, A4, A5}, and Sgr3 = {A3, A4, A5} can simultaneously cooperate with other agents from GrA. In other words, the agents inside the designated subgroups must not work simultaneously. Even, the agents A4 and A5 can work only individually (any cooperation with other agents is excluded). However, the agents A1, A2, A3 can work simultaneously.

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 49 / 146

slide-50
SLIDE 50

... Agent Cooperation based on Modularity & Supervision

... Supervision based on PN Invariants / Example 4.2

Now, the conditions prescribing the cooperation of agents are σp2 + σp8 + σp10 ≤ 1 σp4 + σp8 + σp10 ≤ 1 σp6 + σp8 + σp10 ≤ 1 It means L =   0 1 0 0 0 0 0 1 0 1 0 0 0 1 0 0 0 1 0 1 0 0 0 0 0 1 0 1 0 1   ; b =   1 1 1   After the supervisor synthesis the PN model of the cooperating agents is displayed in Fig. 12.

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 50 / 146

slide-51
SLIDE 51

... Agent Cooperation based on Modularity & Supervision

... Supervision based on PN Invariants / Example 4.2

Figure 12. The PN-based model of the 3 groups cooperation

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 51 / 146

slide-52
SLIDE 52

... Agent Cooperation based on Modularity & Supervision

4.2 More General Supervision

To widen a class of cooperation the more general approach can be used. On this way also the Parikh’s vector is very important and useful. The general linear constraints for supervisor synthesis are Lp.x + Lt.u + Lv.v ≤ b where Lp, Lt, Lv are, respectively, (ns × n)−, (ns × m)−, (ns × m)−dimensional matrices. When b − Lp.x ≥ 0 is valid the supervisor with the following structure and initial state Fs = max(0, Lp.B + Lv, Lt); Lpv = Lp.B + Lv GT

s

= max(0, Lt − max(0, Lpv)) − min(0, Lpv)

sx0

= b − Lp.x0 − Lv.v0 guarantees that constraints are verified for the states resulting from the initial state. Here, the max(.) is the maximum operator for matrices. However, the maximum is taken element by element.

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 52 / 146

slide-53
SLIDE 53

... Agent Cooperation based on Modularity & Supervision

... More General Supervision / Definition of the Parikh’s Vector

Developing the model of PN dynamics we have x1 = x0 + B.u0 x2 = x1 + B.u1 = x0 + B.(u0 + u1) · · · · · · · · · · · · · · · · · · · · · · · · xk = x0 + B.

k−1

i=0

ui = x0 + B.v where just the vector v = ∑k−1

i=0 ui of integers is named to be the Parikh’s

vector. This vector gives us information about how many times the particular transitions are fired during the development of the system dynamics from the state x0 to the state xk. The Parikh’s vector can also be utilized in the DES supervisor synthesis. Namely, together with the state vector x and the control vector u.

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 53 / 146

slide-54
SLIDE 54

... Agent Cooperation based on Modularity & Supervision

4.3 Case Study

Case Study Let us illustrate the approach on the case of the internal transport of a flexible manufacturing system (FMS). Combining both kinds of constraints will be used step-by-step in order to synthesize the supervisor. The agents working in a common space - the tracks for AGVs (automatically guided vehicles) in a kind of FMS - have to be supervised in order to avoid a crash. To illustrate this, consider Nt tracks of AGVs in FMS. Denote them as agents Ai, i = 1, ..., Nt. The AGVs carry semi-products from a place of FMS to another place and then they (empty or with another load) come round. In any track Ai there exist ni ≥ 1 AGVs. The PN model of the single agent A1 is given in Figure 13.

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 54 / 146

slide-55
SLIDE 55

... Agent Cooperation based on Modularity & Supervision

... More General Supervision / Case Study

Figure 13. The PN-based model of the agent. The places p2, p4 lie in the RA

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 55 / 146

slide-56
SLIDE 56

... Agent Cooperation based on Modularity & Supervision

... More General Supervision / Case Study

The parameters of the agents PN-based models are the following Fi =     1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1     ; GT

i =

    0 0 0 1 1 0 0 0 0 1 0 0 0 0 1 0     ; i = 1, Nt During the agents activities n1 AGVs have to pass this track as well as a restricted area (RA) common for all agents, namely, even two times. RA is a “bottle-neck” of the global system. Namely, in case of the AGVs of e.g. the agent A1: (i) when they carry some semi-products from a place p1 of FMS to another place p3 they have to pass RA (expressed by p2) first time (ii) when they come round to the place p1 they have to pass RA (expressed now by p4) once more.

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 56 / 146

slide-57
SLIDE 57

... Agent Cooperation based on Modularity & Supervision

... More General Supervision / Case Study

However, because the space of the FMS where the agents operate is limited, there exists the restriction that only limited number of different AGVs, namely N < ∑Nt

i=1 ni

  • r often

N << ∑Nt

i=1 ni

can operate in the RA simultaneously, the agents Ai have to be limited in their autonomous activities by a supervisor. The reason is that the agents themselves are not able to coalesce on a procedure satisfying all of them because the autonomous agents are usually egoistic (selfish). A violent driving of individual agents in RA might tend to wrecks with exterminatory effects, including some mechanical devastations, even standing the whole FMS off.

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 57 / 146

slide-58
SLIDE 58

... Agent Cooperation based on Modularity & Supervision

... More General Supervision / Case Study

Therefore, the supervisor determines a policy of the agents behaviour from the global point of view in order to achieve the satisfying results of the cooperative interactions among devices and expected behaviour (function) of the global FMS. The opposite view on the supervisor synthesis process can evoke an impress that such a process expresses e.g. the agents negotiation (although unwilling) or another kind of cooperation. The supervisor does not drive its own selfish will or interest but its activity represents only the necessary part of the global strategy of the FMS behaviour, even the correct model of a part of the technological subprocess inside FMS. From the control theory point of view the supervisor realizes the

  • bjective function of the FMS subprocess.

Namely, the supervisor only realizes the global demands on the behaviour of a part of FMS so as to meet the global aim of the whole FMS.

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 58 / 146

slide-59
SLIDE 59

... Agent Cooperation based on Modularity & Supervision

... More General Supervision / Case Study

Considering NA agents, the restrictions in analytical terms are σp2 + σp4 ≤ n1 σp6 + σp8 ≤ n2 . . . . . . . . . . . . σp4NA−2 + σp4NA ≤ nNA σp2 + σp4 + σp6 + σp8 + . . . + σp4NA−2 + σp4NA ≤ N When NA = 4, N = 2, n1 = n2 = n3 = n4 = 1 then σp2 + σp4 ≤ 1 σp6 + σp8 ≤ 1 σp10 + σp12 ≤ 1 σp14 + σp16 ≤ 1 σp2 + σp4 + σp6 + σp8 + σp10 + σp12 + σp14 + σp16 ≤ 2

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 59 / 146

slide-60
SLIDE 60

... Agent Cooperation based on Modularity & Supervision

... More General Supervision / Case Study L =       1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1       ; b =       1 1 1 1 2       Fs =       1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0       GT

s =

      0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1      

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 60 / 146

slide-61
SLIDE 61

... Agent Cooperation based on Modularity & Supervision

... More General Supervision / Case Study

Figure 14. The PN-based model of supervising 4 agents in order to

simultaneously exploit the RA.

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 61 / 146

slide-62
SLIDE 62

... Agent Cooperation based on Modularity & Supervision

... More General Supervision / Case Study

In such a supervisor structure only the presence of N AGVs in the RA simultaneously is assured without designation which agents (N = 2 agents from 4 existing ones) have the priority to enter by their AGV into the area. To resolve this problem it is necessary to ensure priorities. Especially, in the given initial state when all of the agents compete for entering the area, it is necessary to choose N of the Nt agents. During the global FMS dynamics development it is probable that not all

  • f the agents will compete for entering. But more than N agents can

compete. However, there is impossible in a real FMS to presume that the agents will negotiate each other to find the global optimum. Usually, there is no time for such a “democratic” negotiation process. However, we can synthesize another supervisor for the system being already supervised by the existing supervisor synthesized above. The advantage of such a multilevel approach consists in a flexibility.

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 62 / 146

slide-63
SLIDE 63

... Agent Cooperation based on Modularity & Supervision

... More General Supervision / Case Study

While the 1th level supervisor assures the stable situation that only two AGVs can occur in the RA, the 2nd level supervisor can determine on which track (i.e. to which agent Ai AGVs belong in). In general, when we want to enter priorities, the new supervisor can be synthesized. We can consider e.g. that the priorities πAi of agents Ai descends with the ascending agent number - i.e. πA1 > πA2 > πA3 > πA4. The Agent 1 has the highest priority as to entering to RA. The priorities of other agents descend with ascending number denoting the agent in question, namely in both directions. The constraints imposed on elements of the Parikh’s vector are v5 ≤ v1; v9 ≤ v1; v13 ≤ v1; v6 ≤ v1; v10 ≤ v1; v14 ≤ v1 v9 ≤ v5; v13 ≤ v5; v10 ≤ v5; v14 ≤ v5; v13 ≤ v9; v14 ≤ v9.

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 63 / 146

slide-64
SLIDE 64

... Agent Cooperation based on Modularity & Supervision

... More General Supervision / Case Study

Considering v0 = 0, b = 0 and respecting the constraints expressed by Lv =                      −1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 −1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 −1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 −1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 −1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 −1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 −1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 −1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 −1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 −1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 −1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 −1 0 0 0 0 1 0 0                      the following structure of the supervisor is obtained

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 64 / 146

slide-65
SLIDE 65

... Agent Cooperation based on Modularity & Supervision

... More General Supervision / Case Study

(2)Fs =

                  1 1 1 1 1 1 1 1 1 1 1 1                   ;

(2)sx0 =

                                   

(2)GT s =

                  1 1 1 1 1 1 1 1 1 1 1 1                  

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 65 / 146

slide-66
SLIDE 66

... Agent Cooperation based on Modularity & Supervision

... More General Supervision / Case Study

Hence, the initial state of the resulting supervised system is

(2)x0 = (xT a0, (2)sxT 0 )T

where xa0 = (1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0|1, 1, 1, 1, 2)T. Respecting the structure of the augmented system supervised by the 1st supervisor, the structure of the fully supervised system (i.e. by both supervisors) is the following

(2)FT a =

  • (FT|FT

s )T|(2)FT s

T ; (2)Ga =

  • (G|Gs)|(2)Gs
  • Here, (2)(.) expresses that the matrices/vectors belonging to the 2nd

supervisor are meant. The 2nd supervisor is synthesized for the augmented system (i.e. the original agents already supervised by the first supervisor). The structure of the 2nd supervisor is given in Figure 15.

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 66 / 146

slide-67
SLIDE 67

... Agent Cooperation based on Modularity & Supervision

... More General Supervision / Case Study

Figure 15. The PN-based model of supervising after embedding the 2nd

supervisor.

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 67 / 146

slide-68
SLIDE 68
  • 5. Hybrid Agents and their Cooperation

Continuous systems (CS) are usually described by means of differential equations describing processes at respecting physical laws. However, there are certain complex CS where it is practically impossible or very difficult to obtain a CS model corresponding to the real system. Two main difficulties occur on that way: (i) how to determine the kind of differential equations describing the particular CS - namely, to guess an order of the system when the linear differential equations are used or a kind of nonlinear differential equations (ii) how to identify all parameters of the chosen kind of differential equations describing the real complex system by means of measuring (if any such parameters are measurable). On that account other methods are found.

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 68 / 146

slide-69
SLIDE 69

... Hybrid Agents and their Cooperation

Hybrid Petri nets (HPN) are frequently used for modelling complex hybrid systems (HS). Especially, the First Order Hybrid Petri Nets (FOHPN) seem to be very suitable for HS modelling. HPN in general combine continuous Petri nets (CPS) with different kinds

  • f Petri nets (PN) - like place/transition Petri nets (P/T PN),

deterministic timed PN, stochastic PN, etc. Because any CS has minimally two discrete states - it is either working or idle - the mutual transitions between these states are discrete events . Thus, the idea arose: (i) to create the model of hybrid autonomous agents (e.g. production lines in complex manufacturing systems) by means of FOHPN (ii) then to synthesize the cooperation of the agents by means of discrete-event systems (DES) supervision.

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 69 / 146

slide-70
SLIDE 70

... Hybrid Agents and their Cooperation

5.1 First Order Hybrid Petri Nets (FOHPN)

HPN are able to model the coexistence of discrete and continuous

  • variables. This brings following advantages:

(i) reducing the dimensionality of the state space (ii) increasing the computational efficiency of the simulation process (iii) defining optimization problems of polynomial complexity. The places, transitions and oriented arcs consist of two groups - discrete and continuous. Moreover, beside the arcs among discrete places and discrete transitions and the arcs among continuous places and continuous transitions there exist the arcs among discrete places and continuous transitions as well as the arcs among the continuous places and discrete transitions.

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 70 / 146

slide-71
SLIDE 71

... Hybrid Agents and their Cooperation

... First Order Hybrid Petri Nets (FOHPN)

The discrete places and transitions handle discrete tokens while the continuous places and transitions handle continuous variables (e.g. like different kinds of material flows). The mutual interaction between these groups is possible according to prescribed rules. The set P of places consists of two subsets P = Pd ∪ Pc, where Pd is a set of discrete places (graphically represented by simple circles) and Pc is a set of continuous places (represented usually by double concentric circles). Cardinalities of the sets are, respectively, n, nd and nc.

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 71 / 146

slide-72
SLIDE 72

... Hybrid Agents and their Cooperation

... First Order Hybrid Petri Nets (FOHPN)

The set of transitions T consists of two subsets T = Td ∪ Tc, where Td is a set of discrete transitions (graphically represented by simple rectangles) and Tc is a set of continuous transitions (represented usually by double rectangles - a smaller rectangle inside of the bigger one). Their cardinalities are, respectively, q, qd and qc. Moreover, Td can contain a subset of immediate transitions (like in

  • rdinary PN) and/or a subset of timed transitions. The timed transitions

express the behaviour of discrete events in time and they may be deterministic and/or stochastic. To ensure qualitative properties of FOHPN (so called well-formed nets): Firing of continuous transitions must not influence marking of discrete places.

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 72 / 146

slide-73
SLIDE 73

... Hybrid Agents and their Cooperation

... First Order Hybrid Petri Nets (FOHPN)

FOHPN marking is a function assigning a non-negative integer number of tokens to each of the discrete places and an amount of fluid to each of the continuous places. To each of the continuous transition tj an instantaneous firing speed (IFS) is assigned. IFS determines an amount of fluid per a time unit (i.e. a sort

  • f the flow rate) which fires the continuous transition in a time instance τ.

For all of the time instances τ holds V min

j

≤ vj(τ) ≤ V max

j

, where min and max denote the minimal and maximal values of the speed vj(τ). Consequently, IFS of any continuous transition is piecewise constant. An empty continuous place pi is filled through its enabled input transition. In such a way the fluid can flow to the output transition of this place.

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 73 / 146

slide-74
SLIDE 74

... Hybrid Agents and their Cooperation

... First Order Hybrid Petri Nets (FOHPN)

The continuous transition tj is enabled in the time τ iff (i) its input discrete places pk ∈ Pd have marking mk(τ) at least equal to Pre(pk, tj) (Pre and Post are the incidence matrices well known in PN

  • above denoted as F and GT)

(ii) and all of its input continuous places pi ∈ Pc satisfies the condition that either mi(τ) ≥ 0 or the place pi is filled. If all of the input continuous places of the transition tj have non-zero marking then tj is strongly enabled, otherwise tj is weakly enabled. The continuous transition tj is disabled if some of its input places is not filled.

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 74 / 146

slide-75
SLIDE 75

... Hybrid Agents and their Cooperation

... First Order Hybrid Petri Nets (FOHPN) / Marking of the Continuous Place

Marking development of the continuous place In general, the marking development of the continuous place pi ∈ Pc in time can be described by the differential equation dmi dτ = ∑

tj∈Tc

C(pi, tj).vj(τ) (1) where vj(τ) are entries of the IFS vector v(τ) = (vj(τ), · · · , vnc(τ))T in the time τ C is the incidence matrix of the continuous part of FOHPN (i.e. the matrix C = Post − Pre).

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 75 / 146

slide-76
SLIDE 76

... Hybrid Agents and their Cooperation

... First Order Hybrid Petri Nets (FOHPN)

The differential equation holds provided that no discrete transition is fired in the time τ and all of the speeds vj(τ) are continuous in the time τ. The IFS vj(τ), j = 1, . . . , nc, defines enabling the continuous transition tj. If tj is strongly enabled then it can be fired with an arbitrary firing speed vj(τ) ∈ [V min

j

, V max

j

]. If tj is weakly enabled then it can be fired with an arbitrary firing speed vj(τ) ∈ [V min

j

, Vj], where Vj ≤ V max

j

. Namely, tj cannot take more fluid from any empty input continuous place than the amount entering the place from other transitions. It corresponds to the principle of conservation of matter.

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 76 / 146

slide-77
SLIDE 77

5.2 FOHPN Based Model of the Production Line

Consider the recycling line producing the plastic double foil from the granulate prepared from the waste plastic. The plastic foil is used for producing plastic bags. The rough FOHPN model is displayed in Fig. 16. To distinguish continuous and discrete places as well as the continuous and discrete transitions, the continuous items are denoted by capitals. Figure 16. The rough FOHPN-based model of the production line

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 77 / 146

slide-78
SLIDE 78

... Hybrid Agents and their Cooperation

... FOHPN Based Model of the Production Line

The granulate is collocated in the Holder represented by the place P4. Thence, the fluid flows through the transition T1 to the Exhausting Machine (Exhauster) represented by the place P1 where a big bubble is blow (in order to make producing the double foil possible). Subsequently, the double foil is drawing into the prescribed width and thickness on the Drawing Line P2 Drawn foil proceeds to the Spooling Machine P3 where the bales of a prescribed Mass are prepared. Here, after achieving the prescribe Mass, the foil is aborted by cutting, the completed bale is withdrawn. Then, the new bale starts to be spooled on a new spool. The completed bale proceeds to a buffer or directly to another production line where the bags are produced.

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 78 / 146

slide-79
SLIDE 79

... Hybrid Agents and their Cooperation

... FOHPN Based Model of the Production Line

In the next line, the foil is enfolded, welds corresponding to the length of bags are performed, and the belt of bags is rolled into rolls with a uniform number of bags in each roll. The marking of the discrete place p5 expresses the number of bales produced by the line. However, in the real machines time delays occur:

  • because of the time necessary for producing the bubble in the

Exhausting Machine as well as

  • because of the transport delay of the Drawing Line

Therefore, it is necessary to build them into the FOHPN model. Moreover, it is necessary to ensure regular supplying the granulate in order to avoid a breakdown of the line caused by the lack of the granulate.

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 79 / 146

slide-80
SLIDE 80

... Hybrid Agents and their Cooperation

... FOHPN Based Model of the Production Line

Hence, the FOHPN model has the more detailed form given in Fig. 17 where the feedback T1 → P5 → t9 → p15 → t8 realizes supplying the granulate and Mfb denotes the multiplicity of the arc due to added amount of the granulate in one batch. Ng is marking of the discrete place p14 representing the number of the added batches of the granulate. Mb represents the multiplicity of the arc corresponding to the prescribed mass of the bale and {p6 − p9, t4, t5}, {p10 − p13, t6, t7} model, respectively, the delays of exhausting and drawing processes t4 − t7 are timed transitions with delays p8, p9, p12, p13 fire these transitions. The structure of the FOHPN is described by incidence matrices with indices cc, cd, dc, dd denoting incidences between places and transitions ’continuous-continuous’, ’continuous-discrete’, ’discrete-continuous’, ’discrete-discrete’.

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 80 / 146

slide-81
SLIDE 81

... Hybrid Agents and their Cooperation

... FOHPN Based Model of the Production Line

Figure 17. The rough FOHPN-based model of the production line

and a feedback corresponding to supplying the granulate

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 81 / 146

slide-82
SLIDE 82

... Hybrid Agents and their Cooperation

... FOHPN Based Model of the Production Line

Precc =       0 1 0 0 0 1 0 0 0 1 0 0 0 0 0       ; Postcc =       1 0 0 0 1 0 0 0 1 0 0 0 1 0 0       Precd =       00 0 00000 0 00 0 00000 0 00Mb00000 0 00 0 00000 0 00 0 00000Mfb       ; Postcd =       0000000 0 0 0000000 0 0 0000000 0 0 0000000Mfb0 0000000 0 0       PreT

dc =

  1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0   ≡ PostT

dc

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 82 / 146

slide-83
SLIDE 83

... Hybrid Agents and their Cooperation

... FOHPN Based Model of the Production Line

Predd =                            1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0                            ; Postdd =                            0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1                           

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 83 / 146

slide-84
SLIDE 84

... Hybrid Agents and their Cooperation

... FOHPN Based Model of the Production Line

The initial marking of the continuous places is Mc = (0, 0, 0, Mgr, 0)T where Mgr is the initial amount of the granulate in P4. The initial marking of the discrete places is md = (1, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, Ng, 0)T where Ng is the number of the batches of the granulate to be added during the production. Firing speeds of the continuous transitions vj(τ), j = 1, 2, 3 are, respectively, from the intervals [V min

j

, V max

j

]. The discrete transitions are considered to be deterministic without any delay or with a transport delays mentioned above.

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 84 / 146

slide-85
SLIDE 85

... Hybrid Agents and their Cooperation

... FOHPN Based Model of the Production Line

Using the Matlab simulation tool HYPENS (elaborated by the University

  • f Cagliary, Italy) with

the structural parameters Mb = 270, Mfb = 3750, the initial markings with Mgr = 5000, Ng = 4, the limits of intervals for the firing speeds being V min

j

= 0, j = 1, 2, 3, V max

1

= 1.8, V max

2

= 1.5 and V max

3

= 1.4 the delays of discrete transitions being the entries of the vector (0, 0, 0, 0.01, 125, 0.01, 300, 0, 0)T we obtain the behaviour of the simulated line.

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 85 / 146

slide-86
SLIDE 86

... Hybrid Agents and their Cooperation

... FOHPN Based Model of the Production Line

Figure 18.a. The dynamics behaviour of the line material flows in the common

scale.

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 86 / 146

slide-87
SLIDE 87

... Hybrid Agents and their Cooperation

... FOHPN Based Model of the Production Line

Figure 18.b. The zoomed detail in order to see the transport delays better. In the Fig. 18.a the course of flows is shown during the time segment when the granules are added four times while the Fig 18.b displays the zoomed detail.

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 87 / 146

slide-88
SLIDE 88

... Hybrid Agents and their Cooperation

... FOHPN Based Model of the Production Line

Figure 19. The dynamics behaviour of the material flows of the production line

in their individual scales - i.e. the marking evolution of the continuous places P1 - P4 in time

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 88 / 146

slide-89
SLIDE 89

... Hybrid Agents and their Cooperation

... FOHPN Based Model of the Production Line / Simulation Results

In Fig. 18.a, Fig. 18.b and Fig. 19 the results of the production line simulation are presented. They illustrate the dynamic development of marking M(Pi) of the continuous places Pi, i = 1 ..., 5, i.e. they draft the courses of the material flows throughout these places. M(P5) models a feedback flow (a batch of granules is poured into the Holder in order to avoid its emptying), M(P4) the flow of granules throughout the Holder, M(P1) the flow of the exhausted bubble from the Exhauster, M(P2) the flow of the drawing foil and M(P3) spooling the particular bales of the foil. The finished bale is immediately removed in order to spool the next bale. When the flow of granules is stopped, the other flows are gradually finished too.

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 89 / 146

slide-90
SLIDE 90

... Hybrid Agents and their Cooperation

5.3 Cooperation of Hybrid Agents

Having a group of hybrid agents the cooperation can by synthesized by means of the DES supervision methods. Consider N lines for the foil production and M ≤ N lines for producing the bags rolls. These lines are hybrid and they can be understood to be hybrid autonomous agents. The lines producing the foil can work independently, even simultaneously in time. The same is valid for the lines producing the rolls of bags. However, N lines producing the foil have to share only M rolling lines - N < M. To solve this problem a strategy has to be defined for the sharing. When such a strategy is defined the conditions for the supervisor synthesis can be formulated and the corresponding supervisor can be synthesized.

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 90 / 146

slide-91
SLIDE 91

... Hybrid Agents and their Cooperation

... Cooperation of Hybrid Agents

The simplest form of the agents cooperation is in case when there exists a buffer at any line producing the foil. The lines can produce foil and store the bales into their buffers while the idle rolling lines can take the bales of foil from the buffers as they want. A form of scheduling seems to be a more sophisticated strategy which makes an optimizing possible - e.g. minimizing the idle time. However, it depends also on actual needs of foil parameters (especially on its width and thickness). The lines are not universal. But the negotiation based on the offers and demands seems to be the most sophisticated strategy. The P/T PN-based modellig can be usable also on that way.

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 91 / 146

slide-92
SLIDE 92

... Hybrid Agents and their Cooperation

... Cooperation of Hybrid Agents / Negotiation

The example of negotiation of a couple of agents A1, A2. Consider the following interpretation of P/T PN places: p1 - A1 does not want to communicate; p2 - A1 is available; p3 - A1 wants to communicate; p4 - A2 does not want to communicate; p5 - A2 is available; p6 - A2 wants to communicate; p7 - communication and p8 - availability of the communication by means of the interface (a communication channel). The interpretation of the PN transitions is clear, but let us emphasize: t9 - fires the communication when A1 is available and A2 wants t10 - fires the communication when A2 is available and A1 wants t12 - fires the communication when both A1 and A2 wants to communicate each other.

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 92 / 146

slide-93
SLIDE 93

... Hybrid Agents and their Cooperation

... Cooperation of Hybrid Agents / Negotiation

The Negotiation of Agents Figure 20. The P/T PN model of the negotiation process

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 93 / 146

slide-94
SLIDE 94

... Hybrid Agents and their Cooperation

... Cooperation of Hybrid Agents / Negotiation

From Fig. 20 it is clear, the interface realizing the negotiation process has the form of the PN module (PN subnet). The P/T PN based model of the agents communication has the following parameters F =   FA1 FA1−A2 FA2 FA2−A1 Fneg   =                 0 1 0 0 | 0 0 0 0 | 0 0 0 0 1 0 1 0 | 0 0 0 0 | 1 0 0 0 0 0 0 1 | 0 0 0 0 | 0 1 0 1 −−−−|−−−−|−−−− 0 0 0 0 | 0 1 0 0 | 0 0 0 0 0 0 0 0 | 1 0 1 0 | 0 1 0 0 0 0 0 0 | 0 0 0 1 | 1 0 0 1 −−−−|−−−−|−−−− 0 0 0 0 | 0 0 0 0 | 0 0 1 0 0 0 0 0 | 0 0 0 0 | 1 1 0 1                

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 94 / 146

slide-95
SLIDE 95

... Hybrid Agents and their Cooperation

... Cooperation of Hybrid Agents / Negotiation

GT =   GT

A1

GT

A1−A2

GT

A2

GT

A2−A1

GT

neg

  =                 1 0 0 0 | 0 0 0 0 | 0 0 0 0 0 1 0 1 | 0 0 0 0 | 0 0 1 0 0 0 1 0 | 0 0 0 0 | 0 0 0 0 −−−−|−−−−|−−−− 0 0 0 0 | 1 0 0 0 | 0 0 0 0 0 0 0 0 | 0 1 0 1 | 0 0 1 0 0 0 0 0 | 0 0 1 0 | 0 0 0 0 −−−−|−−−−|−−−− 0 0 0 0 | 0 0 0 0 | 1 1 0 1 0 0 0 0 | 0 0 0 0 | 0 0 1 0                 To use the parameters at simulation it is necessary to choose an initial state. Modelling of more cooperating agents in such a way is possible too.

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 95 / 146

slide-96
SLIDE 96

... Hybrid Agents and their Cooperation

... Cooperation of Hybrid Agents / Through Buffers

Consider six production lines in a factory recycling the collected waste plastic. Figure 21. The Petri net-based model of the rough conception of the supposed

cooperation of the production lines

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 96 / 146

slide-97
SLIDE 97

... Hybrid Agents and their Cooperation

... Cooperation of Hybrid Agents / Through Buffers

Four upper lines produce the plastic double foil from the granulate prepared from the waste plastic. The FOHPN model of such a production line was presented above. Here, only the cooperation of the lines will be discussed. Two lower lines produce rolls of plastic bags from the double foil. In

  • Fig. 21 only a rough schema of the cooperation of two groups of lines is

displayed {p1, p4, p7, p10} represent the continuous production of the foil {p2, p5, p8, p11} represent the cutting a bales of the foil with a determined weight and delivering the bale to the buffers {p3, p6, p9, p12} {p13, p16} represent the continuous rolling lines processing the double foil into the form of the belt of bags {p14, p17} represent the rolling the belt into rolls of a prescribed length (prescribed number of bags) and {p15, p18} represent buffers of the rolls

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 97 / 146

slide-98
SLIDE 98

... Hybrid Agents and their Cooperation

... Cooperation of Hybrid Agents / Through Buffers

At forming the rules defining the mutual cooperation of the lines we have to respect the facts as follows: (i) any bale of the foil from output buffers of the four foil production lines can enter only one of the two rolling machines; (ii) only one bale can enter any rolling machine; (iii) next bale can enter the rolling machines after finishing the rolling process While (i), (ii) mean that the transition functions of the PN transitions t13 − t20 has to satisfy γt13 + γt15 + γt17 + γt19 ≤ 1 (2) γt14 + γt16 + γt18 + γt20 ≤ 1 (3) (iii) means that the places p13 − p16 has to meet σp13 + σp14 ≤ 1 (4) σp16 + σp17 ≤ 1 (5)

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 98 / 146

slide-99
SLIDE 99

... Hybrid Agents and their Cooperation

... Cooperation of Hybrid Agents / Through Buffers

The conditions can be satisfied by means of the supervision theory for DES. Hence, the supervisor with the structure Fs = 1 1 1 1 1 1 1 1

  • GT

s =

1 1

  • and the initial state

sx0 =

1 1

  • can be found.

Then, the PN model of cooperating lines is given in Fig. 22.

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 99 / 146

slide-100
SLIDE 100

... Hybrid Agents and their Cooperation

... Cooperation of Hybrid Agents / Through Buffers

Figure 22. The Petri net-based model of the supervised cooperation of the

production lines

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 100 / 146

slide-101
SLIDE 101
  • 6. Evacuation of Endangered Area

6.1 Case Study

Consider the Endangered Area (EA) given in Fig. 23. Figure 23. On the left is the schema of the EA. On the right are the P/T PN-based models of the one-way door and that of two-way door.

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 101 / 146

slide-102
SLIDE 102

... Evacuation of Endangered Area

... Case study

Figure 24. The one-way door analysis.

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 102 / 146

slide-103
SLIDE 103

... Evacuation of Endangered Area

... Case study

Figure 25. Two-ways door analysis.

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 103 / 146

slide-104
SLIDE 104

... Evacuation of Endangered Area

... Case study

Figure 26. One-way-door and two-ways door analysis with 2 marks.

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 104 / 146

slide-105
SLIDE 105

... Evacuation of Endangered Area

... Case study

EA consists of two bands of rooms and the corridor among the bands. Such an architecture is typical e.g. for hotels, colleges, etc. For simplicity, consider only two rooms in any band. Then, there are four rooms R1 - R4 and the corridor R5 in EA. The corridor is accessible from any room. R2 and R4 have, respectively, own emergency exits E2 and E3 while R5 has the main emergency exit E1. The escape routs depends on the doors. While doors D1, D3 and the emergency exits E1 - E3 are one-way, the doors D2-D4 are two-way - e.g. in case when E1 does not operate or when it is crowded. The EA may also be a flat, a segment of a hotel floor, but it can also be an arbitrary kind of EA with different shapes of rooms and escape routs.

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 105 / 146

slide-106
SLIDE 106

... Evacuation of Endangered Area

... Case study

Considering doors to be agents we have the modular P/T PN model of EA Figure 27. The P/T PN-based model of the EA.

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 106 / 146

slide-107
SLIDE 107

... Evacuation of Endangered Area / Case Study

6.2 PN-Based Model of the Endangered Area

Going to details e.g. the place p1 models a room from which the door exits while the place p4 models the room which the door enters. The two-way doors can be passed from both sides. The place p2 represents the availability of the door. Of course, the door can be passed only in case when it is available. Finally, the place p3 represents the process of passing the door. In other words, the mean of the PN places is the following: p1 - represents a room and the token inside expresses a state of the room - i.e a presence of a person in this room; p2 - models availability of the door - a token inside means that the door is available, while in the opposite case the door is not available; p3 - models passing the door - when it contains a token it means that e.g. a person just passes this door; p4 - models an external room or the corridor.

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 107 / 146

slide-108
SLIDE 108

... Evacuation of Endangered Area / Case Study

... PN-Based Model of the Endangered Area

Firing the transitions t1 - t4 (if enabled) makes possible to control marking dynamics. The incidence matrices of the PN models of agents, i.e. F1, GT

1 for the

  • ne-way door and F2, GT

2 for the two-way door are the following

F1 =     1 0 1 0 0 1 0 0     ; GT

1 =

    0 0 0 1 1 0 0 1     ; F2 =     1 0 0 0 1 0 0 1 0 1 1 0 0 0 0 1     ; GT

2 =

    0 0 1 0 0 1 1 0 1 0 0 1 0 1 0 0    

Here, EA consists of agents being two kinds of doors. In general, EA in itself can be understood to be an agent (a complex door) with paths inputting from and outputting to complex rooms connecting this EA with other such agents.

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 108 / 146

slide-109
SLIDE 109

... Evacuation of Endangered Area / Case Study

... PN-Based Model of the Endangered Area

Now, we can create the mathematical model of the EA by means of modularity approach. The PN-based model of EA can be built by choosing the corresponding rooms of EA to be the input/output rooms of the doorways. It is necessary to take into account that R5 is external room for all of the doors D1, D2, D3, D4. Thus, we obtain the PN model given in Fig. 24. As to the structure the PN model corresponds to the real EA. Dynamics of the evacuation process is described with the mathematical model where the structure of the incidence matrices F, GT depends on agents interactions. The animation of the tokens (in PN graphical tools) is replaced by step-by-step computing the state vectors in the simulation tool MATLAB, because no PN graphical tool is able to synthesize the supervisors.

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 109 / 146

slide-110
SLIDE 110

... Evacuation of Endangered Area / Case Study

... PN-Based Model of the Endangered Area

When no supervisors are used the adjacency matrix of the PN model reachability tree has a large dimensionality. Therefore, there are many possible states in the evacuation process - N = 1849 different states. The reason for this is that the movement of the system is not coordinated. The autonomous agents behave completely free. They are not organized so far, i.e. no interferences are performed yet. Such a model comprehends all possible state trajectories including all of escape roads from EA. Moreover, the model expresses the movement of particular persons. Consequently, in case of a panic the situation cannot be managed without an entity organizing the escape. Therefore, a way how to deal with such a problem is to supervise the process by the supervisor(s). Now, the supervisors S1, S2 will be synthesized here.

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 110 / 146

slide-111
SLIDE 111

... Evacuation of Endangered Area / Case Study

... PN-Based Model of the Endangered Area

Their structure and marking are displayed in Fig. 28. The synthesis of S1 will start from the EA initial state x0 =

  • 1 1 0 1 1 0 1 1 0 1 1 0 0 1 0 0 1 0 0 1 0 0

T (i) Synthesizing the supervizor S1: Taking into account the condition p1 + p4 + p7 + p10 + p13 ≤ b where b = 4 means the global number of tokens (e.g. persons) in the rooms including the corridor we obtain Lp =

  • 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0
  • ; b =
  • 4
  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 111 / 146

slide-112
SLIDE 112

... Evacuation of Endangered Area / Case Study

... PN-Based Model of the Endangered Area

Proceeding according to the theory introduced above Fs =

  • 0 1 0 1 1 0 0 1 0 1 1 0 0 0 0 0 0 0
  • GT

s =

  • 1 0 1 0 0 1 1 0 1 0 0 1 1 0 1 0 1 0
  • xs0 =
  • The number of states of the system supervised only by the S1 is N = 1849

too. However, the supervisor checks the number of evacuated persons. It is given by the place p23 together with its connections with other parts of the model.

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 112 / 146

slide-113
SLIDE 113

... Evacuation of Endangered Area / Case Study

... PN-Based Model of the Endangered Area

(ii) Synthesizing the supervizor S2: S2 will be synthesized from the initial state xa0 = (xT

0 xT s0)T =

  • 1 1 0 1 1 0 1 1 0 1 1 0 0 1 0 0 1 0 0 1 0 0 | 0

T In general, it can happen that during the evacuation process some doors can have a higher priority than others. In our case, the evacuation of the rooms R2, R4 should prefer the exits E2, E3 before doors D2, D4, respectively.

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 113 / 146

slide-114
SLIDE 114

... Evacuation of Endangered Area / Case Study

... PN-Based Model of the Endangered Area

Thus, the exit E1 is able to manage the evacuation of the rooms R1 and R3 better. At solving priority problems the Parikh’s is very useful. The conditions described verbally can be expressed in mathematical terms as follows v4 ≤ v13; v10 ≤ v15; v6 ≤ v17; v12 ≤ v17. Here, vi are the components of the Parikh’s vector and they concern the PN transitions with the same indices.

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 114 / 146

slide-115
SLIDE 115

... Evacuation of Endangered Area / Case Study

... PN-Based Model of the Endangered Area

Consequently, Lv =     1 −1 1 −1 1 −1 1 −1    

2b =

  • T ; 2xs0 =
  • T

2Fs =

    0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0    

2GT s =

    0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0    

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 115 / 146

slide-116
SLIDE 116

... Evacuation of Endangered Area / Case Study

... PN-Based Model of the Endangered Area

The supervisor S2 is given by places p24, p25, p26, p27 together with their connections with other parts of the PN model. S2 is included in Fig. 28 into the dashed box. S1 is also included into in Fig. 28 The number of states of the system supervised by both the S1 and the S2 is N = 608, i.e. less than 1/3 from 1849.

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 116 / 146

slide-117
SLIDE 117

... Evacuation of Endangered Area / Case Study

... PN-Based Model of the Endangered Area

Considering supervisors S1 and S2 we have Figure 28. The supervised modular P/T PN model of EA.

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 117 / 146

slide-118
SLIDE 118

... Evacuation of Endangered Area / Case Study

6.2 PN-based modelling the workflow of the evacuation process

At PN-based modelling the workflow of the evacuation process it is not necessary to compute the complete state space. Perhaps, only at the design of buildings it is useful from the escape safety point of view. Therefore, let us create now the PN-based model of the wokflow of the evacuation process described above. Its simplest form is given on the left in Fig. 29.

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 118 / 146

slide-119
SLIDE 119

... Evacuation of Endangered Area / Case Study

... PN-based modelling the workflow of the evacuation process

Here the sense of the places pi and transitions tj is completely different like before, of course. Namely, p1 expresses the start of the evacuation process; p2 - p6 represent the rooms R1 - R5 to be evacuated; p7, p8, p9 express, respectively, the exits E2, E3, E1; p10 represents the checking point (it finds if all of the rooms were already evacuated); p11 expresses the end of evacuation process.

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 119 / 146

slide-120
SLIDE 120

... Evacuation of Endangered Area / Case Study

... PN-based modelling the workflow of the evacuation process

Figure 29. The P/T PN-based workflow of the evacuation process from EA.

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 120 / 146

slide-121
SLIDE 121

... Evacuation of Endangered Area / Case Study

... PN-based modelling the workflow of the evacuation process

Also here we can apply the supervision in order to improve the quality of the evacuation process and reduce the state space. For the S1 the condition p2 + p3 + p4 + p5 + p6 + p10 ≤ 5 has to be met, because there are 5 rooms to be evacuated and a checked. x0 =

  • 1
  • Lp =
  • 1

1 1 1 1 1

  • ; b =
  • 5
  • Fs =
  • 5

1 1 1

  • GT

s =

  • 1

1 1

  • ; xs0 =
  • 5
  • The the state space of the system only with the S1 has N = 327 states.
  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 121 / 146

slide-122
SLIDE 122

... Evacuation of Endangered Area / Case Study

... PN-based modelling the workflow of the evacuation process

However, we can add S2 to S1. For the S2 the conditions v7 ≤ v3; v8 ≤ v5 has to be satisfied.

2x0 =

  • 1

| 5 T Lv = −1 1 −1 1

  • ; 2b =
  • 2Fs =

1 1

  • 2GT

s =

1 1

  • ; 2xs0 =
  • The the state space of the system with both the S1 and the S2 has

N = 227 states, i.e. less than 327 about for 1/3.

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 122 / 146

slide-123
SLIDE 123

... Evacuation of Endangered Area / Case Study

... PN-based modelling the workflow of the evacuation process

Figure 30. The supervized P/T PN-based workflow of the evacuation process from EA.

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 123 / 146

slide-124
SLIDE 124
  • 7. Manufacturing System

The inverted Y form of manufacturing will be synthesized and controlled - the machine and two AGV. AGV1 transports correct products, AGV2 transports the bad products (when the machine failures). Figure 31. The PN models of autonomous devices. The empty block will be

synthesized.

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 124 / 146

slide-125
SLIDE 125

... Manufacturing System

7.1 The step 1

The interpretation of the PN places (p10 − p13 arise during synthesis) is: p1 - part is being carried to completed-parts queue by AGV1; p2 - AGV1 is free; p3 - AGV1 is at pick-up position at machine M; p4 - part is being carried to damaged-parts queue; p5 - AGV2 is free; p6 - AGV2 is at pick-up position at machine M; p7 - M is up and busy (part is being processed); p8 - M is free; p9 - M is being repaired; —————————————————- p10 - completed part is waiting for transfer; p11 - damaged part is waiting for transfer; p12 - capacity place; p13 - machine capacity place;

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 125 / 146

slide-126
SLIDE 126

... Manufacturing System

... The step 1

The interpretation of the PN transitions is: t1 - part is picked up by AGV1; t2 - part is deposited in completed-parts queue by AGV1; t3 - AGV1 moves at pick-up position at machine; t4 - part is picked up by AGV2; t5 - part is deposited in damaged-parts queue by AGV2; t6 - AGV2 moves at pick-up position at machine; t7 - uncontrollable: part processing is complete; t8 - part is charged in M; t9 - uncontrollable: machine fails, part is damaged; t10 - M is repaired;

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 126 / 146

slide-127
SLIDE 127

... Manufacturing System

... The step 1

The parameters of the device PN models are the following

  • for the Transport 1 and Transport 2

F1 = F2 =   1 1 1   ; G1 = G2 =   1 1 1  

  • for the Machine

F3   1 1 1 1   ; G3 =     1 1 1 1    

  • the initial states

x10 = x20 = (0, 1, 0)T, x30 = (0, 1, 0)T

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 127 / 146

slide-128
SLIDE 128

... Manufacturing System

... The step 1

To satisfy technology, it is necessary to automate the “partnership” of t7 and t1 (v7 ≥ v1) as well as that of t9 and t4 (v9 ≥ v4). Consequently, Lv = 1 −1 1 −1

  • Respecting the fact that in this case Lp and Lt are zero matrices and

considering that v = (0, 0, 0, 0, 0, 0, 0, 0, 0, 0)T we obtain Fs1 = 1 1

  • GT

s1 =

1 1

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 128 / 146

slide-129
SLIDE 129

... Manufacturing System

... The step 1

Because b = (0, 0)T the initial state of the supervisor (i.e. the extension for the initial state of the plant) is

sx01 = (0, 0)T.

Thus the parameters of the plant to be controlled are FP1 = F Fs1

  • ; GT

P1 =

GT GT

s1

  • ; x01 =
  • x0

sx01

  • Because in such a configuration the number of the reachable states is 267

and the return to the initial state is impossible, this model is insufficient for practical usage. Consequently, the next step of the synthesis is necessary.

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 129 / 146

slide-130
SLIDE 130

... Manufacturing System

... The step 2

Figure 32. The structure of the model after the 1st step of synthesis.

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 130 / 146

slide-131
SLIDE 131

... Manufacturing System

7.2 The step 2

Let us use the P-invariant based approach. Here, only matrix Lp is nonzero. σp3 + σp6 ≤ 1 σp7 + σp10 + σp11 ≤ 1 The aim of this step of the synthesis is:

  • to ensure the possibility to reach the initial state (to realize the

working cycle) and

  • to find the satisfying throughput in order to reduce the number of

states and especially the number of possible trajectories. Hence, Lp = 1 1 1 1 1

  • Bs2 =

1 −1 1 −1 1 1 1 −1

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 131 / 146

slide-132
SLIDE 132

... Manufacturing System

... The step 2

Fs2 = 1 1 1

  • GT

s2 =

1 1 1 1

  • for b = (1, 1)T the initial state of the supervisor is sx02 = (1, 1)T.

Thus, the parameters of the supervised plant are FP2 = FP1 Fs2

  • ; GT

P2 =

GT

P1

GT

s2

  • ; x02 =
  • x01

sx02

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 132 / 146

slide-133
SLIDE 133

... Manufacturing System

... The step 2

Figure 33. The structure of the model after the 2nd step of synthesis.

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 133 / 146

slide-134
SLIDE 134

... Manufacturing System

... The step 2

The number of states was strongly reduced to 48 and the initial state gone to be reachable. However, there are two deadlocks here - namely, in the states X11 = (0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0)T and X15 = (0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0)T no transition is enabled. These two states are reachable, respectively, by the sequences {t6, t8, t7} and {t3, t8, t9, t10}. Consequently, we can use another step of the synthesis as follows.

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 134 / 146

slide-135
SLIDE 135

... Manufacturing System

7.3 The steps

Let us remove the deadlocks in this step. Therefore, v7 ≥ v1 and v9 ≥ v6 v1 − v7 ≤ v6 − v9 ≤ Lv = 1 −1 1 −1

  • Respecting the fact that in this case Lp and Lt are zero matrices and

considering that v = (0, 0, 0, 0, 0, 0, 0, 0, 0, 0)T we obtain Fs3 = 1 1

  • GT

s3 =

1 1

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 135 / 146

slide-136
SLIDE 136

... Manufacturing System

... The step 3

Because b = (0, 0)T the extension of the initial state of the plant is sx03 = (0, 0)T. Thus the parameters of the plant to be controlled are FP3 = FP2 Fs3

  • ; GT

P3 =

GT

P2

GT

s3

  • ; x03 =
  • x02

sx03

  • The number of states was reduced to 30 and the deadlocks were removed.

There exists only one 5-steps trajectory X1

t8

→ X2

t7

→ X3

t3

→ X5

t1

→ X8

t2

→ X1 in case of manufacturing good products. In case of the failure, there exist four 6-steps trajectories.

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 136 / 146

slide-137
SLIDE 137

... Manufacturing System

... The step 3

Figure 34. The structure of the model after the 3rd step of synthesis.

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 137 / 146

slide-138
SLIDE 138

... Manufacturing System

7.4 Concluding remark

Summarizing experience acquired in this example, it can be said that:

  • 1. the successive approach to the synthesis and checking the results in

any of its step is rather important in order to avoid problems

  • 2. the modular approach is favourable for such a kind of synthesis
  • 3. an excessive endeavour to accelerate the synthesis by a sole step by

means of compressing information does not need to bring satisfying results

  • 4. the step-by-step approach is very useful from the diagnostics point of

view

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 138 / 146

slide-139
SLIDE 139
  • 8. Conclusion

P/T PN-based approach to agent modelling and cooperation was presented. Agents, groups of agents and MAS are understood to be DES. Hence, P/T PN used for modelling, analyzing and control of DES are utilized here. The modularity and supervison are the basic priciples of the presented approach. The particular PN modules describe the autonomous agents and the supervision is utilized for synthesizing the agents cooperation. The strategy of cooperation is determined by the aim of the global system (group of agents, MAS). It is prescribed in the form of conditions imposed

  • n the global system in order to ensure the desired behaviour of it.
  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 139 / 146

slide-140
SLIDE 140

... Conclusion

When the conditions are given verbally, they have to be transformed into the system of inequations. Introducing additional variables (slacks) into the inequations the system of equations is obtained. The slacks create the kernel of the supervisor to be synthesized. Two kinds of supervision were presented - the supervision by means of PN P-invariants and that based on more general principle (utilizing PN places, transitions and the Parikh’s vector) Each of the approaches was illustrated by several examples. Moreover, the hybrid agents were defined and the approach to synthesis of their cooperation in models of manufacturing systems was pointed out.

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 140 / 146

slide-141
SLIDE 141

... Conclusion

The individual hybrid agents were modelled by means of FOHPN while the cooperation of the agents was modelled by P/T PN. The instance of the concrete practical application - the recycling line producing the plastic double foil - was introduced in order to underline soundness of the approach. By means of simulating the production line dynamic behaviour in Matlab the satisfying applicable results were obtained.

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 141 / 146

slide-142
SLIDE 142

... Conclusion

Two kinds of PN-based approaches were presented herein the Evacuation Process. First, P/T PN were utilized (i) for modelling structure of EA by a modular approach, where the PN modules being “material” agents were defined. In the introduced case study PN-based models of two kinds of doorways were understood to be such agents; (ii) for modelling dynamics of the evacuation process at occurring a crisis situation; (iii) for synthesizing the supervisors P/T PN ensuring desired form of evacuation. Next, the PN-based modelling the workflow of the evacuation process was used. Moreover, a trial with the supervised workflow process was tested in this case.

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 142 / 146

slide-143
SLIDE 143

... Conclusion

In both approaches two supervisors S1 and S2 synthesized by means of mutually different methods were used. Namely, the S1 in both cases was synthesized by means of P/T PN P-invariants while the S2 was synthesized by means of extended method based on the state vector, control vector and Parikh’s vector. The advantage of the former approach (based on the P/T PN model) is the close analogy of the modular structure of the agent based model with the schema of the real EA. Thus, the states of the model corresponds to the states of the real process and the model allows to analyze the system in the whole. Many times, new escape trajectories (ways, roads) from EA can be found, especially in complicated areas. This approach can be utilized especially at designing the areas (e.g. buildings) and to construct them safely in order to avoid crisis situation as soon as possible.

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 143 / 146

slide-144
SLIDE 144

... Conclusion

On the other hand, at this approach the number of states is usually big, what is a disadvantage of such a procedure. The advantage of the latter approach (i.e. PN-based workflow) is that it yields simpler models with the less number of states. However, the states are not so detailed and in major cases the model is created on the base of existing EA which have to be fully known before. Both approaches can be combined if it is necessary, of course. Thus, their advantages can complement each other.

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 144 / 146

slide-145
SLIDE 145

... Conclusion

It is still necessary to emphasize the importance of the supervisors. They bring several improvements, especially: (i) the higher quality of the evacuation process; (ii) more deeply specifying such a process in details at simultaneous repressing lesser-important facts; (iii) simultaneous decreasing the number of states; (iv) they make the exact checking of the expected results possible. Because no graphical PN tool is able to synthesize supervisor(s) the MATLAB tool was used in our research.

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 145 / 146

slide-146
SLIDE 146

Thanks

Thank you very much for your attention!!!

  • F. ˇ

Capkoviˇ c Institute of Informatics SAS () Modelling, Analyzing and Petri Net-Based Supervision of Agents in Complex Systems 146 / 146