home.ufam.edu.br › hiramaral › 04_SIAPE_FINAL_2016... · Simulation Modelling Practice and...

13
Multi-Agent Modeling Toolkit – MAMT Umar Manzoor a,b,, Bassam Zafar b a School of Computing, National University of Computer and Emerging Sciences, Islamabad, Pakistan b Faculty of Computing and Information Technology, King Abdulaziz University, Jeddah, Saudi Arabia article info Article history: Received 30 April 2014 Received in revised form 31 August 2014 Accepted 18 September 2014 Available online 21 October 2014 Keywords: Agent modeling Multi-agent rapid development Agent reusability Built-in agent repository AUML to Jade Code abstract Multi-agent system consists of two or more agents which cooperate/coordinate with each other in order to solve a complex problem which would be difficult or inappropriate if solved by single agent. Multi-agents are modeled using Agent Unified Modeling Language (AUML) as Unified Modeling Language (UML) notations do not fully express agent proper- ties/behaviors. In this paper, we have proposed Multi-Agent Modeling Toolkit (MAMT) to help a designer in building rapid multi-agent based applications. The purpose of this toolkit is to create agent development environment where the developer can have various facili- ties like reusability of existing/developed agents, customize built-in agents, etc. MAMT provides the designer with built-in agents which are developed using Java Agent Develop- ment (JADE) framework, with the help of these designers can rapidly build multi-agent based applications. Creation and customization of built-in agents is based on the prototype inclusion design pattern and the designer can add or modify methods/behaviors according to their requirement(s); however the changes should be based on FIPA (Foundation of Intelligent Physical Agents) standards and compatible with JADE. MAMT has been evalu- ated on large number of sample applications; results were very promising and encourage the use of toolkit. Ó 2014 Elsevier B.V. All rights reserved. 1. Introduction An agent can be described as a computer program which acts autonomously in some environment on behalf of the user to fulfill its design objectives [4,41–43]; through different definitions have been proposed for different domains by researchers, however, single definition of agent has not been agreed upon by researchers around the world. Because of the unique fea- tures of Agent technology (i.e. flexibility, self recovering, fault tolerance, decentralized design, etc.), it has become potential choice for implementing real time distributed systems [5,6,44]. Agents can be categorized into different types based on dif- ferent behaviors/attributes (i.e. proactive, reactive, collaborative, mobile, adaptive, autonomous, interactive, etc.) exhibited by them [2]. Nwana in [3] have classified agents based on these attributes into seven types which are collaborative agents, interface agents, mobile agents, Information/Internet agents, Reactive agents, Hybrid agents and Smart/Intelligent Agents. The agents which cooperate/coordinate their actions with each other in order to fulfill a common goal are known as col- laborative agents. These agents focus more on cooperation and autonomy where as interface agents emphasis more on autonomy and learning [3]. Mobile Agent (also known as itinerant agent [11], transportable agent [12] or reloadable object [13]) has the capability of migrating from one computer to another over a network autonomously with its data intact and is http://dx.doi.org/10.1016/j.simpat.2014.09.005 1569-190X/Ó 2014 Elsevier B.V. All rights reserved. Corresponding author at: King Abdulaziz University, Jeddah, Saudi Arabia. E-mail addresses: [email protected] (U. Manzoor), [email protected] (B. Zafar). Simulation Modelling Practice and Theory 49 (2014) 215–227 Contents lists available at ScienceDirect Simulation Modelling Practice and Theory journal homepage: www.elsevier.com/locate/simpat

Transcript of home.ufam.edu.br › hiramaral › 04_SIAPE_FINAL_2016... · Simulation Modelling Practice and...

Page 1: home.ufam.edu.br › hiramaral › 04_SIAPE_FINAL_2016... · Simulation Modelling Practice and Theory - UFAMUML modeling diagrams can be classified into nine types which include

Simulation Modelling Practice and Theory 49 (2014) 215–227

Contents lists available at ScienceDirect

Simulation Modelling Practice and Theory

journal homepage: www.elsevier .com/ locate/s impat

Multi-Agent Modeling Toolkit – MAMT

http://dx.doi.org/10.1016/j.simpat.2014.09.0051569-190X/� 2014 Elsevier B.V. All rights reserved.

⇑ Corresponding author at: King Abdulaziz University, Jeddah, Saudi Arabia.E-mail addresses: [email protected] (U. Manzoor), [email protected] (B. Zafar).

Umar Manzoor a,b,⇑, Bassam Zafar b

a School of Computing, National University of Computer and Emerging Sciences, Islamabad, Pakistanb Faculty of Computing and Information Technology, King Abdulaziz University, Jeddah, Saudi Arabia

a r t i c l e i n f o

Article history:Received 30 April 2014Received in revised form 31 August 2014Accepted 18 September 2014Available online 21 October 2014

Keywords:Agent modelingMulti-agent rapid developmentAgent reusabilityBuilt-in agent repositoryAUML to Jade Code

a b s t r a c t

Multi-agent system consists of two or more agents which cooperate/coordinate with eachother in order to solve a complex problem which would be difficult or inappropriate ifsolved by single agent. Multi-agents are modeled using Agent Unified Modeling Language(AUML) as Unified Modeling Language (UML) notations do not fully express agent proper-ties/behaviors. In this paper, we have proposed Multi-Agent Modeling Toolkit (MAMT) tohelp a designer in building rapid multi-agent based applications. The purpose of this toolkitis to create agent development environment where the developer can have various facili-ties like reusability of existing/developed agents, customize built-in agents, etc. MAMTprovides the designer with built-in agents which are developed using Java Agent Develop-ment (JADE) framework, with the help of these designers can rapidly build multi-agentbased applications. Creation and customization of built-in agents is based on the prototypeinclusion design pattern and the designer can add or modify methods/behaviors accordingto their requirement(s); however the changes should be based on FIPA (Foundation ofIntelligent Physical Agents) standards and compatible with JADE. MAMT has been evalu-ated on large number of sample applications; results were very promising and encouragethe use of toolkit.

