A Methodology for Modeling Interactions in ... - Semantic Scholar

1 downloads 0 Views 262KB Size Report
r. Figure 8. We explain the methodology with the follow example: a e- commerce environment involves .... and Directions”, Academic. Press, San Diego, 1998.
A Methodology for Modeling Interactions in Cooperative Information Systems Using Coloured Petri Nets

Fernando Ramos1

Juan Frausto1

Francisco Camargo2

[email protected]

[email protected]

[email protected]

Instituto Tecnológico y de Estudios Superiores de Monterrey, 1Campus Cuernavaca, 2Campus Estado de México. information, and work together in order to achieve the objective [16].

Abstract Cooperative Information Systems (CIS) become relevant to integrate different kinds of systems so as to work collaboratively for a common goal. CIS are considered by nature as dynamic systems, and one of the most difficult problems related to the dynamic of the system is how to model and control simultaneously multiple interactions among agents in a friendly way. Consequently, expressiveness becomes a problem related to the representation so far, the similar systems cope neither with the problem of expressiveness nor with multiple interactions in a satisfactory way. We propose in this paper, an integrated methodology based on Coloured Petri Nets (CPN) in order to model the interaction mechanism in a CIS and reduce the associated complexity in the representation of the dynamic of the system. This methodology provides us great advantages in the representation and reasoning for the interaction mechanism modeled in CIS. The methodology integrates mainly: a) the action basic loop in order to represent the system interactions and to model organization conversations, b) the CPN in the interaction design and system simulation, c) the communicative acts of FIPA (Foundation for Intelligent Physical Agents), including in the Agent Communication Language Specification.

Keywords: Cooperative Information Systems, Coloured Petri Nets, Interaction, Multi-Agent Systems, Agent-Based Software Engineering.

1 Interaction Systems

and

Cooperative

Information

In our approach, a Cooperative Information Systems (CIS) is considered as a cooperative multi-agent system integrated by a set of agents, data, and procedures working, in a cooperative way, to support daily activities in the organization. They have a common goal, exchange

To model a CIS is a complex work and so the system engineer needs adequate tools in order to appropriately manage the model process. Static modeling paradigms are insufficient for representing system behavior over time. The reason is that they provide no way to represent a particular state of a system, or for specifying how the system’s state will change as time passes. Lacking such provisions, static models cannot execute dynamic interactions properly [12], otherwise, a dynamic modeling is one that can represent both the structure and the behavior of a system. In order to explain the interaction role, we propose to satisfy it within a more general framework, which is illustrated by the model shown in figure 1. In the model we consider that the Cooperation problem involves several layers: Communication layer, Interaction layer, and the Coordination layer. We aim to deal more specifically with the Interaction layer in this work. At the low level we have a Communication Protocol, which enables the information exchange among the agents of the system and produces a change in the state of the system [1] [15]. The Interaction mechanism is a set of behavior rules that defines the information exchange among agents [5] [3]. The Coordination mechanism establishes the action sequence and execution according to the agents’ individual goals and the common goal of the CIS [14] [4]. Finally, at the high level we have a Cooperation which is a result of the mechanisms that support interactions among the agents [13] [11]. We understand for Cooperation the agent’s behavior for a coordinate interaction and information exchange, to achieve a common goal. In figure 1 we can observe a general cooperation situation between two agents and the relation with our propose framework. Here we represent the communication layer like a link relation between agents, the interaction with a set of behavior rules, one for each agent, and the coordination with an ordered set of actions for the different agents. The interaction mechanism is central for the cooperation in CIS, because it is the bridge between the communication protocol and the coordination mechanism for the agents in the system.

C o o p e r a tio n A gent 1

C o o r d in a tio n

A C T IO N S a 1 ,1 a 1 ,2 ...

C o o rd in a ti o n In te r a c ti o n C o m m u n ic a ti o n

R u le s

A gent 2 C o o r d in a tio n In te r a c tio n

I n te r a c tio n

A C T IO N S a 2 ,1 a 2 ,2 ...

C o m m u n ic a tio n R u le s

DB1

