department of telecommunications 20051aose tfg, al3 modeling agent mobility with uml sequence...

14
2005 Department of Telecommunications 1 AOSE TFG, AL3 Modeling Agent Mobility with UML Sequence Diagram Mario Kusek, Gordan Jezic Department of Telecommunications Faculty of Electrical Engineering and Computing University of Zagreb, CROATIA Agent-Oriented Software Engineering TFG, AL3 February 28 th – March 2 nd , 2005, Ljubljana, Slovenia

Upload: grace-gibbs

Post on 16-Jan-2016

215 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Department of Telecommunications 20051AOSE TFG, AL3 Modeling Agent Mobility with UML Sequence Diagram Mario Kusek, Gordan Jezic Department of Telecommunications

2005

Department of Telecommunications

1AOSE TFG, AL3

Modeling Agent Mobility with UML Sequence Diagram

Mario Kusek, Gordan JezicDepartment of Telecommunications

Faculty of Electrical Engineering and ComputingUniversity of Zagreb, CROATIA

Agent-Oriented Software Engineering TFG, AL3February 28th – March 2nd, 2005, Ljubljana, Slovenia

Page 2: Department of Telecommunications 20051AOSE TFG, AL3 Modeling Agent Mobility with UML Sequence Diagram Mario Kusek, Gordan Jezic Department of Telecommunications

2005AOSE TFG, AL3 2 of 14

Department of Telecommunications

Outline

Motivation

Related work

Proposed diagrams

Case study

Conclusions

Page 3: Department of Telecommunications 20051AOSE TFG, AL3 Modeling Agent Mobility with UML Sequence Diagram Mario Kusek, Gordan Jezic Department of Telecommunications

2005AOSE TFG, AL3 3 of 14

Department of Telecommunications

Motivation

Existing diagrams Weak representation of agent moving and

execution path Does not represent mobility in Sequence Diagram

Proposition for modeling Agent creation, Mobility path, and Current location

Page 4: Department of Telecommunications 20051AOSE TFG, AL3 Modeling Agent Mobility with UML Sequence Diagram Mario Kusek, Gordan Jezic Department of Telecommunications

2005AOSE TFG, AL3 4 of 14

Department of Telecommunications

AUML – Deployment and Activity Diagram

Captures why and where agents move

Activity nodes model plan Transitions model events Mobility is indicated as a note

“when: condition” on the transition that leads to the end point

Deployment diagram model combined with activity gives overall picture

Specific cases must be extracted from diagrams

Locate information

Obtain information

(Starts execution in visiting NodeInstance)

(Leaves NodeInstance)

{When: obtain information plan is complete}

Page 5: Department of Telecommunications 20051AOSE TFG, AL3 Modeling Agent Mobility with UML Sequence Diagram Mario Kusek, Gordan Jezic Department of Telecommunications

2005AOSE TFG, AL3 5 of 14

Department of Telecommunications

Extending Activity Diagrams to Model Mobile Systems

Introduced concepts of location, mobile object, mobile location, move action and clone action

Locate information

<<mobile>> <<mobile>>

<<become>>

Two notations of mobility in Activity Diagrams responsibility centered

who is performing an action location centered

where an action is performed, and how activities change this relation

Page 6: Department of Telecommunications 20051AOSE TFG, AL3 Modeling Agent Mobility with UML Sequence Diagram Mario Kusek, Gordan Jezic Department of Telecommunications

2005AOSE TFG, AL3 6 of 14

Department of Telecommunications

Modelling Mobile Agent Applications in UML 2.0 Activity Diagrams

Stereotype <<Host>> in swimlane represents location

Agent moving from location “host1” to “host2” is represented by using “Go”

Agent communication and cloning can be represented by subactivities

<<Host>> host1 <<Host>> host2

<<

agen

t>>

Age

nt1

Go Do Task

Page 7: Department of Telecommunications 20051AOSE TFG, AL3 Modeling Agent Mobility with UML Sequence Diagram Mario Kusek, Gordan Jezic Department of Telecommunications

2005AOSE TFG, AL3 7 of 14

Department of Telecommunications

Agent Modeling Language (AML)

Defines metaclasses used to model structural and behavioural aspects of entity mobility