� 2014 Elsevier B.V. All rights reserved.

1. Introduction

An agent can be described as a computer program which acts autonomously in some environment on behalf of the user tofulfill its design objectives [4,41–43]; through different definitions have been proposed for different domains by researchers,however, single definition of agent has not been agreed upon by researchers around the world. Because of the unique fea-tures of Agent technology (i.e. flexibility, self recovering, fault tolerance, decentralized design, etc.), it has become potentialchoice for implementing real time distributed systems [5,6,44]. Agents can be categorized into different types based on dif-ferent behaviors/attributes (i.e. proactive, reactive, collaborative, mobile, adaptive, autonomous, interactive, etc.) exhibitedby them [2]. Nwana in [3] have classified agents based on these attributes into seven types which are collaborative agents,interface agents, mobile agents, Information/Internet agents, Reactive agents, Hybrid agents and Smart/Intelligent Agents.

The agents which cooperate/coordinate their actions with each other in order to fulfill a common goal are known as col-laborative agents. These agents focus more on cooperation and autonomy where as interface agents emphasis more onautonomy and learning [3]. Mobile Agent (also known as itinerant agent [11], transportable agent [12] or reloadable object[13]) has the capability of migrating from one computer to another over a network autonomously with its data intact and is

Page 2: home.ufam.edu.br › hiramaral › 04_SIAPE_FINAL_2016... · Simulation Modelling Practice and Theory - UFAMUML modeling diagrams can be classified into nine types which include

216 U. Manzoor, B. Zafar / Simulation Modelling Practice and Theory 49 (2014) 215–227

capable of resuming its task in the new environment [7,9]. Information or internet agent (also known as Web Crawler orSpider [8]) can be static or mobile and has the capability of collecting/managing the information (data) from large networkslike internet. These kinds of agents are usually deployed by search engines as they help collect/manage huge quantity ofinformation. Sometimes one type of agent functionality is not enough to accomplish an objective or task, in that case adesigner can combine two or more agents functionality (behavior/methods) into one agent, such an agent is called Hybridagent.

A system in which two or more agents cooperate/coordinate with each other in order to solve a complex problem such asystem is called multi-agent system (MAS). Agents within MAS can cooperate or compete with each other to achieve indi-vidual and/or collective goal(s) [14]. Because of the tremendous capabilities of multi-agent systems, these have been used inthe diverse areas such as e-commerce, manufacturing, decision support, network management, supply chain management,banking and finance, health care, intelligent systems, semantic web, web services, inventory management, transportation,radar data management, and water supply [17,18,26,24,21,25,23,28,20,27,22,16,15,19].

Multi-agents are modeled using Agent Unified Modeling Language (AUML) as Unified Modeling Language (UML) nota-tions are not enough to express agent properties/behaviors, etc. [29,30]. UML modeling diagrams can be classified into ninetypes which include class (package), object, use case, sequence, collaboration, state chart, activity, component, and deploy-ment. Although UML covers nine different forms of modeling diagrams, however, it still lacks to express agent goals, agentautonomy, multicasting, generative functions, etc. [1]. Researchers have proposed and modeled multi-agent systems usingapproaches other than AUML, however, these approaches are either domain specific or pre-mature (i.e. does not fully sup-port the properties of multi-agent). Furthermore, UML has gained wide acceptance for the object oriented design and mod-eling in researchers as well as in software industry where as agent oriented software engineering lack this aspect, therefore,Foundation of Intelligent Physical Agents (FIPA) and the Object Management Group (OMG) cooperated together to extendUML (AUML) to meet the requirements of multi-agent paradigm. The motivation behind this cooperated was to familiarizeindustrial software development with agent oriented software engineering life cycle. AUML is designed to model agents andtheir interactions and is similar to UML however, it is not restricted to use similar rules of UML.

A lot of work has also been done regarding object oriented modeling but in recent years researchers have focused more onagent modeling as OO model fails to model all features of agent paradigm. A number of toolkits developed to model UMLdiagrams have been extended to model AUML diagrams such as Visio, Dia, OpenTool, Poseidon, IBM Rational Rose, Meta Edit,XFig. ArgoUML, Together, MagicDraw, System Modeling WorkBench and Fujaba [10]. In order to improve agent modelingand interaction, researchers around the world have proposed many toolkits, however, these toolkits either use code or PetriNets to model agents and the output is AUML model. To the best of our knowledge there is no toolkit which

� Has agent repository.� Provides multi-agent based rapid application development.� Takes agents as input for agent modeling.� Provides designer the facility to edit agent code (i.e. add new or edit or delete existing behaviors).� Provides designer the facility to add new agents in the repository.� Represents design in AUML and also generate code.

In this paper, we have proposed Multi-Agent Modeling Toolkit (MAMT) to help designers in building rapid multi-agentbased applications. The purpose of this toolkit is to make life of a designer easier and to save his time by not reinventingan already developed agent. The tool provides designers an agent repository along with the designing interface for develop-ing AUML models. All designers have to do is drag-drop agents on the drawing area and built AUML models using AUMLnotations. The designer can also generate Java code of the AUML model by using the code generation function. They can alsoadd new agents in the agent repository or can edit/update existing agents according to their requirement. This will result incontinuous updation of agent repository. The updation will give advantage to other designers as they will get a variety ofagents to choose from. The proposed toolkit can be used to design/model/simulate network applications based on multi-agent systems, distributed applications based on multi-agent systems, mobile agent based applications, etc. The experimen-tal section contains detail evaluation of the proposed toolkit on network application based on multi-agent system andmobile agent based application.

