Discrete-Event Modeling of Multi-Agent Systems with ...

5 downloads 3673 Views 119KB Size Report
Aug 6, 2013 - automaton templates, and interactions among agents are characterized via cooperative synchronization and broadcasting. To ... Email address: [email protected] (Rong Su). multiple .... position proposed in CSS and ACP.
Discrete-Event Modeling of Multi-Agent Systems with Broadcasting-Based Parallel Composition Rong Su a a

School of Electrical and Electronic Engineering, Nanyang Technological University, 50 Nanyang Avenue, Singapore 639798

Abstract Multi-agent systems have been widely used in logistics and manufacturing. In this paper we develop an automaton-based modeling framework for a special type of multi-agent systems, where agents are instantiated from a finite number of finite-state automaton templates, and interactions among agents are characterized via cooperative synchronization and broadcasting. To describe the compositional behavior of all agents, we propose a novel broadcasting-based parallel composition rule and show that it is commutative and associative. The effectiveness of this modeling framework and the parallel composition rule is illustrated in a simple multi-agent system. Key words: multi-agent systems, finite-state automata, synchronous product, broadcasting-based parallel composition

1

Introduction

Multi-agent systems have been widely used in logistics and manufacturing, e.g., unmanned ground vehicles (UGVs) are used for container transportation in a seaport terminal, and industrial robots are used for massive production in an automobile factory. In this paper we study a special type of multi-agent systems, where agents are instantiated from a finite number of finitestate automaton template models, and interactions among agents are characterized in two different ways of event synchronization - cooperative synchronization and broadcasting. The former way describes situations, where event synchronization results in the same consequence to all involved agents, while the latter one describes situations, where event synchronization results in different consequences on the action initiators (or the broadcasting agents) and action receivers (or receiving agents), which is typically seen in resource competition. Here, we use the word “broadcasting” simply to emphasize that there is only one action initiator and possibly ⋆ This paper was not presented at any IFAC meeting. Corresponding author Rong Su. Tel. +65-67906042. Fax +6567933318. The author wishes to thank the Singapore Ministry of Education’s AcRF Tier 1 funding support for his research project entitled “Increasing the transparency of a supervisory controller for a discrete-event system and its application in symbolic supervisory control” (Research Grant Reference: RG41/11), upon which this paper was based. Email address: [email protected] (Rong Su).

Preprint submitted to Automatica

multiple action receivers during synchronization - it does not necessarily imply the actual involvement of message communication. An operating environment which is an inseparable part of the system [Ferber (1999)] is also treated as appropriate agents. Such a system can be found in, e.g., a multi-unmanned-aerial-vehicle (UAV) application, where several autonomous UAVs need to be deployed to fulfil tasks of target searching and tracking, and each UAV can communicate with others via broadcasting and must follow prescribed operational sequences specified by onboard finite-state automata, each of which may be related to one specific operational scenario. One of the main technical challenges in such an application is how to develop template models which are sufficiently simple for validation, verification and control purposes, and expressive enough to capture features of the application. In [Rohloff & Lafortune (2006)] the authors introduce a similar module system, which is essentially a multi-agent system with one template. In this system each agent is instantiated from the template model via event relabeling. Two types of events are considered: global events which are shared by all agents, and private events which are disjoint among agents. The standard synchronous product [Ramadge & Wonham (1987)] (or concurrent composition [Hoare (1985)]) is used to describe the compositional behavior of the system. It turns out that such a model is applicable to situations where only cooperative synchronization is present in functionally identical agents. Nevertheless, noncooperative behaviors are

6 August 2013

common in a multi-agent system, particularly when the resource is limited. It is the need of describing noncooperative behaviors of agents concisely in a template-based framework that motivates us to develop a new modeling framework in this paper.

fill the gap towards concrete applications. In addition, in both CCS and ACP communication events are required to undertake both communication coupling and interleaving during parallel composition, which may significantly increase the resulting model complexity, while in our formalism interleaving of broadcasting and receiving events are strictly forbidden.

To have a capability of distinguishing different effects of event synchronization on different agents, we assign events in a template model with the following different attributes: private, cooperating, broadcasting, receiving, broadcasting-in-progress. To describe the compositional behavior of a multi-agent system with these new types of events in each agent model, a novel broadcasting-based parallel composition rule is proposed, which takes synchronous product as a special case when only private and cooperative events are present, and uses a broadcasting style synchronization operation on broadcasting and receiving events, which is close to the communication composition in Algebra of Communicating Processes (ACP) [Bergstra & Klop (1985)].

