Post on 02-May-2015
transcript
Documentazione assistita di ABMs(Agent-Based Models)
RelatoreProf. Vittorio ScaranoDott. Carmine Spagnuolo
CandidatoSimone Romano
Automatic ABMs documentation - Simone Romano
Struttura della presentazione
• Panoramica modelli di simulazione basati sugli agenti - MASON • ODD Protocol e MASON• Doxygen
• Può aiutarci?
• Soluzione proposta: Plugin per Eclipse• Caratteristiche
• Conclusioni
Automatic ABMs documentation - Simone Romano
Sistemi multi-agente
Branca relativamente nuova dell’informatica:• Primi studi: anni ‘80• Diffusione: circa metà anni ‘90
STRUTTURA• Agenti (entità autonoma)• Ambiente
Automatic ABMs documentation - Simone Romano
MASON“MASON is a fast discrete-event multiagent simulation library core in Java”
STRUTTURA• Agenti - Steppable• Ambiente – SimState
OBIETTIVO: Generazione assistita di documentazione di programmi MASON
Idea• Procedura guidata mirata alla generazione
documentazione
ODD Protocol1. Purpose2. Entities, State variables and scales3. Process overview and scheduling4. Design concepts5. Initialization6. Input7. Submodels
MASON1. Definito dall’utente2. Ambiente, Agenti, variabili3. Lista azioni eseguite in
• start() SimState• step() Steppable
4. Definito dall’utente5. Valore iniziale delle variabili6. Definito dall’utente7. Pseudo-codice delle azioni elencate in 3
Come si documenta un ABMs?
• Doxygen is the de facto standard tool for generating documentation from annotated C++ sources, but it also supports other popular programming languages such as C, Objective-C, C#, PHP, Java, Python, IDL (Corba, Microsoft, and UNO/OpenOffice flavors), Fortran, VHDL, Tcl, and to some extent D.
Automatic ABMs documentation - Simone Romano
Automatic ABMs documentation - Simone Romano
Ricreiamo ODD• Parsing del codice• Generazione automatica di informazioni
• Informazioni inserite dall’utente• Generazione commenti al codice
Plug-in – caratteristiche 1• Generazione pseudocodice• Fasi Process overview and scheduling, Submodels di ODD
• Selezione colore output• Separazione tra commenti autogenerati e commenti inseriti
dall’utente
Definito dall’utente
Generato dal plugin
Generato da Doxygen
• Pulizia del codice
Plug-in – caratteristiche 2
• Iterabilità• ODD object
• Output type• Doxygen• Pdf-Rtf (iText library)• Txt
Plug-in – caratteristiche 3
Flusso degli eventi
INTRO OUTPUTChoice
ODD serialized
object
• Purpose• Entities, state
variables and scales• Process overview
and scheduling• Design concepts• Initialization• Input
• Submodels
New ODD object
Doxygen
• Pdf• Rtf• txt
…
Screenshots - 1
Screenshots - 2
Screenshots - 3
Conclusioni
• OBIETTIVO INIZIALE• Documentare programmi di simulazione multi-agente scritti in Java con
libreria MASON
• PRODOTTO REALIZZATO• Supporta l’utente durante la fase di documentazione• Struttura la documentazione secondo uno standard noto (ODD)