The first section of the paper discusses the related work done in multi-agent modeling. This section is followed by thediscussion of the Multi-Agent Modeling Toolkit (MAMT) architecture which helps designers in modeling multi-agent basedapplications. In Section 4, MAMT evaluation on different test cases is presented. At the end conclusion is drawn and somequestions for future research are outlined.

2. Literature review

2.1. Background

A lot of work has been done on agent modeling in the last decade. There are two techniques through which UML can beextended into AUML, one by using UML concepts [36] and the other by using UML protocols based on UML 2.0 [37]. The first

Page 3: home.ufam.edu.br › hiramaral › 04_SIAPE_FINAL_2016... · Simulation Modelling Practice and Theory - UFAMUML modeling diagrams can be classified into nine types which include

U. Manzoor, B. Zafar / Simulation Modelling Practice and Theory 49 (2014) 215–227 217

technique uses existing UML concepts for the specification of agent interaction protocol(s), making it easy for UML users tounderstand [36]. The second technique is based on UML protocols; however the technique does not consider features such asthe agent autonomy and these features are usually required in multi-agent modeling [37].

Researchers in the last decade have used different concepts for modeling of multi-agent systems. Lawrence Cabac et al. in[35] proposed the use of Petri Nets for multi-agent modeling as it offers well defined operational semantics. Agent interac-tion protocol diagram is used to model agent conversation; however the semantics of the diagram are defined using Petrinets (i.e. a mapping from agent interaction protocol diagram expressions onto unified expressions of Petri net is required).Different toolkits for agent modeling have been proposed over the years such as ADELFE [40], AUML-2 [31], and PrometheusDesign Tool [32], Repast Simphony [33], and Swarm Toolkit [34].

2.2. Related work

ADELFE is based on Adaptive Multi-Agent System (AMAS) [39] theory and is normally used in situations having unpre-dictable environment or an open system. However, designers cannot implement global control of the system and cannot listall situations the system has to face. AUML-2 Tool uses different text commands such as agent name, start protocol name,finish, message from message description, box type, next, end type and backup for modeling and generates the model in .epsformat which can easily be converted to other formats such as .jpg or .tif. AUML-2 tool is under development phase, however,Prometheus Design Tool (PDT) has similar functionality making the former tool out of date [32].

PDT is a freely available tool, supports Prometheus (an agent-oriented software engineering) methodology and providesgraphical support for the modeling (i.e. allowing the designer to edit diagrams/descriptors for entities using GUI). It has thecapability to generate skeleton code of the model in the JACK agent-oriented programming language and maintains the syn-chronization between model and code (i.e. the changes in model will be reflected in the code accordingly) [32].

Repast Simphony is an open source agent-based modeling toolkit which simplifies multi-agent modeling by supportingJava point-and-click model execution environment (i.e. graphical tools). Swarm is another multi-agent software platform forthe simulation of complex adaptive systems. Swarm supports hierarchical modeling approach and provides object-orientedlibraries of reusable components for building models, analyzing, displaying, and controlling experiments on those models[34]. According to Nikolai ‘‘agent based modeling toolkits are as diverse as the community of people who use them’’, for moredetails related to agent simulation toolkits please see [46].

Study of the existing tools/methodologies showed that they still lack the following functionalities (1) Multi-agent RapidApplication Development (RAD) model. (2) Reusability of already developed agents. (3) AUML modeling with actual agents.(4) Built-in agent repository. (5) Modifying agent(s) behaviors. (6) Verifying modified behaviors. (7) Conversion of AUMLmodel into fully working JAVA code as shown Table 1. The proposed MAMT toolkit provides all the functionalities mentionedabove and is developed using Java Agent Development (JADE) framework [42]. The agents in Built-in agent repository of thetoolkit are based on FIPA standards and implemented using JADE framework. A designer can add new agents in the repos-itory; however, it should be based on FIPA standards and should be JADE compatible.

Agent interaction in MAMT is modeled through standard AUML notations and designers can use the built-in agents byusing the drag and drop functionality. Another interesting feature provided by our proposed toolkit is that it can convertthe AUML diagram developed by the user into fully working java code and a designer can also edit the java code accordingto his requirements. Designers can also modify the behaviors of the built-in agents according to their needs and can also addthe modified agent to our built-in repository.

3. System design

Multi agent applications are composed of numerous interacting intelligent agents used to analyze, design, and executereal time systems. These applications are mostly used where problems cannot be solved by a single or individual agent; suchsystems are loosely coupled networks of software agents that interact to solve composite and complex problems [38]. The

Table 1Comparison of AUML-2, ADELFE, SWARM and MAMT. Feature exists in the tool. Feature does not exist in the tool.

Features AUML-2 ADELFE SWARM MAMT

Agent repositoryAdd new agentsEdit/modify existing agents behaviors (i.e. edit code)Verify modified codeAgent interaction represented in AUMLModeling AUML using agentsConverting AUML into JAVACode ensures agent interaction protocolInput (agents) Code Petri Nets Code AgentsOutput (agents) AUML AUML AUML AUML + Code

Page 4: home.ufam.edu.br › hiramaral › 04_SIAPE_FINAL_2016... · Simulation Modelling Practice and Theory - UFAMUML modeling diagrams can be classified into nine types which include

218 U. Manzoor, B. Zafar / Simulation Modelling Practice and Theory 49 (2014) 215–227

purpose of Multi-Agent Modeling Toolkit (MAMT) is to facilitate the designer in modeling/designing of multi-agent basedapplications; zero level diagram is shown in Fig. 1.

The MAMT Interface is divided into five panels; Main Panel, AUML panel, Behaviors panel, Agent panel and AUML Draw-ing panel as shown in Fig. 2 with label A, B, C, D and E respectively. Main panel (labeled A) contains the open project, newproject, image output, edit agent, save, view change and information display functions which designers can use to create/open/save/edit project, etc. Designers can also save the output of project AUML model as a bitmap or jpeg image using ImageOutput (labeled A.1) function which can later be used for analysis purpose. Designers can edit the functionality/behavior ofany agent using edit agent function (labeled A.2). Once editing is complete, the changes are complied/verified for errors. Ifthe changes are successfully compiled/verified, new functions/behaviors are added to the respective agent.