C o m m u n ic a tio n Figure 1 The interaction problem for CIS are immersed in a natural dynamic world, consequently, the interaction modeling and control are hard to manipulate and normally they have ambiguity and control problems. We think that the use of a formal method is a feasible approach to properly manage the associated complexity in the modeling and allow to simulate the dynamic of the system which is related to multiple simultaneous interactions. The classic formal methods like the first order logic, state transitions diagrams, among others, are very difficult to manipulate, and the use of other methods such as the Petri Nets become functional, but some of them lack the expressivity to model this kind of problem. The following paragraph describes briefly some relevant works dealing with this problem.

2 Interaction and Formal Methods The uses of different formal methods in order to model the interaction mechanism are present in related literature such as: The First Order Logic [10], State Transition Diagrams [1] [8], Condition/Event (C/E) Petri Nets [6], are some of the approaches. In the different applications for these methods, the interaction usually appears isolatedly; however, agents are sometimes involved in several interactions simultaneously and they have to manage these multiple interactions which involve a complex problem to be solved. Some limitations of these models are: 1) they are practical to specify the structure of the interaction when they appear in isolated communication situations, but they pose a high level of difficulty to model complex protocols and several interactions simultaneously. 2) It is very complex to manage and modify in order to respond to changes in the system specification. 3) The methods are good for representing static systems, but we need model dynamic interactions situations, and the methods pose limitations for this. 4) The methods pose a combinatory explosion when the need for modeling complex simultaneous interactions in CIS arise. 5) They are not adequately expressive to model complex simultaneous interactions in CIS.

The most important problems to be coped with in order to improve the performance of the model are the following: • • •

The state of the simultaneous interaction among more than two agents. The behavior of the agents in the interaction according to a precise state. The representation of different messages for different agents in different states.

We classified some of the requirements for modeling interaction in CIS in three areas according to their integration with a general methodology, which are: the Modeling of the System, the Modeling of the Interaction Mechanism, and the System Development. In the Modeling of the System, we need a graphical representation tool with well defined semantics that allows analysis, the ease to model concurrency in the system, representation of states and action associated to theirs, and the capacity for modeling big system hierarchically. In the Modeling of the Interaction Mechanism, we need a tool that enables an easy representation of the interaction dynamics among more than two agents simultaneously; maintenance of the interaction states, management of complex messages according to the agent and the interaction state, and support of the associated behavior with the system interaction. To ease the System Development, we need to offer the systems engineering’s a modeling tool that permits to trace the dynamics of the interaction and simulate the systems behavior before the implementation, including conflict detection, such as deadlocks. To simplicity system maintenance we need to reuse both software and models, and the possibility for an simple adaptation of the system to new requirements.

3 Coloured Petri Nets for Modeling Interaction A Petri net is a formal and graphic appealing language, which is appropriate for modeling complex systems with concurrency [12]. The coloured Petri nets are a high level Petri net where each token of a different color represents arbitrary data values. This extension increases the descriptive power for modeling. The firing of transitions is then made dependent on the availability of an appropriately coloured token [12]. The coloured Petri nets are a good formalism for describing concurrency, synchronization and causality [2], and are suitable for modeling, analyzing and prototyping dynamic systems with parallel activities [5] as CIS in our approach. In this work, we propose the use of CPN, because they have relevant characteristics for modeling interaction in CIS, such as: 1) the graphical representation, 2) the well defined semantics, 3) the formal analysis of the models and 4) the capacity for modeling the system hierarchically. The properties of CPN should allow to model the state of the interaction simultaneously among more than two agents, the behavior of the interaction according to its state and representing different message for different agents in different states. The use of CPN computer tools, such as Design/CPN [12], help us make a dynamic simulation of the system interaction, and to find problems before the system implementation. Other works that modeling interaction using CPN are El Fallah et al. [5] and Cost et al. [3]. El Fallah et al. are

