UN FRAMEWORK AD AGENTI

Download Report

Transcript UN FRAMEWORK AD AGENTI

WOA 2003
Una piattaforma per lo
sviluppo di applicazioni
multi-agente
Boccalatte - Gozzi - Grosso
10/09/2003
Agent Service
Agent Service
• Fornire un’infrastruttura software in grado di offrire
soluzioni efficienti ai comuni problemi che si riscontrano
nella programmazione di sistemi multi-agente
 Definizione del modello di agente e sua implementazione
 Realizzazione di una piattaforma ad agenti (Agent Service)
2
WOA 10-09-2003
Agent Service
MAS e Agenti software
• Problematiche della programmazione
orientata agli agenti
– Gestione della comunità di agenti
 Ambiente concorrente (schedulazione, sincronizzazione)
 Localizzazione e comunicazione
 Persistenza
3
WOA 10-09-2003
Agent Service
CLI e C#
• Common Language Infrastructure
– .Net, Rotor, Mono, portable.Net
• Standard ECMA
– Common Language Infrastructure - ECMA-335
– C# Language Specifications - ECMA-334
• Common Language Runtime
–
–
–
–
Threading system
Remoting
Autenticazione, Sicurezza, Integrità dei tipi
Application Domain
4
WOA 10-09-2003
Agent Service
Il progetto della piattaforma
Agent Service
• L’architettura della piattaforma
• Il modello di agente
• La schedulazione delle attività degli
agenti
• La libreria Agent Service
• I servizi di comunicazione
5
WOA 10-09-2003
Agent Service
L’architettura della piattaforma
Agent
Management
System
Agent
Message
Transport
Directory
Facilitator
System
 FIPA
6
WOA 10-09-2003
Agent Service
Il modello di agente
• Isolamento
– Autonomia degli agenti
• Comportamenti concorrenti
– L’agente è multi-comportamento
• Funzionalità
– Gestione dello stato degli agenti
– Capacità ad accedere ai servizi della piattaforma
– Interazioni con componenti esterni non ad agenti
(es.DBMS)
7
WOA 10-09-2003
Agent Service
Scheduling
• Application Domain
– Il CLR consente l'esecuzione di applicazioni
multiple all'interno di un singolo processo
– Forniscono in esecuzione barriere per
l'isolamento dei dati, dei tipi, dell'autenticazione
…
 Intra-process ma garantiscono isolamento
8
WOA 10-09-2003
Agent Service
Agent Service-Agente
• Knowledge
– Strutture dati condivise
– Accesso concorrente,
transazionale
– Deadlock avoidance
– Persistenza
• Behaviour
– Attività propria dell’agente
– Esecuzione concorrente
– Accesso controllato alle
Knowledge
– Accesso ai componenti di
servizio
9
WOA 10-09-2003
Agent Service
Agent Service-DOM
Agent





Agent - The real Agent class, managing
behaviors' activity, Knowledges, and the
access to the platform services
AgentTemplate - The base abstract class for
user defined software agents
AgentPersistent - The class containing agent
information which have to be persistent
AID - The class defining the agent identifier
AgentState - The class representing the agent
state
Behaviour



Behaviour - The base abstract class representing a behaviour
ConversationBehaviour - The behaviour class which deal with messaging
Scheduler - The class, one per agent, managing the behaviours’ life cycle
Knowledge



Knowledge - The base abstract class representing a knowledge
KnowledgeItem - The class representing a generic knowledge item composed by
ID, type, and instance value
KnowledgeManager - The class managing the knowledge and granting its
persistence and consistency
Platform
MTS
AMS



Platform - The class representing the
abstraction of the agent platform, providing
general services and logic container to agents
PlatformDescription - The class representing
the FIPA description of the agent platform
PlatformPersistent - The class containing
platform state and configuration information
which have to be persistent


AMS - The class providing the agent
management service
AgentDescription - Agent description for
white pages service
DF


DF - The class providing the agent
directory service
ServiceDescription, SearchConstraint Classes for the yellow pages service



MTS - The class providing the
message transport service
AgentMessage, MessageBody,
MessageEnvelope - Classes
involved in the agent message
definition
ConversationManager - The
class dealing with messages’
delivering in order of the
behavior that owns the
conversation
10
WOA 10-09-2003
Agent Service
Implementazione Agente
Knowledge
Behaviour
-itemList
AgentTemplate
+AddItem()
+Body()
-behaviourList
-knowledgeList
+Inizialize()
+Ending()
MyKnowledge
-knowledgeItem
MyAgent
+Constructor()
MyBehaviour
-knowledge
-attributes
+Body()
+Methods()
-know1
-behav1
-attributes
+Initialize()
+Ending()
+Methods()
11
WOA 10-09-2003
Agent Service
Processo di attivazione dell’agente
Platform Interface
Application Domain
Assembly
AgentService Platform
AgentTemplate
Agent Instance
Assembly
KnowldgeType1
KnowldgeType2
Behaviour
Types
Assembly
12
WOA 10-09-2003
Agent Service
Directory Facilitator
DF
Agent
Active Directory
• Registrazione, modifica
e cancellazione della
descrizione del servizio
• Ricerca
• Active Directory
– Platform
– Agent
Agents
Agent
Service
13
WOA 10-09-2003
Agent Service
Message Transport Service
MTS
Agent
Message
Delivery
Message
Queue
• Scambio di messaggi
• Filtri sui messaggi
• Messaggio
• Agente
?
– Coda di messaggi
– Conversation Manager
...
Agent1
Queue
Agent2
Queue
AgentN
Queue
14
WOA 10-09-2003
Agent Service
Sviluppi
•
•
•
•
Portabilità
FIPA ACL
Servizio Windows – Autenticazione Utente/Agente
Strumenti di amministrazione e sviluppo
– Integrazione con Servizi Web
– Tool grafico per generare protocolli di interazione (AUML)
– …
• Libreria di Agenti, Knowledge, Behaviour
15
WOA 10-09-2003