Designers can see the interaction or agent dependencies by switching the project view from AUML model to abstractmodel using the view change (labeled A.3) function. Information display (labeled A.4) function guides the designers through-out the modeling process by displaying hints/information about the tool. AUML Panel (labeled B) contains standard AUMLnotations where most commonly used notations are displayed on the top and the rest can be viewed by clicking the ‘‘more’’(labeled B.1) button. Lifeline (labeled B.2) is an AUML notation used to denote the life line of an agent in the boundary;designers can increase or decrease the life of an agent according to their requirement. Using Behavior (labeled B.3) functiondesigners can view the behavior exhibited by an agent; the behaviors are populated in the combo box (labeled C.1) and thedesigners can drag behavior to the drawing area and use it to model interaction between agents.

Agent panel (labeled D) displays all the agents in the repository, designers can add new agents in the repository using theBrowse (labeled D.1) function. Five agents per page are displayed in the panel and designer can maneuver between pages byusing next (labeled D.2) and previous (labeled D.3) buttons. Drawing Panel (Labeled E) is AUML drawing area where design-ers can drag and drop agents/behaviors, etc. and create an AUML model. The drawing area helps the designer in creating/editing the AUML model using the tools/options from different panels.

MAMT is implemented in Java Agent Development (JADE) framework [42] and uses JADE communication mechanism foragent communication. MAMT provides the designers with built-in agents which are developed using JADE, with the help ofthese agents designers can rapidly build multi-agent based applications. A designer can modify, amend or add methods/behaviors to the built-in agents according to his requirement(s); however, the changes should be based on FIPA (Foundationof Intelligent Physical Agents) standards and compatible with JADE. Once the designer completes the design/model; he cansee the real time agent communication by executing the same. Multi-Agent applications are usually based on the followingfour agent architectures. (1) Logic based architecture: decision making is realized through logical deduction. (2) Reactivearchitecture: decision making is done from situation to action. (3) BDI (Belief, Desire, Intentions) [2]: decision makingdepends upon the manipulation of data structures (i.e. beliefs/desires). (4) Layered architecture: decision making is realizedwith the help of different layers.

The detailed architecture of MAMT is based on the Subsumption or Layered architecture as shown in Fig. 4, aim of thisarchitecture is to decompose the complicated intelligent behavior into several simple modules. In MAMT, every agent hasits specific responsibilities/functionalities and is organized in different layers as shown in Fig. 3. Higher layers are moreabstract from the lower layers and support bottom-up approach. MAMT system architecture consists of the following agents:

Fig. 1. Multi-Agent Modeling Toolkit (MAMT) abstract diagram.

Page 5: home.ufam.edu.br › hiramaral › 04_SIAPE_FINAL_2016... · Simulation Modelling Practice and Theory - UFAMUML modeling diagrams can be classified into nine types which include

Fig. 2. Multi-Agent Modeling Toolkit (MAMT) interface.

U. Manzoor, B. Zafar / Simulation Modelling Practice and Theory 49 (2014) 215–227 219

� GUI Agent.� Agent Handler.� Agent Verifier.� Agent Code Generator.

3.1. GUI Agent

GUI Agent is the main agent of the system; it initializes the system and interacts with the designer. In initialization GUIagent performs the following tasks:

� Load system configuration XML file which contains designers working path, agent repository path, and last five projectpaths. Initially designer working path is set to default however a designer can configure it. Sample Configuration XML fileis shown below.

Sample System Configuration XML File

<MAMT>

<Agent_Repository>

<A_Path>C:nMAMTnAgent_Repositoryn</A_Path></Agent_Repository>

<Designer>

<Working_Path>C:nMAMTnWorkingn</Working_Path><Pic_Path>C:nMAMTnWorkingnPicn</Pic_Path>

</Designer>

<Last_Projects>

<P1_Path>. . .</P1_Path>

<P2_Path>. . .</P2_Path>

<P3_Path>. . .</P3_Path>

<P4_Path>. . .</P4_Path>

<P5_Path>. . .</P5_Path>

</Last_Projects>

</MAMT>

Page 6: home.ufam.edu.br › hiramaral › 04_SIAPE_FINAL_2016... · Simulation Modelling Practice and Theory - UFAMUML modeling diagrams can be classified into nine types which include

Fig. 3. Zero level architecture of MAMT (Multi-Agent Modeling Toolkit) showing different agent’s functionalities and their responsibilities.

220 U. Manzoor, B. Zafar / Simulation Modelling Practice and Theory 49 (2014) 215–227

� GUI Agent is responsible for the creation and initialization of Agent Handler, Agent Verifier, and Agent Code Gener-ator. In initialization, GUI passes agent repository path as an argument to the Agent Handler.

� GUI Agent loads Agent Unified Modeling Language (AUML) notations in the AUML panel.

After system initialization, the responsibility of GUI agent is to interact with the designer, manage MAMT panels (i.e. dragand drop facility, drawing, interaction, etc.), and monitor other agents.

3.2. Agent Handler

After initialization Agent Handler performs the following tasks.

� Populates agent(s) in the Agent panel by extracting agent information from agent repository path.� Monitors which agents are used in the project by the designer and reports it to the GUI agent.� Helps designer in adding/modifying/deleting the behaviors/methods of built-in agents.

If the designer adds/modifies/deletes a method or behavior in any agent, agent handler passes the changes to the agentverifier for validation, if successful the changes are made else appropriate error message is shown to the designer. Designercan develop their own agents if existing (i.e. built-in) agents are not fulfilling their requirements and add them in the agentrepository, however, new agents should be implemented using JADE [42]. Agent handler passes the new agents (agent id,agent code path) one by one to the agent verifier for compatibility analysis and waits for the response. If agent verifierreturns true, the corresponding agent is added to the agent repository else compatibility error message is shown to the user.

