Explorer les Livres électroniques
Catégories
Explorer les Livres audio
Catégories
Explorer les Magazines
Catégories
Explorer les Documents
Catégories
Stéphane Airiau
Université Paris-Dauphine
Stéphane Airiau (Université Paris-Dauphine) - SMA partie I: Génie logiciel orienté agent 1
Plan
Stéphane Airiau (Université Paris-Dauphine) - SMA partie I: Génie logiciel orienté agent 2
Concevoir un système multiagent
Stéphane Airiau (Université Paris-Dauphine) - SMA partie I: Génie logiciel orienté agent 3
Génie Logiciel
Besoins
Analyse
Conception
Développement
Test
Maintenance
Ces étapes ne sont généralement pas suivies en cascade, mais
peuvent être répétées itérativement.
Stéphane Airiau (Université Paris-Dauphine) - SMA partie I: Génie logiciel orienté agent 4
Génie logiciel
Stéphane Airiau (Université Paris-Dauphine) - SMA partie I: Génie logiciel orienté agent 5
Une nouvelle méthodologie : pour quoi faire ?
Les SMA sont des logiciels, on peut donc utiliser des méthodes de
génie logiciel, en particulier orientées objets.
MAIS
un agent est autonome : il ne nécessite pas de contrôle
extérieur, il décide à tout moment de ses actions
un agent est proactif : il poursuit ses buts au cours du temps,
il doit être attentif aux changements de l’environnement pour
décider quels buts il peut/doit atteindre.
un agent est social et communique avec d’autres agents à
l’aide de messages.
On peut avoir une organisation sociale (rôle des agents et
obligations, normes, groupes)
un agent est réactif ë Il faut donc porter une importance
particulière aux percepts (forme perçue d’un stimulus externe)
sinon un agent risque de manquer une opportunité.
un agent est situé dans un environnement ë il faut prendre en
compte les actions que peut exercer l’agent.
Stéphane Airiau (Université Paris-Dauphine) - SMA partie I: Génie logiciel orienté agent 6
Les agents ne sont pas seulement des objets
Stéphane Airiau (Université Paris-Dauphine) - SMA partie I: Génie logiciel orienté agent 7
Quand utiliser une approche agent ?
Stéphane Airiau (Université Paris-Dauphine) - SMA partie I: Génie logiciel orienté agent 8
Historique du génie logiciel orienté agent
1995 DESIRE
1996 AAII, MAS-CommonKADS
1999 MaSE
2000 GAIA (v1), Tropos
2001 MESSAGE, Prometheus
2002 PASSI, INGENIAS
2003 GAIA (v2)
2005 ADEM
2007 O-MaSE
1– mileu à fin des années 90
descriptions brèves, pas d’outils, pas toujours un cycle
de vie entier
2– fin 90, début 2000
descriptions plus détaillées, quelques outils, commence à
couvrir le cycle de vie en entier
3– fin années 2000
orienté vers les développement à l’aide de modèles
(produire des modèles type UML), plus complexes
Stéphane Airiau (Université Paris-Dauphine) - SMA partie I: Génie logiciel orienté agent 9
En ce moment
Stéphane Airiau (Université Paris-Dauphine) - SMA partie I: Génie logiciel orienté agent 10
Exemple
Stéphane Airiau (Université Paris-Dauphine) - SMA partie I: Génie logiciel orienté agent 11
Exemple
C buffer
B buffer
A buffer
robot1
robot2 jig 1 jig 2 (loads &
(joins)
unloads)
rotating table
flipper
Stéphane Airiau (Université Paris-Dauphine) - SMA partie I: Génie logiciel orienté agent 12
Les étapes générales communes aux méthodologies
Stéphane Airiau (Université Paris-Dauphine) - SMA partie I: Génie logiciel orienté agent 13
Besoins
Stéphane Airiau (Université Paris-Dauphine) - SMA partie I: Génie logiciel orienté agent 14
Besoins
Stéphane Airiau (Université Paris-Dauphine) - SMA partie I: Génie logiciel orienté agent 15
Rôles
Groupement d’actions, percepts et buts qui concernent la
même fonctionalité.
ë un agent pourra être une combinaison de rôles.
pour l’exemple :
manager : responsible for overall management of the process.
It does not perform any action
pickAndPlacer : responsible for moving parts in and out of
the jig when located on the east side.
Associated actions : load, moveToFlipper, unload
fastener : responsible for joining the parts together
Associated actions : join
transporter : responsible for transporting items by rotating
the table.
Associated action : rotateTo
flipper : responsible for flipping the parts
Associated action : flip
Stéphane Airiau (Université Paris-Dauphine) - SMA partie I: Génie logiciel orienté agent 16
Buts
Stéphane Airiau (Université Paris-Dauphine) - SMA partie I: Génie logiciel orienté agent 17
Exemple
Key
Stéphane Airiau (Université Paris-Dauphine) - SMA partie I: Génie logiciel orienté agent 18
Scenarios
Stéphane Airiau (Université Paris-Dauphine) - SMA partie I: Génie logiciel orienté agent 19
Exemple
Scenario: manufacturePart(ABC)
Type Name Roles
G build2 manager, pickAndPlacer, fastener
G decideParts manager
G loadPart pickAndPlacer
A load(A) pickAndPlacer
G loadPart pickAndPlacer
A load(B) pickAndPlacer
G fastenParts fastener, transporter
A rotateTo(1,W) transporter
A join(1) fastener
G addPart manager, pickAndPlacer, fastener
G decideNext manager
G flipOver manager
A rotateTo(1,E) transporter
A moveToFlipper() pickAndPlacer
A flip() flipper
G loadPart pickAndPlacer
A load(C) pickAndPlacer [in parallel with flip]
A moveFromFlipper() pickAndPlacer
G fastenParts fastener, transporter
A rotateTo(1,W) transporter
A join(1) fastener
G complete manager
G assess manager
A rotateTo(1,E) transporter
A unload() pickAndPlacer
Stéphane Airiau (Université Paris-Dauphine) - SMA partie I: Génie logiciel orienté agent 20
Interface avec l’environnement
Stéphane Airiau (Université Paris-Dauphine) - SMA partie I: Génie logiciel orienté agent 21
Conception
Stéphane Airiau (Université Paris-Dauphine) - SMA partie I: Génie logiciel orienté agent 22
Conception
Stéphane Airiau (Université Paris-Dauphine) - SMA partie I: Génie logiciel orienté agent 23
Quels agents existent ?
Stéphane Airiau (Université Paris-Dauphine) - SMA partie I: Génie logiciel orienté agent 24
Exemple
Stéphane Airiau (Université Paris-Dauphine) - SMA partie I: Génie logiciel orienté agent 25
Structure de communication (messages, protocoles)
Stéphane Airiau (Université Paris-Dauphine) - SMA partie I: Génie logiciel orienté agent 26
Exemple : protocole pour fabriquer une pièce composite
ManufacturePart
Robot1 Robot2 Table FlipperRobot
ref Lock(R1,jigE)
<load>
<load>
unlock
ref Fasten
loop
ref AddPart
ref Fasten
ref Lock(R1,jigE)
<unload>
unlock
Stéphane Airiau (Université Paris-Dauphine) - SMA partie I: Génie logiciel orienté agent 27
Exemple : protocole pour joindre deux composants
Fasten
Robot1 Robot2 Table
fasten(jig)
ref Lock(R2,jigW)
<join(jig)>
fastened(jig) unlock
Stéphane Airiau (Université Paris-Dauphine) - SMA partie I: Génie logiciel orienté agent 28
Exemple : protocole pour ajouter un composant
AddPart
Robot1 Table FlipperRobot
ref Lock(R1,jigE)
<moveToFlipper>
par
opt
flipRequest
<flip>
flipped
<load>
<moveFromFlipper>
unlock
Stéphane Airiau (Université Paris-Dauphine) - SMA partie I: Génie logiciel orienté agent 29
Exemple : protocole pour « locker »
Lock(Jig)
Robot Table
lock-at(Jig, Pos)
alt
[table locked]
lockFailed
else
opt
<rotateTo(Jig,Pos)>
locked-at
Stéphane Airiau (Université Paris-Dauphine) - SMA partie I: Génie logiciel orienté agent 30
Finalisation
<unload>
agent
AddPart Lock
Fasten Protocol
Unlock
Message
Lock
Flipper Table Robot2
Robot
Stéphane Airiau (Université Paris-Dauphine) - SMA partie I: Génie logiciel orienté agent 31
Conception détaillée
Stéphane Airiau (Université Paris-Dauphine) - SMA partie I: Génie logiciel orienté agent 32
Conception détaillée
Stéphane Airiau (Université Paris-Dauphine) - SMA partie I: Génie logiciel orienté agent 33
Exemple : pour BDI agents, étape initiale, plan pour Robot 1
manufacture
>manufacture<
PartPlan Key:
event
add compl
build2
Part ete >percept<
<action>
complete plan
build2Plan addPartPlan
Plan
Stéphane Airiau (Université Paris-Dauphine) - SMA partie I: Génie logiciel orienté agent 34
Exemple : étape 2, plan pour Robot 1
manufacture
>manufacture<
PartPlan Key:
event
add compl
build2
Part ete >percept<
<action>
fasten(jig)
complete plan
build2Plan unlock addPartPlan
Plan
message
<load(X)>
decide
Parts
lock-at
decideParts
Plan
Stéphane Airiau (Université Paris-Dauphine) - SMA partie I: Génie logiciel orienté agent 35
Key
manufacture
>manufacture<
PartPlan Key:
event
add compl
build2
Part ete >percept<
<action>
fasten(jig)
complete plan
build2Plan unlock addPartPlan
Plan
message
<load(X)>
decide
Parts
lock-at
decideParts
Plan
Stéphane Airiau (Université Paris-Dauphine) - SMA partie I: Génie logiciel orienté agent 36
Exemple : étape 3, plan pour Robot 1
manufacture
>manufacture<
PartPlan
Key:
event
add compl
build2 >percept<
fasten(jig) Part ete
<action>
<load(X)>
<moveFromFlipper>
plan
build2Plan unlock addPartPlan
<moveToFlipper>
message
<unload>
decide complete
Parts Plan
decide flip
Next Over
decideParts
Plan
flipRequest
decideNext
flipOverPlan
Plan
flipped
lock-at
Stéphane Airiau (Université Paris-Dauphine) - SMA partie I: Génie logiciel orienté agent 37
Exemple : étape 4, plan pour Robot 1
manufacture
>manufacture<
PartPlan
fastened(jig) Key:
event
continue
add
build2 >percept<
fasten(jig) Part
<action>
<load(X)>
<moveFromFlipper>
plan
build2Plan unlock addPartPlan
<moveToFlipper>
message
<unload>
decide complete
Parts Plan
decide flip
Next Over
decideParts
Plan
flipRequest
decideNext
flipOverPlan
Plan
lockCapability
flipped
lock-at
(jig,pos)
Stéphane Airiau (Université Paris-Dauphine) - SMA partie I: Génie logiciel orienté agent 38
Finalisation
Stéphane Airiau (Université Paris-Dauphine) - SMA partie I: Génie logiciel orienté agent 39
Exemple : à l’aide d’automates finis
Notation de O-MaSE
receive(manufacture(part))
receive(lockFailed)
receive(locked-at)
Wait
/send(lock-at(Jig,Pos))
Assess
receive(fastened(jig))
moveToFlipper
Wait unload
load(A)
/send(flipRequest)
/send(fasten(jig))
/send(unlock)
load(C) Wait
load(B) receive(flipped)
moveFromFlipper
/send(unlock)
Stéphane Airiau (Université Paris-Dauphine) - SMA partie I: Génie logiciel orienté agent 40
Implémentation
Stéphane Airiau (Université Paris-Dauphine) - SMA partie I: Génie logiciel orienté agent 41
Tests
test cases
Certains outils dédiés (eCATpour Tropos, surtout pour véri-
fier envois et reception de messages)
Certains génèrent des « test cases » automatiquement
Stéphane Airiau (Université Paris-Dauphine) - SMA partie I: Génie logiciel orienté agent 42
Exemple avec Prometheus
Stéphane Airiau (Université Paris-Dauphine) - SMA partie I: Génie logiciel orienté agent 43
Prometheus Design Tool (PDT)
Outil de conception
Aide à la conception : trois phases reliées
Aide à la vérification : aide à la cohérence des modèles
Aide à l’implémentation : génère un squelette de code
(dans le language JACK)
ë
1– Utilisation de PDT pour concevoir et analyser le
système, génération du squelette du code
2– Utilisation de Eclipse pour l’implémentation à partir du
squelette du code
3– Utilisation de JACK pour compiler et exécuter le
système
Stéphane Airiau (Université Paris-Dauphine) - SMA partie I: Génie logiciel orienté agent 44
Specification
Key
Initial role
System
Scenarios
descriptors
cross-check
action
System Goals
percepts
derives
Dynamic
Interaction Shared Agent
Architectural
messages
diagrams data grouping
Design
Overview
Intermediate
Agent Capability artifact
Process
Overview Descriptors
Detailed
Design
Stéphane Airiau (Université Paris-Dauphine) - SMA partie I: Génie logiciel orienté agent 45
Prometheus Design Tool (PDT)
Stéphane Airiau (Université Paris-Dauphine) - SMA partie I: Génie logiciel orienté agent 46
Conclusion
Stéphane Airiau (Université Paris-Dauphine) - SMA partie I: Génie logiciel orienté agent 47