focuses on the study of the pragmatic of multi-agent systems design, combine two paradigms: 1) Distributed observation to capture the interactions between agents and 2) CPN as a formalism to identify interaction-oriented designs. Cost et al. are focused in the construction of a language for conversation specification, named Protolingua within the framework of Jackal agent development environment, and they proposed use CPN as a model underlying a language for conversation specification. A central point in this work is how to reduce the associate complexity in the modeling of the interaction among agents in a CIS. In figure 2 we can observe a model used in Demazeau et al.[6] with C/E Petri Nets, where they represent two agents: Agent 1 and Agent 2, and n messages. Their approach uses a “message line concept“, which is modeled with C/E PN, where the virtual medium linking two agents, capable of exchanging n different sorts of messages, consists of m lines like the ones shown in figure 2. The agents are modeled with C/E PN. The C/E PN details, like place and transitions, are evident to the system engineer in the virtual medium, and the complexity of the model is associate with the number of links among agents and message lines. The incorporation of new simultaneous interactions among agents is hardest to represent, because we need to model and include new message lines, and the associated complexity is increased in n*s links, where s is the number of additional agents which are participate in the interaction and n is the total number of messages.

Line for message ( j )

Box (i-1,j)

Box (i,j)

Box (i+1,j)

Line for message (j-1)

Box (i-1,j-1)

Box (i,j-1)

Box (i+1,j-1)

Virtual Medium

Entities

Entity (i-1)

Entity (i)

Entity (i+1)

Figure 2 We can compare it with the same problem represented in our approach in figure 3, where we can see a CPN inside each agent and modeling each message that is part of the interaction relation of the system, represented by a link between agents. We do not use CPN in order to model the virtual medium, and when we need to incorporate new simultaneous interactions or agents, we just need to modify the agent and its message representation in order to include a new interaction using the CPN color declarations.

Message 1

Message 1

...

...

Message n

Message n Agent 1

Agent 2

Figure 3

If more than two agents are interacting, the use of a virtual medium to model the interaction is very difficult. Instead, by using our approach based on CPN, this difficulty is reduced considerably. We can see in [6] the associated complexity in terms of the number of links between agents interactions, according to the message numbers (m), and the systems agents (n). In the model presented in figure 2, the complexity is O(m) and for other models, is O(m*n2). Otherwise, in the proposed model of figure 3, using CPN for modeling agent interaction, the associated complexity is O(n2), but, there is message independent because we just take the interactions among agents. The differences between our approach and the [6] approach are: 1) in the modeling of the virtual medium, such as in our approach we use distributed systems techniques and we do not need to model this explicitly, and 2) at the moment of modeling a new simultaneous interaction, because the associated complexity in the [6] model is O(m*s), and in our propose is O(2*s), where s is the number of additional agents which are participate in the interaction and m is the total number of messages. Clearly, our modeling technique is suitable for a large scale agents applications, like a CIS, in contrast with [6] technique.

2. N e g o t ia t io n

1 . P r e p a r a t io n

C o n v e r s a tio n No. 1

Agent 1

4 . E v a lu a t io n

Agent 2

3 . E x e c u t io n

Figure 5 Many conversations are part of a interaction, and we need to build a interaction diagram, like the one in figure 6, for each system interaction. Main Interaction

Agent 1

Conversation No. 1

Agent 2

Agent 2

Conversation No. 1.1

Agent 3

Figure 6

4 Interaction Modeling Build the interaction diagrams is a central activity. Our analysis is centered on the systems interactions, where we determine who talks to whom and in which way. We propose the use of the action basic loop [9] for modeling the interaction between agents. The action basic loop proposes an ontology of communicative acts: Request, Promise, Inform and Declare. In figure 4 we can see the communicative acts and their loop position, and in figure 5 we present the loop processes. R equest

Agent 1

C o n v e rs a tio n No. 1

D e c la r e

Agent 2 P r o m is e

In fo rm

Figure 4 In the first steep, agent 1 prepares the request for agent 2 in a conversation. After that, agent 1 and agent 2 make a negotiation about the request, and agent 2 issues a promise. In the next stage, agent 2 executes the promise and when they finish the task, they give a report to agent 1. In the last step, agent 2 makes a declaration for the evaluation of agent 1 work.

The methodology proposes a documentation set and a notation for the interaction model, but they are not showed in this paper. The FIPA communicative acts [7] are more specific than the Flores’s communicative acts [9]. We propose a categorization of the FIPA communicative acts according to Flores communicative acts, in figure 7. Our proposal is to use the Flores’s communicative acts, for the action basic loop, but exploring the FIPA approach for expressiveness because, if we only use the four Flores basic acts, probably our communication language will lose expressivity. FIPA Communicative act accept-proposal Agree Cancel Cfp (call for proposals) Confirm Disconfirm Failure Inform Inform-if (macro act) Inform-ref (macro act) not-understood propose query-if query-ref Refuse reject-proposal request request-when Request-whenever subscribe