3.3. Agent Verifier

The responsibility of agent verifier is

� To validate the changes (i.e. add/delete/modify methods or behaviors) made to the agent by a designer.� To validate the compatibility of new agent(s) added by a designer.

Page 7: home.ufam.edu.br › hiramaral › 04_SIAPE_FINAL_2016... · Simulation Modelling Practice and Theory - UFAMUML modeling diagrams can be classified into nine types which include

Fig. 4. Detailed architecture of Multi-Agent Modeling Toolkit.

U. Manzoor, B. Zafar / Simulation Modelling Practice and Theory 49 (2014) 215–227 221

After initialization Agent Verifier waits for the task from Agent handler, based on the task Agent Verifier validates thechanges or the compatibility and returns the result to the agent handler. In validation, agent verifier performs the followingtwo tasks:

� Verifies that code has no syntax error.� Verifies that code is compatible with JADE [42].

If any of the tasks in validation fails, agent verifier returns appropriate error to the agent handler which notifies thedesigner. If the validation is successful, agent verifier returns true to agent handler which notifies the designer and commitsthe changes.

3.4. Agent Code Generator

Agent Code Generator is responsible for converting Agent Unified Modeling Language model into the JAVA source code.After initialization, Agent code generator waits for a task from the GUI agent, on receiving the task it converts AUML modelinto code and saves it in the folder. The code generated by Agent code generator can be imported to any JAVA editor anddesigner can edit/modify the code according to his needs.

4. Test cases

Multi-Agent Modeling Toolkit (MAMT) has been evaluated using many scenarios; two scenarios are described in thissection. Scenario 1 shown in Fig. 5 shows the modeling and interaction of two agents; customer agent and merchant agent.Merchant agents’ purpose is to sell some item in good price (i.e. a price which that maximizes its profit) whereas customer

Page 8: home.ufam.edu.br › hiramaral › 04_SIAPE_FINAL_2016... · Simulation Modelling Practice and Theory - UFAMUML modeling diagrams can be classified into nine types which include

Fig. 5. AUML modeling of customer agent and merchant agent scenario.

222 U. Manzoor, B. Zafar / Simulation Modelling Practice and Theory 49 (2014) 215–227

agents’ purpose is to buy item in the most reasonable price. Each agent in the agent repository can have different methods/behaviors, designers can use the behaviors exhibited by an agent according to his requirement. Merchant/Customer agentswere developed and assigned methods/behaviors to achieve certain goals and usually all the methods/behaviors exhibitedare not utilized in one scenario, only the required/essential behaviors are used.

Merchant agents’ purpose is to sell product(s) and selling usually requires launching a product, providing customersdetails of the product, negotiating price, accepting details of transportation, and processing the order of a product. In sce-nario 1, the following behaviors of Merchant agent are used:

(1) Launch Product: The new product details are broadcast to all potential buyer agents in the domain.(2) Consider Price: Checks the price offered by a customer agent with the minimum price it can accept. If the price offered

is less than the minimum price, it will reply to the customer agent demanding an increase in the proposed price. Ifafter n proposals (n configurable), the proposed price is less than the minimum price merchant agent will terminatethe negotiation and send the deal decision to a buyer agent.

(3) Accept Price: If the price offered by a customer agent meets the minimum criteria, merchant agent terminates nego-tiation and calls the Deal method.

(4) Turndown Offer: If the negotiation between customer agents and the merchant agent is not successful (i.e. the priceoffered by the customer agents does not meet the minimum criteria for the product), merchant agent terminatesnegotiation and calls the Deal method.

(5) Deal: Sends the decision (accept or reject) to customer agent.(6) Accept Deal: This method is called when the agent accepts all the terms and conditions of the other agent which

includes the mode of payment as well.

Customer agents’ purpose is to buy product(s) and buying usually requires find the required product, negotiating price(maximum bargain/minimum price), accepting the terms and conditions of merchant, and proceed with payment (mode,details, etc.). In scenario 1, the following behaviors of Customer agent are used:

(1) Propose Price: Proposes a price for the product and waits for the merchants’ response. If the response is negative andthe proposed bid is less than the maximum bid it can offer, it revises the bid and sends the offer again until the mer-chant agrees to the proposed bid or the maximum bid limit is achieved.

Page 9: home.ufam.edu.br › hiramaral › 04_SIAPE_FINAL_2016... · Simulation Modelling Practice and Theory - UFAMUML modeling diagrams can be classified into nine types which include

U. Manzoor, B. Zafar / Simulation Modelling Practice and Theory 49 (2014) 215–227 223

(2) Propose Means of Payment: Proposes the means of payment (e.g. PayPal, credit card or debit card) once the negotia-tion for the product is complete (i.e. price settlement is done).

To model merchant-customer scenario, designers should draw the project boundary in the drawing panel using the AUMLboundary notation and then add both agents to the project by dragging the agents one by one to the drawing panel from theagent panel. To add an agent to the project, that agent has to be in the agent repository (i.e. agents are designed/developedprior and added to agent repository). Once agents are on the drawing area, a designer can add new behaviors or edit/deletethe existing behaviors according to his requirement. Designer has to set the lifeline of both the agents using the AUML life-line notation in order to show their involvement in the scenario.