Dependency relationship with the stereotype <<move>> MobilityAction for modeling mobility action MoveAction for modeling removal of the entity from its

current hosting location

Host 1 Host 2 <<move>>

Page 8: Department of Telecommunications 20051AOSE TFG, AL3 Modeling Agent Mobility with UML Sequence Diagram Mario Kusek, Gordan Jezic Department of Telecommunications

2005AOSE TFG, AL3 8 of 14

Department of Telecommunications

<<agent>>a1

<<node>>n1

<<node>>n2

<<at>>

<<move>>

create agent

<<agent>>a2

new

Stereotyped Mobility Diagram

Similar to “Sequence Diagrams for Mobility “ In the case of large number of nodes, the diagram is

useless

Page 9: Department of Telecommunications 20051AOSE TFG, AL3 Modeling Agent Mobility with UML Sequence Diagram Mario Kusek, Gordan Jezic Department of Telecommunications

2005AOSE TFG, AL3 9 of 14

Department of Telecommunications

Swimlaned Mobility Diagram

Idea from “Modelling Mobile Agent Applications in UML 2.0 Activity Diagrams”

Clear representation of mobility

Needs less space than stereotyped diagram

In the case of large number of nodes it is also useless

<<agent>>a1

<<move>>

<<node>>n1

<<node>>n2

<<agent>>a1

<<agent>>a2

new

Page 10: Department of Telecommunications 20051AOSE TFG, AL3 Modeling Agent Mobility with UML Sequence Diagram Mario Kusek, Gordan Jezic Department of Telecommunications

2005AOSE TFG, AL3 10 of 14

Department of Telecommunications

State Representation Mobility Diagram

Good for large number of nodes Poorer representation of mobility Consumes more space in

vertical representation Candidate for implementing

mobility in Sniffer agent (in JADE)

<<agent>>a1

<<agent>>a2

new

at noden1

at noden2

at noden2

Page 11: Department of Telecommunications 20051AOSE TFG, AL3 Modeling Agent Mobility with UML Sequence Diagram Mario Kusek, Gordan Jezic Department of Telecommunications

2005AOSE TFG, AL3 11 of 14

Department of Telecommunications

Frame Fragment Mobility Diagram

Good for large number of nodes

Mobility is more clearer Occupied space is smaller In some cases it is not

possible to order agents in a way that one frame fragment can represent agents at the same node

node n2

node n1

<<agent>>a1

<<agent>>a2

new

Page 12: Department of Telecommunications 20051AOSE TFG, AL3 Modeling Agent Mobility with UML Sequence Diagram Mario Kusek, Gordan Jezic Department of Telecommunications

2005AOSE TFG, AL3 12 of 14

Department of Telecommunications

Case study: Simple price searcher

Price listCaffe 5€Juice 12€

Home

Searcher

Page 13: Department of Telecommunications 20051AOSE TFG, AL3 Modeling Agent Mobility with UML Sequence Diagram Mario Kusek, Gordan Jezic Department of Telecommunications

2005AOSE TFG, AL3 13 of 14

Department of Telecommunications

Stereotyped Mobility Diagram

<<host>>home

<<agent>>searcher

create agentnew

<<host>>host1

<<agent>>store1

<<host>>host2

<<agent>>store2

getrequest

<<move>>

get price list

price list

<<move>>

get price list

price list

<<move>>

showresults

Page 14: Department of Telecommunications 20051AOSE TFG, AL3 Modeling Agent Mobility with UML Sequence Diagram Mario Kusek, Gordan Jezic Department of Telecommunications

2005AOSE TFG, AL3 14 of 14

Department of Telecommunications

Conclusions

Four variants of modeling agent mobility based on UML Sequence Diagram notations are proposed

Stereotyped Mobility Diagram For small number of nodes Clear representation of agent execution and mobility path

Swimlaned Mobility Diagram For small number of nodes Needs less space than Stereotyped Mobility Diagram

State Representation Mobility Diagram Good for large number of nodes Representation of agent execution and mobility path not so clear

Frame Fragment Mobility Diagram Good for large number of nodes Needs less space than State Representation Mobility Diagram Not always possible to use it