Communication for action (Flores) Request Promise Inform Declare X X X X X X X X X X X X X X X X X X X X

Figure 7

The basic action loop help us to have a coordinate conversation between agents, and to join more that two agents simultaneously in the coordinate conversation, building an Interaction. [5] and [3], have different interaction protocols, and they increase the complexity in recognizing the interaction in use and its different states.

5 IMCIS: The Proposed Methodology for Modeling Interaction in CIS CIS are complex due to their dynamic nature and the management of many simultaneous interactions, among other things, and the software specification is hard to be implemented due to the reasons stated above. A proper structured way of building software for the aforementioned needs is relevant to facilitate the specification of complex systems. In addition to this, the problem of building powerful software tools to specify dynamic complex systems, such as CIS, has not been dealt with enough. We center our work in two areas: analysis and design of interactions in CIS. We actually hold a different views about the system: 1) the explicit analysis and specification for the static view and 2) the implicit analysis and specification for the dynamic view. The current works give us a static model, but the CIS are very dynamic [16]. We propose to build a behavior model using the individual and the structural model. In order to make a model of a system, we need a set of abstractions that will allow us to capture the essence of the behavior of a system that we wish to model. The CIS frequently perform complex tasks that are distributed over space and time, and that involve discrete flows of objects and/or information. We propose the use of CPN in order to represent the agent behavior and its intentions, and to simulate the resulting model. In figure 8 we can see the integration of the models. At the low layer we have the individual model, in which we describe the agents separately. At the medium layer, we have the structural model, in which we describe the interactions among agents, an finally, we have the dynamic model, in which we observe and control the simulation of the system interaction. It is important to note that the implicit analysis and specification is based on the explicit analysis and specification. A important point is that we built the explicit model for the system specification, but the dynamic model is built for the system specification, and simulated in the tool. The CPN model capture both the static and the dynamic behavior of the specification.

2. 3. 4. 5. 6. 7.

Build the agents diagram (structural model). Build the interaction diagrams (structural model). Specify the CIS. Design the agent ports (structural model). Design the messages (structural model). Specify the systems messages using Coloured Petri Nets (structural model).

Implicit Analysis and Specification: 8.

Simulate the system interactions (dynamic model).

S y ste m D y n a m ic

1.

Identify agents and their intentions (individual model).

... ...

A g e n ts

E x p lic it A n a ly s is & S p e c if ic a tio n

Figure 8 We explain the methodology with the follow example: a ecommerce environment involves simultaneous interactions among buyers, seller, and suppliers that need to be controlled. The first step is to identify the agents and their intentions. Here we have three agents: Buyer, Seller and Supplier. We build the agents set A, with agents and his intentions: A={(Buyer, to buy a product), (Seller, to make the best offer to buyer according with his needs), (Supplier, to offer the best quality - price products)}. In figure 9 we present the agent diagram, product of the second steep. Buy

Deliver

Buyer

Supplier

Seller

Sell

Explicit Analysis and Specification:

I m p lic it A n a ly s is & S p e c if ic a tio n

S y ste m S tr u c tu r e

The IMCIS, our proposed methodology for modeling interaction in CIS has the following steps: IMCIS (Interaction Methodology for CIS)

B e h a v i o r

Order

Figure 9 The equivalent graph for the agent diagram is: AD={(Buyer, Seller, Supplier), (Buy, Sell, Order, Deliver)}.

Now, we begin to build the interaction diagram. The main system interaction is: Buy a product, and they have four conversations: Buyer Buy Seller, Seller Sell Buyer, Seller Order Supplier, Supplier Deliver Seller. Figure 10 show the interaction diagram.

Now, we model the general interaction mechanism used by the Buyer, Seller and Provider.

Interaction: Buy a Product

Buyer

Buy/Sell

Seller

Seller

Order/Deliver

Supplier