After setting the lifeline, designer models the interaction between agents by placing behaviors at different positions (topto bottom) on the agents’ lifeline as shown in Fig. 5. As depicted in the scenario 1, the merchant launches the product (i.e.makes the product available for sale) by a broadcast message to all the customers in the domain. After receiving the productinformation, customer agent proposes a price to the merchant agent, which considers the price by invoking the Considerprice behavior. Both propose/consider price methods of customer/merchant agents respectively are put in a loop as bothagents are negotiating price. Customer agent starts from the minimum possible price and increases the price until the Mer-chant agent accepts the offer or the maximum buying limit of customer agent is reached. Alternative notation is used in mer-chant agent to either accept the price or turndown the offer and the decision is conveyed to the customer agent using thedeal method. Once the price has been negotiated and both agents have agreed, the customer agent proposes the Merchantagent a mode of payment by invoking Propose mode payment behavior. Once done the Merchant agent accepts the deal andthe interaction of both the agents ends.

Fig. 6 shows a scenario in which multi-agents interact with each other to accomplish installation of software on networknodes connected to a server [38]. The software installation setup has to be copied to all the network nodes to carry out theinstallation. The system consists of the following four agents;

(1) Server Agent: The server agent is responsible for creation/initializing and monitoring of all agents. Network adminis-trator can assign the task to server agent which executes the task with the help of other agents. Server agent has threemethods, InitFileTrans: requests file handler agent to initiate file transfer and passes it installation setup path and des-tination network nodes, InitInstall: requests installer agent to initiate the installation process and passes it installationsetup local path and destination network nodes, and InitTesting: requests verifier agent to initiate the verification pro-cess and passes it installation path and destination network nodes.

Fig. 6. AUML modeling of Smart Network Installer and Tester.

Page 10: home.ufam.edu.br › hiramaral › 04_SIAPE_FINAL_2016... · Simulation Modelling Practice and Theory - UFAMUML modeling diagrams can be classified into nine types which include

224 U. Manzoor, B. Zafar / Simulation Modelling Practice and Theory 49 (2014) 215–227

(2) File Handler Agent: The file handler agent is responsible for the transfer of software installation setup from source tothe destination network node(s). File handler agent has two methods, Send File: has the functionality to transfer theinstallation setup to the destination node(s) and Done Copying: reports transfer completion message with networknode Id to the server agent.

(3) Installer Agent: The installer agent is responsible for the installation of software on the destination network node(s).Installer agent has two methods, Install: has the functionality to run the installation setup and performs the installa-tion autonomously on the destination node(s) and Done: reports installation completion message with network nodeId to the server agent.

(4) Tester Agent: The tester agent is responsible for the verification of software installation on the destination networknode(s). Tester agent has two methods, Test: has the functionality to verify the software installation by invokingthe installed software silently on the destination node(s) and Done: reports success/failure message with networknode Id to the server agent.

The scenario starts when the Server agent gets a request from network administrator to install some software on the net-work. The request contains the path of software installation setup and the network nodes where the installation has to beperformed. Server agent sends file transfer request (installation setup path and destination network nodes) to file handleragent and waits for the response. File handler agent starts copying the installer file to destination nodes one by one andsends status update to the server agent. Once the transfer is complete, server agent sends software installation request(installation setup local path and destination network nodes) to installer agent and wait for the response. Once the instal-lation is complete, server agent sends verification request (installed software path and destination network nodes) to verifieragent and wait for the response.

Fig. 7 shows the activity chart of Smart Network Installer and Tester scenario modeled and simulated using Multi-AgentModeling Toolkit with reference to one network containing 20 workstations. Server agent initialization takes 2.56 s, in ini-tialization SA creates and initializes five File handler agents (i.e. one mobile agent is responsible to transfer setup file to fourworkstations) and the agent count increases to 6. WinRaR installation setup is used in this experiment, the transfer andinstallation time per node is 6.23 and 5.12 s respectively. FHA initialization takes 1.87 s, and after initialization five FHAin parallel transfers the setup file to the assigned network nodes. After the delay of 10.66 s from the start, SA creates fiveinstaller agents and initializes each with four network nodes (i.e. each IA is responsible to install the setup file on assignedfour network nodes) and the agent count increases to 10. After the delay of 15.78 s from the start, SA creates five testeragents and initializes each with four network nodes (i.e. each TA is responsible to verify the installation on assigned fournetwork nodes) and the agent count increases to 15. Fig. 8 shows the agent population of Smart Network Installer and Testerwith respect to two installations performed one after another. WinRaR installation setup is used in the first part whereasWinZip is used for the second; the transfer and installation file for the later is 5.89 and 4.9 s respectively.

Fig. 9 shows the AUML scenario of A fault tolerance infrastructure for mobile agents [45] where multi-agents interactwith each other to accomplish different types of financial transactions such as banking transaction. The system consistsof the following:

(1) Transaction Manager: The transaction manager agent is responsible to initialize/configure the whole system and inter-act with the user which can assign task to this agent at any time by login in the system. Transaction Manager has fourmethods, Config: initialize whole system by loading the configuration setting from pre-defined XML file and creates/initialize other agents of the system. StartTrans: requests observer agent to execute the transaction over the networkand waits for the response. Acknowledge: sends acknowledgment message to the sender agent and UpdateRecord:requests statistical agent to update the record by sending the transaction details and waits for the response.

Fig. 7. Simulation of Smart Network Installer and Tester: Activity chart.

Page 11: home.ufam.edu.br › hiramaral › 04_SIAPE_FINAL_2016... · Simulation Modelling Practice and Theory - UFAMUML modeling diagrams can be classified into nine types which include

Fig. 8. Simulation of Smart Network Installer and Tester: Agent on network vs time.

Fig. 9. AUML modeling of A fault tolerance infrastructure for mobile agents.

U. Manzoor, B. Zafar / Simulation Modelling Practice and Theory 49 (2014) 215–227 225

(2) Observer Agent: This agent is responsible to execute the transaction efficiently and smartly over the network and incase of any errors/faults in execution; this action takes alternate option for transaction execution without notifyingthe user. Observer agent has three methods, ObservePath: requests ping agent to monitor the available paths andreturns the best possible path for the transaction execution, StartTransaction: requests transaction agent to executethe transaction over the network and waits for the response and StatusUpdate: sends the update about the transaction(i.e. completed/error message) to transaction manager.