This paper is organized as follows. In Section 2 the concept of a multi-agent system with a finite number of templates is introduced. Then a broadcasting-based parallel composition rule is presented in Section 3. After applying the proposed modeling framework to an example in Section 4, conclusions are drawn in Section 5. 2

Modeling multi-agent systems in DES

Let Σ be a finite alphabet, where σ ∈ Σ is an event, and ℵ = {!, ?, #, $, ⋄} be a collection of five attributes, where “!” stands for broadcasting, “?” for receiving, “#” for broadcasting-in-progress, “$” for cooperating and “⋄” for ˆ ⊆ Σ×ℵ an attributed alphabet with reprivate. We call Σ ˆ is an attributed event. spect to Σ, and each element in Σ The meaning of each attributed event can be briefly explained as follows. A private event (σ, ⋄) is used to describe an agent’s internal action, which cannot be shared by other agents. For notation simplicity, in the rest of this paper we simply write σ⋄ for (σ, ⋄), and all other attributed events will be written in a similar manner. A cooperating event σ$ is always shared by all agents instantiated from the same template, and it requires simultaneous executions in all agents to capture some cooperative behavior of agents. A broadcasting event σ! and the corresponding receiving event σ? denote two different effects of one system operation, i.e., executing σ simultaneously in different agents, which are used to describe (resource) competitions among agents. Thus, σ! in one agent is expected to be synchronized with σ? in another agent. The outcome of such synchronization is a broadcasting-in-progress event σ#. The idea of using broadcasting and receiving events is similar to using sending and receiving actions in communication composition proposed in CSS and ACP. The idea of using broadcasting-in-progress event is similar to the usage of ˆ ∗ be the free a communication function in ACP. Let Σ ˆ with the empty string ϵ as the unit elemonoid over Σ ment and the string concatenation as the monoid operˆ ∗ is called a language. ation. A subset L ⊆ Σ

Compared with the commonly used RW modeling formalism [Ramadge & Wonham (1987)], which consists of standard automata associated with synchronous product, our formalism is more general and the usage of sending/receiving events with the corresponding broadcasting-based composition can significantly reduce model complexity when resource competition is present. A simple illustration example is to model autonomous vehicles crossing a traffic junction without traffic lights. We assume that at each time instant only vehicles from one direction can pass through the junction, which is a common resource that cannot be possessed by vehicles in more than one direction at each time instant due to a safety consideration. In the RW formalism we need to model junction crossing in each direction with dedicated events so that vehicles in other directions can know in which direction vehicles currently possesses the junction. This results in a large number of different events shared by models of different directions. In our formalism we only use two events: “junction-possessed-by-me” (σ!) and “junction-possessed-by-others” (σ?). The formalism imposes that during broadcasting-based composition, there will be one σ! and multiple σ?, which denotes that the junction is possessed by vehicles in one direction only, and vehicles in all other directions simply watch and wait. Calculus of Communicating Systems (CCS) [Milner (1980)] cannot directly handle broadcastingstyle composition, and sophisticated transformations are needed in order to model broadcasting via pairwise communication. On the other hand, pairwise communication can be easily captured by broadcasting by simply selflooping a concerned receiving event in all agents that are not directly involved in communication. ACP [Bergstra & Klop (1985)] has a means of modeling broadcasting via the communication composition mechanism. But for each specific application, a user needs to define his/her own communication function, making ACP a high-level modeling formalism requiring users to

A nondeterministic finite-state automaton (FSA) is ˆ ξ, x0 , Xm ), where X modeled as a 5-tuple G = (X, Σ, ˆ an attributed alphabet, x0 the initial is a state set, Σ state, Xm ⊆ X a marker state set, and ξ : X × Σ → 2X a transition function, where 2X denotes the power set of X. We extend the domain of ξ to Σ∗ in the usual manner: for all x ∈ X, ξ(x, ϵ) := {x}, and for all sσ ∈ Σ∗ , ξ(x, sσ) := ∪x′ ∈ξ(x,s) ξ(x′ , σ). The reason why we adopt

2

ˆ g,i is kept unchanged in all agent modglobal alphabet Σ els instantiated from Gi . Private event sets of different agents are disjoint, but global event sets need not be. This makes agents instantiated from different templates still be able to interact with each other.

a nondeterministic agent model instead of a deterministic one is that each agent may be able to play the roles of an action initiator and an action receiver at a same state when composed with other similar agents, which results in a composed system containing multiple outgoing transitions labeled by the same broadcastingin-progress event at a global state as outcomes of different broadcasting processes with different initiators. We will see this in a small example presented in Section 4. Due to this reason, we simply start with nondeterministic models. The closed behavior of G is L(G) := {s ∈ ˆ ∗ |ξ(x0 , s) ̸= ∅}, and the marked be((Σ × {⋄, $, #}) ∩ Σ) havior of G is Lm (G) := {s ∈ L(G)|ξ(x0 , s) ∩ Xm ̸= ∅}. The motivation behind these definitions is that closed and marked behaviors denote actual sequences that can be fired in G, while broadcasting and receiving events cannot be fired unless they are coupled together, which leads to the broadcasting-in-progress events. Let ˆ be the collection of all FSAs, whose alphabets are ϕ(Σ) ˆ We adopt the concept of automaton isomorphism Σ. [Booth (1978)] (or isomorphism in short) with a generalization on event relabeling.

Next, we present a broadcasting-based parallel composition rule to describe the compositional behavior of a multi-agent system, which shall be able to capture both cooperative and competitive interactions of agents. 3

ˆ i , ξi , xi,0 , Xi,m ) ∈ Definition 3 Given Gi = (Xi , Σ ˆ i ) (i = 1, 2), the broadcasting-based parallel comϕ(Σ position of G1 and G2 , written as G1 ||B G2 , is a ˆ ξ, x0 , Xm ), where X := X1 × X2 , FSA G = (X, Σ, ˆ := Σ ˆ1 ∪ Σ ˆ 2 , x0 := (x1,0 , x2,0 ), Xm := X1,m × X2,m , Σ ˆ → X1 × X2 is defined as follows. and ξ : X1 × X2 × Σ ˆ we have For all (x1 , x2 ) ∈ X and σ ˆ ∈ Σ, ˆ1 − Σ ˆ 2 , ξ(x1 , x2 , σ Case 1: if σ ˆ∈Σ ˆ ) := ξ1 (x1 , σ ˆ ) × {x2 }; ˆ2 − Σ ˆ 1 , ξ(x1 , x2 , σ Case 2: if σ ˆ∈Σ ˆ ) := {x1 } × ξ2 (x2 , σ ˆ ); ˆ ˆ Case 3: if σ ˆ ∈ (Σ1 − (Σ1 × {!})) ∩ (Σ2 − (Σ2 × {!})), then

ˆ i , ξi , xi,0 , Xi,m ) Definition 1 Two FSA’s Gi = (Xi , Σ (i = 1, 2) are isomorphism with event relabeling if there exist a bijective state mapping f : X1 → X2 and a ˆ1 → Σ ˆ 2 such that bijective event mapping h : Σ

ξ(x1 , x2 , σ ˆ ) := ξ1 (x1 , σ ˆ ) × ξ2 (x2 , σ ˆ );

(1) f (x1,0 ) = x2,0 and f (X1,m ) = X2,m , ˆ 1, (2) for all x, x′ ∈ X1 and σ ∈ Σ x′ ∈ ξ1 (x, σ) ⇐⇒ f (x′ ) ∈ ξ2 (f (x), h(σ)). f is called an isomorphism from G1 to G2 under h.

A broadcasting-based parallel composition

ˆ and one of the following holds, Case 4: if σ ˆ = σ# ∈ Σ - (ξ1 (x1 , σ!) = W1 ∨ξ1 (x1 , σ#) = W1 )∧ξ2 (x2 , σ?) = W2 , - ξ1 (x1 , σ?) = W1 ∧(ξ2 (x2 , σ!) = W2 ∨ξ2 (x2 , σ#) = W2 ), then ξ(x1 , x2 , σ#) := W1 × W2 ; Case 5: for all other cases ξ(x1 , x2 , σ ˆ ) := ∅. 2

2

In other words, two FSA’s are isomorphic with event relabeling if they are identical under a one-to-one state relabeling and a one-to-one event relabeling.

The special features of this broadcasting-based composition is that a broadcasting event can only be synchronized with a receiving event in different agents (as indicated in Case 4), but a receiving event can be synchronized with itself in different agents (as shown in Case 3). As a result, there can be only one agent executing a broadcasting event while all other agents execute the corresponding receiving event simultaneously. The outcome of such synchronization is a broadcasting-inprogress event as indicated in Case 4. The broadcastingbased parallel composition contains synchronous product [Ramadge & Wonham (1987)] as a special case when only private and cooperating events are present in agent ˆ i ⊆ Σi × {⋄, $} (i = models.To see this, assume that Σ ˆ 1, 2). Then for all (x1 , x2 ) ∈ X1 × X2 and σ ∈ Σ,

Definition 2 A multi-agent system with a finite number ˆ i )|i ∈ I}, {{Gj ∈ of templates is a 2-tuple ({Gi ∈ ϕ(Σ i ˆ ϕ(Σji )|ji ∈ Ji }|i ∈ I}) with I, Ji (i ∈ I) being finite index sets. Each Gi is a template of the system, and ˆ j )|ji ∈ Ji } is a collection of agents each set {Gji ∈ ϕ(Σ i ˆi = Σ ˆ g,i ∪˙ Σ ˆ p,i , where Σ ˆ g,i := instantiated from Gi . Σ ˆ i denotes the set of global events, (Σi × {!, ?, #, $}) ∩ Σ ˆ i denotes the set of private and Σp,i := (Σi × {⋄}) ∩ Σ ˆ ˆ ˆ ˙ events. Σji = Σg,i ∪Σp,ji for each ji ∈ Ji such that Gji is isomorphic to Gi with a bijective event mapping hji : ˆj → Σ ˆ i , where hj (σ) := σ for each σ ∈ Σ ˆ g,i . For all Σ i i i, i′ ∈ I, ji ∈ Ji and ji′ ∈ Ji′ , if ji ̸= ji′ then we have ˆ p,j ∩ Σ ˆ p,j ′ = ∅. The global event sets of different Σ i i templates need not be disjoint. 2

   ξ1 (x1 , σ) × {x2 }  ξ(x1 , x2 , σ) =

In other words, each agent Gji is instantiated from the template model Gi by simply mapping each private event ˆ p,i of G to a new private event in Σ ˆ p,j of Gj . The in Σ i i

ˆ1 − Σ ˆ 2, if σ ∈ Σ ˆ2 − Σ ˆ 1, if σ ∈ Σ

{x1 } × ξ2 (x2 , σ)    ξ (x , σ) × ξ (x , σ) if σ ∈ Σ ˆ1 ∩ Σ ˆ 2, 1 1 2 2

which is exactly the definition of synchronous product

3

(x1 , (x′2 , x3 )) ∈ ξ1(23) (x1 , (x2 , x3 ), σ ˆ ). ˆ 1 − (Σ1 × {!})) ∩ (Σ ˆ 2 − (Σ2 × {!})). Subcase 1.3: σ ˆ ∈ (Σ ′ ′ ˆ ˆ Since Then x1 ∈ ξ1 (x1 , Σ) and x2 ∈ ξ2 (x2 , Σ). ′ ˆ ˆ σ ˆ ∈ Σ2 − Σ3 we have (x2 , x3 ) ∈ ξ23 (x2 , x3 , σ ˆ ). Since ˆ 1 − (Σ1 × {!})) ∩ ((Σ ˆ2 ∪ Σ ˆ 3 ) − ((Σ2 ∪ Σ3 ) × {!})), σ ˆ ∈ (Σ we have (x′1 , (x′2 , x3 )) ∈ ξ1(23) (x1 , (x2 , x3 ), σ ˆ ). Subcase 1.4: σ ˆ = σ#. Then one of the following holds: - (x′1 ∈ ξ1 (x1 , σ!) ∨ x′1 ∈ ξ1 (x1 , σ#)) ∧ x′2 ∈ ξ2 (x2 , σ?). ˆ 3 and by expresIn this sub-subcase since σ# ∈ / Σ ˆ sion (1), we know that σ? ∈ / Σ3 . Thus, we have (x′2 , x3 ) ∈ ξ23 (x2 , x3 , σ?). Then we can derive that (x′1 , (x′2 , x3 )) ∈ ξ1(23) (x1 , (x2 , x3 ), σ#). - x′1 ∈ ξ1 (x1 , σ?) ∧ (x′2 ∈ ξ2 (x2 , σ!) ∨ x′2 ∈ ξ2 (x2 , σ#)). ˆ 3 and by expression (1), In this sub-subcase since σ# ∈ /Σ ˆ we have σ! ∈ / Σ3 . Thus, we have (x′2 , x3 ) ∈ ξ23 (x2 , x3 , σ!) or (x′2 , x3 ) ∈ ξ23 (x2 , x3 , σ#). Then we can derive that (x′1 , (x′2 , x3 )) ∈ ξ1(23) (x1 , (x2 , x3 ), σ#). ˆ 3 − (Σ ˆ1 ∪ Σ ˆ 2 ). Then Case 2: σ ˆ∈Σ

in [Ramadge & Wonham (1987)]. We assume that ˆ ⇐⇒ σ? ∈ Σ ˆ ⇐⇒ σ# ∈ Σ. ˆ (∀σ ∈ Σ) σ! ∈ Σ

(1)

This assumption will ensure that during the broadcastingbased parallel composition, a broadcasting event and a receiving event in two different agents must be synchronized. Without such an assumption, a broadcasting event or a receiving event may happen without synchronization as indicated in Case 1 or Case 2. The reason why we enforce synchronization of broadcasting and receiving events is that we adopt a broadcasting communication mechanism, thus, each agent sends a message either to all other agents via broadcasting-receiving synchronization or to none of them - the latter means the broadcasting event will not occur at a concerned state of the system. As a contrast, in CCS and ACP, a pairwise communication mechanism is adopted instead. Thus, each agent can avoid sending a message to or receiving a message from another specific agent by executing a sending or receiving event without synchronization. It is not difficult to see that ||B is commutative under isomorphism with the identity event mapping. Next, we show that it is also associative under isomorphism.

ˆ ). (x′1 , x′2 ) = (x1 , x2 ) ∧ x′3 ∈ ξ3 (x3 , σ ˆ3 − Σ ˆ 2 we have (x2 , x′ ) ∈ ξ23 (x2 , x3 , σ ˆ ). Since σ ˆ ∈ Σ 3 ˆ3 ∪ Σ ˆ 2) − Σ ˆ 1 we have (x1 , (x2 , x′ )) ∈ Since σ ˆ ∈ (Σ 3 ˆ ξ1(23) (x1 , (x2 , x3 ), Σ). ˆ1 ∪ Σ ˆ 2 ) − ((Σ1 ∪ Σ2 ) × {!})) ∩ (Σ ˆ3 − Case 3: σ ˆ ∈ ((Σ ′ ˆ1 ∪ Σ ˆ 2. ˆ ) and σ ˆ∈Σ (Σ3 × {!})). Then x3 ∈ ξ3 (x3 , σ ˆ1 − Σ ˆ 2 , then x′ ∈ ξ1 (x1 , σ ˆ) subcase 3.1: If σ ˆ ∈ Σ 1 ′ ′ ˆ ˆ ˆ ∈ Σ3 − Σ2 we have (x2 , x3 ) ∈ and x2 = x2 . Since σ ˆ 1 − (Σ1 × {!})) ∩ ((Σ ˆ2 ∪ ξ23 (x2 , x3 , σ ˆ ). Since σ ˆ ∈ (Σ ′ ′ ˆ Σ3 ) − ((Σ2 ∪ Σ3 ) × {!})), we have (x1 , (x2 , x3 )) ∈ ξ1(23) (x1 , (x2 , x3 ), σ ˆ ). ˆ2 − Σ ˆ 1 then x′ = x1 and x′ ∈ subcase 3.2: If σ ˆ ∈ Σ 2 1 ˆ 2 − (Σ2 × {!})) ∩(Σ ˆ 3 − (Σ3 × {!})), ξ2 (x2 , σ ˆ ). Since σ ˆ ∈ (Σ ˆ2 ∪ Σ ˆ 3) − ˆ ). Since σ ˆ ∈ (Σ we have (x′2 , x′3 ) ∈ ξ23 (x2 , x3 , σ ′ ′ ˆ ˆ ). Σ1 , we have (x1 , (x2 , x3 )) ∈ ξ1(23) (x1 , (x2 , x3 ), σ ˆ 1 − (Σ1 × {!})) ∩ (Σ ˆ 2 − (Σ2 × subcase 3.3: If σ ˆ ∈ (Σ {!})), then by Case 3 in Def. 3 we can derive that ˆ ). (x′1 , (x′2 , x′3 )) ∈ ξ1(23) (x1 , (x2 , x3 ), σ Case 4: σ ˆ = σ#. We consider the following subcases. Subcase 4.1: ((x′1 , x′2 ) ∈ ξ12 (x1 , x2 , σ!) ∨ (x′1 , x′2 ) ∈ ξ12 (x1 , x2 , σ#)) ∧ x′3 ∈ ξ3 (x3 , σ?). Sub-subcase 4.1.1: (x′1 , x′2 ) ∈ ξ12 (x1 , x2 , σ!). We have several possibilities to consider. ˆ1 − Σ ˆ 2 . Then x′ = x2 and x′ ∈ ξ1 (x1 , σ!). (a) σ! ∈ Σ 2 1 ˆ 2 , which means By expression (1) we have σ? ∈ / Σ ˆ3 − Σ ˆ 2 . Thus, (x2 , x′ ) ∈ ξ23 (x2 , x3 , σ?), from σ? ∈ Σ 3 which we have (x′1 , (x2 , x′3 )) ∈ ξ1(23) (x1 , (x2 , x3 ), σ#). ˆ2 − Σ ˆ 1 . Then x′ = x1 and x′ ∈ ξ2 (x2 , σ!). (b) σ! ∈ Σ 1 2 Thus, (x′2 , x′3 ) ∈ ξ23 (x2 , x3 , σ#). By expression (1) we ˆ 1 , which means σ# ∈ (Σ ˆ2 ∪ Σ ˆ 3) − Σ ˆ 1. have σ# ∈ / Σ Thus, we have (x1 , (x′2 , x′3 )) ∈ ξ1(23) (x1 , (x2 , x3 ), σ#). Sub-subcase 4.1.2: (x′1 , x′2 ) ∈ ξ12 (x1 , x2 , σ#). We have several possibilities to consider.

Theorem 4 ||B is associative under isomorphism with the identity event mapping. 2 ˆ i , ξi , xi,0 , Xi,m ) ∈ ϕ(Σ ˆ i ) (i = Proof: Let Gi = (Xi , Σ 1, 2, 3). We need to show that (G1 ||B G2 )||B G3 = G1 ||B (G2 ||B G3 ). Let f : (X1 × X2 ) × X3 → X1 × (X2 × X3 ), where f ((x1 , x2 ), x3 ) := (x1 , (x2 , x3 )). Clearly, f is bijective. To show that f is an isomorphism, by the definition of f , we have f ((x1,0 , x2,0 ), x3,0 ) = (x1,0 , (x2,0 , x3,0 )), and f ((X1,m × X2,m ) × X3,m ) = X1,m × (X2,m × X3,m ). Let ξ(12)3 and ξ1(23) be the transition functions of (G1 ||B G2 )||B G3 and G1 ||B (G2 ||B G3 ) respectively, and ξ12 and ξ23 be transition functions of G1 ||B G2 and G2 ||B G3 respectively. Assume ˆ ), where that ((x′1 , x′2 ), x′3 ) ∈ ξ(12)3 ((x1 , x2 ), x3 , σ ˆ1 ∪ Σ ˆ2 ∪ Σ ˆ 3 . We consider cases 1-4 in Def. 3. σ ˆ∈Σ ˆ1 ∪ Σ ˆ 2) − Σ ˆ 3 . Then Case 1: σ ˆ ∈ (Σ (x′1 , x′2 ) ∈ ξ12 (x1 , x2 , σ ˆ ) ∧ x′3 = x3 . There are four subcases to consider. ˆ1 − Σ ˆ 2 . Then x′ = x2 and Subcase 1.1: σ ˆ ∈ Σ 2 ′ ˆ 1 − (Σ ˆ2 ∪ Σ ˆ 3 ) and x1 ∈ ξ1 (x1 , σ ˆ ). Clearly, we have σ ˆ∈Σ (x′1 , (x2 , x3 )) ∈ ξ1(23) (x1 , (x2 , x3 ), σ ˆ ). ˆ2 − Σ ˆ 1 . Then x′ = x1 and Subcase 1.2: σ ˆ ∈ Σ 1 ′ ˆ ˆ 3 , we have (x′ , x3 ) ∈ x2 ∈ ξ2 (x2 , σ ˆ ). Since σ ˆ ∈ Σ2 − Σ 2 ˆ2 ∪ Σ ˆ 3) − Σ ˆ 1 , we have ξ23 (x2 , x3 , σ ˆ ). Since σ ˆ ∈ (Σ

4

ˆ1 − Σ ˆ 2 . Then x′ = x2 and x′ ∈ ξ1 (x1 , σ#). (a) σ# ∈ Σ 2 1 ˆ 2 , which means By expression (1) we have σ? ∈ / Σ ˆ3 − Σ ˆ 2 . Thus, (x2 , x′ ) ∈ ξ23 (x2 , x3 , σ?), from σ? ∈ Σ 3 which we have (x′1 , (x2 , x′3 )) ∈ ξ1(23) (x1 , (x2 , x3 ), σ#). ˆ2 − Σ ˆ 1 . Then x′ = x1 and x′ ∈ ξ2 (x2 , σ#). (b) σ# ∈ Σ 1 2 Thus, (x′2 , x′3 ) ∈ ξ23 (x2 , x3 , σ#). By expression (1) we ˆ 1 , which means σ# ∈ (Σ ˆ2 ∪ Σ ˆ 3) − Σ ˆ 1. have σ# ∈ / Σ Thus, we have (x1 , (x′2 , x′3 )) ∈ ξ1(23) (x1 , (x2 , x3 ), σ#). (c) x′1 ∈ ξ1 (x1 , σ?) and x′2 ∈ ξ2 (x2 , σ!). Thus, (x′2 , x′3 ) ∈ ξ23 (x2 , x3 , σ#). Thus, we have (x′1 , (x′2 , x′3 )) ∈ ξ1(23) (x1 , (x2 , x3 ), σ#). (d) x′1 ∈ ξ1 (x1 , σ!) and x′2 ∈ ξ2 (x2 , σ?). Since ˆ 2 − (Σ2 × {!})) ∩ (Σ ˆ 3 − (Σ3 × {!})), we have σ? ∈ (Σ ′ ′ (x2 , x3 ) ∈ ξ23 (x2 , x3 , σ?). Thus, we have (x′1 , (x′2 , x′3 )) ∈ ξ1(23) (x1 , (x2 , x3 ), σ#). Subcase 4.2: (x′1 , x′2 ) ∈ ξ12 (x1 , x2 , σ?) ∧ (x′3 ∈ ξ3 (x3 , σ!) ∨ x′3 ∈ ξ3 (x3 , σ#)). We have several possibilities to consider. ˆ1 − Σ ˆ 2 . Then x′ = x2 and Sub-subcase 4.2.1: σ? ∈ Σ 2 ′ ˆ 2, x1 ∈ ξ1 (x1 , σ?). By expression (1) we have σ!, σ# ∈ /Σ ′ ˆ3 − Σ ˆ 2 . Thus, either (x2 , x ) ∈ which means σ!, σ# ∈ Σ 3 ξ23 (x2 , x3 , σ!) or (x2 , x′3 ) ∈ ξ23 (x2 , x3 , σ#), from which we have (x′1 , (x2 , x′3 )) ∈ ξ1(23) (x1 , (x2 , x3 ), σ#). ˆ2 − Σ ˆ 1 . Then x′ = x1 Sub-subcase 4.2.2: σ? ∈ Σ 1 ′ ′ ′ and x2 ∈ ξ2 (x2 , σ?). Thus, (x2 , x3 ) ∈ ξ23 (x2 , x3 , σ#). ˆ 1 , which means By expression (1) we have σ# ∈ / Σ ˆ2 ∪ Σ ˆ 3) − Σ ˆ 1 . Thus, we have (x1 , (x′ , x′ )) ∈ σ# ∈ (Σ 3 2 ξ1(23) (x1 , (x2 , x3 ), σ#). Based on the above discussions we can derive that ˆ ). Similarly, we (x′1 , (x′2 , x′3 )) ∈ ξ1(23) (x1 , (x2 , x3 ), σ ˆ) can show that (x′1 , (x′2 , x′3 )) ∈ ξ1(23) (x1 , (x2 , x3 ), σ ˆ ). Thus, implies ((x′1 , x′2 ), x′3 ) ∈ ξ(12)3 ((x1 , x2 ), x3 , σ g is an isomorphism between (G1 ||B G2 )||B G3 and G1 ||B (G2 ||B G3 ) under the identity event mapping.  4

tion (1). Both templates contain no private and cooperating events. Suppose we have two EV agent models G1,EV and G2,EV instantiated from GEV . We apply the proposed broadcasting-based synchronous product, and the composition outcome is shown in Figure 2. Suppose we have another EV G3,EV instantiated

α ?,β ?

0

α ?,β ?

0

α#

0,0

1,0

β# α#

0

1

G2,EV

α!

0,1

G1,EV||BG2,EV

Fig. 2. Example: broadcasting-based parallel composition

from the template GEV .Then G1,EV ||B G2,EV ||B G3,EV is depicted in Figure 3. Based on the state laβ# 1,0,0

α ?,β ?

α# 0,0,0

β# β#

α# α#

0,0,1

0,1,0

Fig. 3. Example: G1,EV ||B G2,EV ||B G3,EV

bels we can see that (G1,EV ||B G2,EV )||B G3,EV = G1,EV ||B (G2,EV ||B G3,EV ) under isomorphism with the identity event mapping, as predicted by Theorem 4. Finally, we compose the EV models with the station model. Since there is only one station, GS is also used for the agent instance. The outcome of G := G1,EV ||B ||G2,EV ||B G3,EV ||B GS is depicted in Figure 4, which is isomorphic to G1,EV ||B G2,EV ||B G3,EV with the identity event mapping. It is not difficult to see β# 1,0,0,1

α ?,β ?

α# 0,0,0,0

β# β#

α# α#

0,0,1,1

0,1,0,1

Fig. 4. Example: G := G1,EV ||B G2,EV ||B G3,EV ||B GS

that the closed behavior of G is L(G) = {(α#)(β#)}∗ and the marked behavior is Lm (G) = {(α#)(β#)}∗ , which clearly indicates that EVs are charged alternatively, as what we expect. We can check that the template model in Figure 1 is actually the simplest one that can still correctly capture the charging behavior. If we do not use the broadcasting and receiving events, the existence of a template model is still unknown to us.

β? 1

α!

G1,EV

β!

We use a simple example to illustrate the modeling framework and the corresponding broadcasting-based parallel composition. Suppose we have several functionally identical electrical vehicles (EVs), which need to be charged alternatively at one charging station considered as an operating environment. A template model GEV for EVs and a template model GS for the charging station are depicted in Figure 1, where α denote “possess the charging station”, and β “release the charging station”. The template alphabets

α ?,β ?

1

α!

Example

β!

0

β#

α ?,β ?

β!

1

α?

Fig. 1. Example: GEV (left) and GS (right)

ˆ EV = Σ ˆ S = {α!, α?, α#, β!, β?β#} due to AssumpΣ

5

5

Conclusions

We have presented a modeling formalism to describe a multi-agent system derivable from a finite number of template models. In this framework each template alphabet consists of events with five different attributes: broadcasting, receiving, broadcasting-in-progress, cooperating and private. To model the compositional behavior of instantiated agents, we have proposed a novel broadcasting-based parallel composition rule, which contains synchronous product as a special case. We have shown that this parallel composition rule is commutative and associative. The new modeling formalism and the corresponding parallel composition rule allow us to develop concise template models, which lays a foundation for future work on analysis and control of multi-agent systems derivable from agent templates. References [Booth (1978)] Booth, K. (1978). Isomorphism testing for graphs, semigroups, and finite automata are polynomially equivalent problems. SIAM Journal on Computing, 7(3), 273–279. [Bergstra & Klop (1985)] Bergstra, J. A., Klop, J. W. (1985). Algebra of communicating processes with abstraction. Theoretical Computer Science, 37(1), 77–121. [Ferber (1999)] Ferber, J. (1999). Multi-Agent System: An Introduction to Distributed Artificial Intelligence. Harlow: Addison Wesley Longman, ISBN 0-201-36048-9. [Hoare (1985)] Hoare, C. A. R. (1985). Communicating Sequential Processes. Prentice Hall International, ISBN 0-13-153271-5. [Milner (1980)] Milner, R. (1980). A Calculus of Communicating Systems. Springer Verlag, ISBN 0-387-10235-3. [Ramadge & Wonham (1987)] Ramadge, P. J., Wonham, W. M. (1987). Supervisory control of a class of discrete event systems. SIAM J. Control and Optimization, 25(1), 206–230. [Rohloff & Lafortune (2006)] Rohloff, K., Lafortune, S. (2006). The verification and control of interacting similar discreteevent systems. SIAM Journal on Control and Optimization, 45(2), 634-667.

6

Suggest Documents