Figure 10 We can specify the CIS with the following expression: CIS={A, Cg, Gk, I}, where: • • • •

Pout Buy/Sell, Seller(Request, Declare Satisfaction(Type), Cancel(Type), Cancel Make New Request, Decline to Accept(Type), Close(Type), Ask Recons(Type), Counter, Decline Counteroffer, Agree to Counteroffer).

A={(Buyer, to buy a product), (Seller, to make the best offer to buyer according with his needs), (Supplier, to offer the best quality - price product)}. Cg= To satisfy the buyer need with the best offer. Gk={Buyer need, products}. I={Buy a product}.

In the next step, we begin the design of the interaction in the CIS. In figure 11 and 12, we model the different steps and cases in a conversation, where we have the client/provider communicative acts, the step into the basic action loop and the role in the conversation. We continue to design agents ports: Interaction: Buy a product (Buyer, Seller, Supplier). Conversations: 1) Buyer Buy Seller, 2) Seller Sell Buyer, 3) Seller Order Supplier, 4) Supplier Deliver Seller. Ports: We use the communicative acts, according to the basic interaction loop, the Buyer, Seller, and Supplier play two different roles in the conversation: Client and Provider. In the Pin and Pout ports, we normally represent the provider and client conversation messages. We only show the Buyer ports. The notation for port representation in Agent 1 Conversation Agent 2 is: P(in or out) Conversation, Agent2 (m1, m2, …, mx), where mi is the i message in the port in the conversation between Agent 1 and Agent 2, and x is the total message number. Buyer: Pin Buy/Sell , Seller (Agree, Decline, Counteroffer, Report Completion(Type), Revoke(Type), Revoke and Counteroffer, Close(Type), Ask Recons(Type)).

Basic Communicative Acts Client Request Declare satisfaction No agr No rep Void Cancel No agr Preparation Void Cancel make new request Decline to accept No agr Void Close Revoked Declined Ask recons Revoked Declined Counter Decline counteroffer Agree to counteroffer

Preparation

Interaction Negotiation Execution

Evaluation

Start Start Start Use Use Start Start Start Start Start Start Use Start Start Use Use Start Notation: Start: Conversation Firing. Use: Conversation Use.

Figure 11 Basic Communicative Acts Provider Agree Decline Counteroffer Revoke and counteroffer Revoke No agr Void Report completion No agr Void Ask recons Cancel Close Canceled Satisfied

Interaction Preparation Negotiation Execution

Evaluation

Start Start Start Start Use Use Start Start Start Use Use Notation: Start: Conversation Firing. Use: Conversation Use.

Figure 12 In figure 13 we have the hierarchy page, build in Design/CPN, where we represent two agents, Client and Provider. The Client is represented by the MainClient CPN, and the Provider with the MainProvider CPN. We use the fusion place mechanism for interconnecting net structure on different pages. A fusion place is a place that has been equated with one or more other places, so that the fused

places act as a single place with a single marking [12]. The defined fusion set is CommunicationMedium and they represent the common places in the interaction. In figure 14, we have the color declarations.

The first step of a general conversation is the preparation step, where the conversation begins with a client message request, and the provider can respond with different kinds of messages like agree, decline, report completion with no agreement, counteroffer, inside the step naming negotiation, like in the table in figures 11 and 12.

Figure 13 In a common interaction, the coordination communicative flow are: buyer request, seller agree, seller report completion, buyer declare satisfaction, but, if the agents face an interaction conflict, a possible coordination communicative flow is: buyer request and the seller has different options: 1) Agree to accept the requirement, 2) Decline the request, 3) Report completion with no agreement or 4) Counteroffer to provide a new option. In our example the seller counteroffers the buyer with a different product. The buyer has different options: 1) Counter to ask for a different option, 2) Decline counteroffer, 3) Cancel and make new request, 4) Cancel no agreement, 5) Declare satisfaction no agreement or 6) Agree to counteroffer. If the option is agree to counteroffer, the interaction flow is similar to the common interaction flow. This interaction situation are part of the negotiation step, shown in figure 15, where the client and provider have a message interchange before advance to the next step, such as the tables 11 and 12.

but if the message is different, the conversation returns to execution step, with decline to accept message, or to negotiation step with cancel and make new request message.