(3) Ping Agent: This agent is responsible to verify the available paths for the transaction execution and returns the optimalpath for the transaction execution. Ping agent has one method, PathStatus: has the functionality to verify the availablepaths and returns the best possible path.

(4) Transaction Agent: This agent is responsible to execute the transaction on the path returned by ping agent and returnsthe status (i.e. transaction completed/error message) to observer agent. Transaction agent has one method, TransSta-tus: has the functionality to execute the transaction and return the result.

(5) Statistical Agent: This agent is responsible to execute the operations on the database such as updation and new recordinsertion.

Page 12: home.ufam.edu.br › hiramaral › 04_SIAPE_FINAL_2016... · Simulation Modelling Practice and Theory - UFAMUML modeling diagrams can be classified into nine types which include

226 U. Manzoor, B. Zafar / Simulation Modelling Practice and Theory 49 (2014) 215–227

5. Conclusion

Multi agent applications are composed of numerous interacting intelligent agents used to analyze, design, and executereal time systems. These systems are loosely coupled network of software agents that interact to solve composite and com-plex problems. In this paper, we have proposed Multi-Agent Modeling Toolkit (MAMT) to help designer in developing rapidmulti-agent based applications by providing built-in agent repository along with the designing interface for developingAUML model. The agents in Built-in agent repository of the toolkit are based on FIPA standards and implemented using JADEframework. The designer can add new agents in the repository; however, it should be based on FIPA standards and should beJADE compatible. The tool provides drag-drop facility; all the designer has to do is drag-drop agents on the drawing area andbuilt AUML model using AUML notations and after completing the model, designer can convert the AUML into working Javacode by a single click.

References

[1] Gerhard Weib, Agent orientation in software engineering, Knowl. Eng. Rev. 16 (2001) 349–373.[2] J.M. Bradshaw, An introduction to software agents, in: J.M. Bradshaw (Ed.), Software Agents, AAAI Press, Menlo Park, Calif., 1997, pp. 3–46.[3] H.S. Nwana, Software agents: an overview, Knowl. Eng. Rev. 11 (3) (1996) 205–244.[4] U. Manzoor, S. Nefti, Quiet: a methodology for autonomous software deployment using mobile agents, J. Network Comput. Appl. 33 (6) (2010) 696–

706.[5] Mauricio Paletta, Pilar Herrero, Simulating collaborative systems by means of awareness of interaction among intelligent agents, Simul. Model. Pract.

Theory 19 (1) (2011) 17–29.[6] Johan Holmgren, Paul Davidsson, Jan A. Persson, Linda Ramstedt, TAPAS: a multi-agent-based model for simulation of transport chains, Simul. Model.

Pract. Theory 23 (April) (2012) 1–18.[7] Carles Garrigues, Sergi Robles, Joan Borrell, Guillermo Navarro-Arribas, Promoting the development of secure mobile agent applications, J. Syst. Softw.

83 (6) (2010) 959–971.[8] Abbas Sarraf Shirazi, Timothy Davison, Sebastian von Mammen, Jörg Denzinger, Christian Jacob, Adaptive agent abstractions to speed up spatial agent-

based simulations, Simul. Model. Pract. Theory 40 (January) (2014) 144–160.[9] Yao-Tien Wang, A dynamic resource management in mobile agent by artificial neural network, J. Network Comput. Appl. http://dx.doi.org/10.1016/

j.jnca.2010.03.012.[10] Agent Unified Modeling Language Tools (2010). <http://www.auml.org/auml/tools/main.shtml> (accessed 08.06.10).[11] D. Chess, B. Grosof, C. Harrison, D. Levine, C. Parris, G. Tsudik, Itinerant agents for mobile computing, IEEE Pers. Commun. (1995) 34–49.[12] Daniela Rus, Robert Gray, David Kotz, Transportable information agents, J. Intell. Inf. Syst. 9 (3) (1997) 215–238.[13] Anthony D. Joseph, Alan F. de Lespinasse, Joshua A. Tauber, David K. Gifford, M. Frans Kaashoek, Rover: a toolkit for mobile information access, in:

Proceeding of Fifteenth Symposium on Operating Systems Principles, December 1995.[14] U. Manzoor, S. Nefti, An agent based system for activity monitoring on network – ABSAMN, Expert Syst. Appl. 36 (8) (2009) 10987–10994.[15] Ioannis N. Athanasiadis, Marios Milis, Pericles A. Mitkas, Silas C. Michaelides, A multi-agent system for meteorological radar data management and

decision support, Environ. Model. Softw. 24 (11) (2009) 1264–1273.[16] Flavien Balbo, Suzanne Pinson, Using intelligent agents for transportation regulation support system design, Transp. Res. Part C: Emerg. Technol. 18 (1)

(2010) 140–156.[17] B.K. Mohanty, K. Passi, Agent based e-commerce systems that react to buyers’ feedbacks – a fuzzy approach, Int. J. Approximate Reason. http://

dx.doi.org/10.1016/j.ijar.2010.07.002.[18] Qinglin Guo, Ming Zhang, A novel approach for multi-agent-based intelligent manufacturing system, Inf. Sci. 179 (18) (2009) 3079–3090.[19] Stefano Farolfi, Jean-Pierre Müller, Bruno Bonté, An iterative construction of multi-agent models to represent water supply and demand dynamics at

the catchment level, Environ. Model. Softw. 25 (10) (2010) 1130–1148.[20] Marco Luca Sbodio, David Martin, Claude Moulin, Discovering semantic web services using SPARQL and intelligent agents, Web Seman.: Sci., Services

