Viskit: Rapid Modeling of Event Graph Components - PowerPoint PPT Presentation

1 / 36
About This Presentation
Title:

Viskit: Rapid Modeling of Event Graph Components

Description:

XML Schema for Event Graph Representation. Viskit, Visual Tool for Event Graph ... SimEvent Source dispatches its SimEvent to registered SimEvent Listeners ... – PowerPoint PPT presentation

Number of Views:175
Avg rating:3.0/5.0
Slides: 37
Provided by: arnol6
Category:

less

Transcript and Presenter's Notes

Title: Viskit: Rapid Modeling of Event Graph Components


1
Viskit Rapid Modeling of Event Graph Components
  • Arnold Buss
  • MOVES Institute

2
Overview
  • Introduction
  • Event Graph Methodology
  • Simkit Java Implementation
  • XML Schema for Event Graph Representation
  • Viskit, Visual Tool for Event Graph Construction
  • XML Schema for DES Model Assemblies

3
Introduction
  • Barriers to use of simulation models
  • Simulation Big and Costly
  • Time to develop model
  • Lack of rigorous methodology
  • Lack of rapid-development tools

4
Introduction (cont)
  • Breaking the Barriers
  • Event Graph Methodology
  • Simkit Programming API
  • Viskit Graphical Tool
  • XML Schema for Component Representations

5
Event Graph Methodology
  • Pure Discrete Event Simulation (DES)
  • Four Elements to DES Model
  • Parameters
  • State Variables
  • Events (State Transition Functions)
  • Scheduling Relationships Between Events

6
Event Graph Methodology (cont)
7
Simple Event Graph
8
More Complicated Event Graph
9
Event Graph Components
  • Based on Listener Pattern
  • Loosely Coupled Simulation Components
  • Listener Event Graph Objects (LEGO)

10
SimEventListener Pattern
  • SimEvent Source dispatches its SimEvent to
    registered SimEvent Listeners
  • All SimEvents (except Run) are heard by
    Listener
  • Used for assembling models from components

11
Example Multiple Server Queue
12
Property Change Listener Pattern
  • PropertyChangeEvents fired at every state
    transition
  • Listener may register for specific or all
    PropertyChange Events
  • Used for statistics, graphing, etc.

13
Property Change Listener Example
14
Adapter Pattern
  • Used when event name change is desired in
    listener object
  • When Event A in source occurs, Event B in
    Listener is triggered

15
Adapter Representation
Is represented
16
Simkit
  • Java API for creating Event Graph models
  • Open Source
  • Effective for teaching DES
  • Used in more than 30 NPS Masters Theses
  • Implements Listener Event Graph Object pattern

17
Simkit
  • Based on solid Event Graph methodology
  • Enables reasonably rapid construction of DES
    models
  • NPS OR/MV students able to implement models in
    matter of a few months
  • Enabler for implementing new features in DES
    models

18
Recent NPS Theses using Simkit
  • REMUS vehicle for mine detection (Allen, 2004)
  • Repair and Sparing of Jet Engines (Schoch, 2003)
  • Operational Availability of MMA (Margolis, 2003)
  • Submarine Mine avoidance (Nawara, 2003)
  • Dynamic Allocation of Fires and Sensors (Havens,
    2002)