In the execution step, the provider works in order to satisfy the client’s request. The provider can use the following message: report completion, revoke, revoke and counteroffer. In the case of the revoke message, the conversation probably returns to negotiation step, and with the report completion message the conversation moves forward to evaluation step. When the conversation is at this step, the client must evaluate the provider’s work result. The messages are: declare satisfaction, decline to accept, cancel or cancel and make new request. If the messages are declare satisfaction or cancel, the conversation comes to an end,

Figure 14

Figure 15

Conclusion This paper provides a guide for modeling interaction in cooperative information systems by means of the use of coloured Petri nets to manage the associated complexity for modeling the dynamic of the system. The interaction relations among agents are represented via an agent diagram, and formally specified using CPN. The use of CPN formalism offers the main advantages for modeling interaction in CIS: 1) It allows to easily model the state of the interaction simultaneously among more than two agents, 2) It allows to easily model the behavior of the interactions according to the state of the agents, 3) It allows an easy representation of different message for different agents in different states, 4) It allows to simulate the system interaction dynamics. The use of the basic action loop in order to model the organization interaction in the CIS helps to understand and represent different situations with a common action and coordination language. The explicit and implicit analysis & specification where the system engineer may be managing the structure complexity and the system dynamics with the use of CPN. The use of fusion place, for modeling the system hierarchically, is a viable solution for representing the communication medium. The colors declarations helps us to model complex data types and allows to model and control multiple simultaneous interactions among agents.

References [1] Cohen P.R., and H.J. Levesque, “Communicative actions for artificial agents”, Proceedings of the International Conference on Multi-Agent Systems, AAAI Press, San Francisco, June, 1995. [2] Cordero J.M., and M. Toro, “A Components Model based on Interaction-Nets”, ISAS/SCI 1999, Orlando, Florida, 1999. [3] Cost R.S., Y. Chen, T. Finin, Y. Labrou and Y. Peng, “Using Coloured Petri Nets for Conversation Modeling ”, IJCAI ´99, 1999.

[4] Decker K., “Environment centered analysis and design of coordination mechanisms”, PhD Thesis, University of Massachusetts Amherst, 1995. [5] El Fallah A., S. Haddad and H. Mazouzi, “Protocol Engineering for Multi-agent Interaction”, 9th European Workshop on Modelling Autonomous Agents in a MultiAgent World, MAAMAW´99, Springer, 1999. [6] Demazeau Y, J.L. Koning, and G. Françoise, “Formalization and pre- validation for interaction protocols on multi-agent systems”, Distributed AI and Multi-agent Systems, p- 298-302, 1998. [7] FIPA, Foundation for Intelligent Physical Agents, “Agent Communication Language Specification”, http://www.fipa.org, 2000. [8] Flores F., and T. Winograd, “Understanding computer and cognition, a new foundation for design”, Addison Wesley, 1986. [9] Flores F., “Introducción al Ciclo Básico de la Acción (“Loop”)”, Business Design Associates, Inc., 1996. [10] Haddadi A., “Towards a Pragmatic Theory of Interactions”, Morgan Kaufmann Publishers, San Francisco, 1998. [11] Huhns M., and M.P. Singh, “Readings in Agents”, Morgan Kaufmann Publishers, San Francisco, 1998. [12] Jensen K., “Coloured Petri Nets, Basic Concepts, Analysis Methods and Practical Use”, volume 1, 2, 3, second edition, Springer, Germany, 1997. [13] Lemaître C., and C. Excelente, “Multi-Agent Network for Cooperative Work”, Expert Systems With Applications: An International Journal, Elsevier Science Publishers, Vol. 14, pp. 117-127, 1999. [14] Lesser V., “Reflections on the nature of multi-agent coordination and its implications for the agent architecture”, Autonomous agents and multi-agent systems, Kluwer academic publishers, 1, 89-111, July 1998. [15] Liñán J.L., “Una contribución a los modelos de comunicación entre agentes cooperantes”. PhD Thesis. ITESM, Campus Cuernavaca, Mexico, 1998. [16] Papazoglou M., and G. Schlageter, “Cooperative Information Systems, Trends and Directions”, Academic Press, San Diego, 1998.

Suggest Documents