Agents World Wide Web. http://dx.doi.org/10.1016/j.websem.2010.05.002.[21] Alexandra Brintrup, Behaviour adaptation in the multi-agent, multi-objective and multi-role supply chain, Comput. Ind. 61 (7) (2010) 636–645.[22] Chang Ouk Kim, Ick-Hyun Kwon, Choonjong Kwak, Multi-agent based distributed inventory control model, Expert Syst. Appl. 37 (7) (2010) 5186–5191.[23] David Isern, David Sánchez, Antonio Moreno, Agents applied in health care: a review, Int. J. Med. Informatics 79 (3) (2010) 145–166.[24] Jason J. Jung, Chung-Ming Ou, Ngoc Thanh Nguyen, Chong Gun Kim, Advances on agent-based network management, J. Network Comput. Appl. http://

dx.doi.org/10.1016/j.jnca.2010.07.009.[25] Shu-Heng Chen, Computationally intelligent agents in economics and finance, Inf. Sci. 177 (5) (2007) 1153–1168.[26] Toshiyuki Sueyoshi, Gopalakrishna R. Tadiparthi, An agent-based decision support system for wholesale electricity market, Decis. Support Syst. 44 (2)

(2008) 425–446.[27] Nicholas Gibbins, Stephen Harris, Nigel Shadbolt, Agent-based semantic web services, Web Seman.: Sci., Services Agents World Wide Web 1 (2) (2004)

141–154.[28] Qing-lin Guo, Ming Zhang, An agent-oriented approach to resolve scheduling optimization in intelligent manufacturing, Robot. Comput.-Integr. Manuf.

26 (1) (2010) 39–45.[29] M.J. Wooldridge, P. Ciancarini, Agent-oriented software engineering: the state of the art, in: P. Ciancarini, M.J. Wooldridge (Eds.), Agent-oriented

Software Engineering, Proceedings of the First International Workshop (AOSE-2000), Lecture Notes in Artificial Intelligence, vol. 1957, Springer-Verlag,2001, pp. 1–28.

[30] N.R. Jennings, M. Wooldridge, Agent-oriented software engineering, in: J. Bradshaw (Ed.), Handbook of Agent Technology, AAAI/MIT Press, 2002.[31] AUML-2 & Interaction Diagram Tool. <http://waitaki.otago.ac.nz/~michael/auml/> (accessed 01.08.13).[32] Lin Padgham, John Thangarajah, Michael Winikoff, AUML protocols and code generation in the Prometheus design tool, in: Proceedings of the 6th

International Joint Conference on Autonomous Agents and Multiagent Systems, Honolulu, Hawaii, May 14–18, 2007.[33] Repast Simphony. <http://repast.sourceforge.net/> (accessed 09.05.13).[34] Swarm Toolkit. <http://alumni.media.mit.edu/~nelson/research/swarm/> (accessed 10.05.13).[35] L. Cabac, D. Moldt, Formal semantics for AUML agent interaction protocol diagrams, in: J.J. Odell, P. Giorgini, J.P. Müller (Eds.), AOSE 2004. LNCS, vol.

3382, Springer, Heidelberg, 2005, pp. 47–61.[36] J. Lind, Specifying agent interaction protocols with standard UML, in: M.J. Wooldridge, G. WeiB, P. Ciancarini (Eds.), Agent-oriented Software

Engineering, Proceedings of the Second International Workshop (AOSE-2001), Lecture Notes in Artificial Intelligence, vol. 2222, Springer-Verlag, 2001.[37] James J. Odell, H. Van Dyke Parunak, Bernhard Bauer, Representing agent interaction protocols with agent UML, in: A. John (Ed.), Lecture Notes in

Artificial Intelligence, vol. 1957, Springer-Verlag, 2001, pp. 201–218.[38] U. Manzoor, S. Nefti, Autonomous agents: Smart Network Installer and Tester (SNIT), Expert Syst. Appl. 38 (1) (2011) 884–893.

Page 13: home.ufam.edu.br › hiramaral › 04_SIAPE_FINAL_2016... · Simulation Modelling Practice and Theory - UFAMUML modeling diagrams can be classified into nine types which include

U. Manzoor, B. Zafar / Simulation Modelling Practice and Theory 49 (2014) 215–227 227

[39] C. Bernon, M.-P. Gleizes, S. Peyruqueos, G. Picard, ADELFE: a methodology for adaptive multi-agent systems engineering, in: Third InternationalWorkshop Engineering Societies in the Agents World (ESAW-2002), Madrid, 2002.

[40] G. Picard, UML stereotypes definition and AUML notations for ADELFE methodology with OpenTool, in: First European Workshop on Multi-AgentSystems (EUMAS’03), Oxford, UK, 2003, pp. 1–7.

[41] U. Manzoor, S. Nefti, Y. Rezgui, Categorization of Malicious Behaviors using Cognitive Agents – CMBCA, Data Knowl. Eng. (2012), http://dx.doi.org/10.1016/j.datak.2012.06.006.

[42] JAVA Agent DEvelopment Framework (JADE). <http://jade.tilab.com/> (accessed 20.08.14).[43] U. Manzoor, S. Nefti, IDetect: content based monitoring for complex network using mobile agents, Appl. Soft Comput. 12 (5) (2012) 1607–1619.[44] Jun Liang, Long Chen, Xian-yi Cheng, Xian-bo Chen, Multi-agent and driving behavior based rear-end collision alarm modeling and simulating, Simul.

Model. Pract. Theory 18 (8) (2010) 1092–1103.[45] Massimo Cossentino, Giancarlo Fortino, Marie-Pierre Gleizes, Juan Pavón, Simulation-based design and evaluation of multi-agent systems, Simul.

Model. Pract. Theory 18 (10) (2010) 1425–1427.[46] Kiran Ijaz, Summiya, Umar Manzoor, Arshad Ali Shahid, A fault tolerance infrastructure for mobile agents, in: IEEE Intelligent Agents, Web

Technologies and Internet Commerce (IAWTIC 06), Sydney, Australia.