19
Simkit Relation to Event Graph
20
Sample Code Snippet
  • public class Server extends SimEntityBase
  • . . .
  • private RandomVariate serviceTime
  • protected int numberInQueue
  • protected int numberAvailableServers
  • public void doArrival()
  • numberInQueue numberInQueue 1
  • firePropertyChange("numberInQueue",
    numberInQueue 1, numberInQueue)
  • if (getNumberAvailableServers() gt 0)
  • waitDelay("StartService", 0.0)
  • public void doStartService()
  • numberInQueue numberInQueue 1
  • firePropertyChange("numberInQueue",
    numberInQueue 1, numberInQueue)
  • numberAvailableServers
    numberAvailableServers 1
  • firePropertyChange("numberAvailableServers
    ", numberAvailableServers 1,

21
Listener Patterns in Simkit
  • ArrivalProcess arrival new ArrivalProcess(. .
    .)
  • Server server new Server(. . .)
  • arrival.addSimEventListener(server)
  • PropertyChangeListener numInQueueStat
  • new SimpleStatsTimeVarying(numberInQueue)
  • server.addPropertyChangeListener(numInQueueStat)
  • PropertyChangeListener numAvailableServerStat
  • new SimpleStatsTimeVarying(numberAvailableServer
    s)
  • server.addPropertyChangeListener(
  • numAvailableServerStat, numberAvailableServers)

22
Viskit Motivation
  • Simkit requires Java programming
  • Need for non-programmer use
  • Need for rapid development tool
  • Organize reusable components
  • Repository of existing models and components for
    reuse

23
XML for Event Graph Components
  • Data-centric representation of Event Graph
    Components
  • XML is standard, open data format
  • Language and Implementation independent
  • Enabler for web services

24
Event Graph/XML Translation
25
Example XML Snippet
ltSimEntity name"SimpleServer" version"0.1"gt
ltParameter type"simkit.random.RandomVariate"
name"serviceTime"/gt ltParameter type"int"
name"totalNumberServers"/gt ltStateVariable
name"numberInQueue" type"int"/gt
ltStateVariable name"numberAvailableServers"
type"int"/gt ltEvent name"Run"gt
ltStateTransition state"numberInQueue"gt
ltAssignment value"0"/gt
lt/StateTransitiongt ltStateTransition
state"numberAvailableServers"gt
ltAssignment value"totalNumberServers"/gt
lt/StateTransitiongt lt/Eventgt . .
. lt/SimEntitygt
26
XML Snippet (cont)
ltEvent name"Arrival"gt ltStateTransition
state"numberInQueue"gt ltAssignment
value"numberInQueue 1"/gt
lt/StateTransitiongt ltSchedule
condition"numberAvailableServers gt 0"
priority"1.0" delay"0.0" event"StartService"/
gt lt/Eventgt ltEvent name"StartService"gt
ltStateTransition state"numberInQueue"gt
ltAssignment value"numberInQueue - 1"/gt
lt/StateTransitiongt ltStateTransition
state"numberAvailableServers"gt
ltAssignment value"numberAvailableServers - 1"/gt
lt/StateTransitiongt ltSchedule
delay"serviceTime.generate()"
event"EndService"/gt lt/Eventgt
27
Code Generator
  • Generates Simkit Java code from XML document
  • SimEntity XML document -gt SimEntityBase subclass
  • Assembly XML document -gt instances of SimEntities
    and Listeners

28
Viskit Event Graph Editor
  • Even more rapid development of Event Graph
    Components
  • Exposes Event Graph structure better than code
  • Modeler draws Event Graph and fills in
    information
  • Open Source

29
Viskit Event Graph Editor
Scheduling/Canceling Edge
Create New Event
Self-Scheduling Edge
State Variables
Drawing Canvas
Simulation Parameters
30
Server Component in Viskit
31
Viskit Assembly Editor
  • Assembly consists of
  • Instances of SimEntities and PropertyChangeListene
    rs
  • Listening connections

32
Viskit Assembly Editor
Event Graph Components
Listener Connection Toolbar
New Instance Wizard
Assembly Canvas
PropertyChangeListeners
Execution Controls
33
Example Viskit Assembly
34
Summary
  • Rapid DES modeling is possible
  • Event Graph Methodology robust
  • Simkit implementation mature, stable
  • Viskit application accelerates development time
  • Basic features and design of Viskit complete

35
Ongoing Work and Improvements
  • Improve user-friendliness of Viskit
  • Add Experimental Design and execution features
  • Execution on computer clusters
  • Documentation, Help and Tutorial
  • Incorporate features based on user feedback and
    testing

36
Questions
Write a Comment
User Comments (0)
About PowerShow.com