PowerPoint-Präsentation
Download
Report
Transcript PowerPoint-Präsentation
QPE
A Graphical Editor for Modeling
using Queueing Petri Nets
Christofer Dutz
Agenda
•
•
•
•
•
•
•
Motivation
XML Format
Approaches to Java GUI development
QPE Design & Architecture
Demo
Conclusion
Future Work
Motivation
•
•
•
•
•
Benefits of QPNs over ordinary PNs
Problems analyzing QPNs
How SimQPN solves these problems
HiQPN as editor and its disadvantages
QPE closing the gap
Motivation
Benefits of QPNs over ordinary PNs
Motivation
Problems analyzing QPNs
• State space explosion problems
• Analysis techniques not scalable
Motivation
SimQPN simulator
• Scales much better
• Allows simulation of far more complex nets
• Unfortunately no GUI
Motivation
HiQPN
• currently only GUI tool for QPNs
• Not portable (Solaris)
• Problematic integration with SimQPN
– C Java
• Screenshots
Motivation
HiQPN net editor
Motivation
HiQPN incidence function
editor
Motivation
QPE
•
•
•
•
•
Pure Java
Developed directly for QPN support
Available on all major platforms
Integrates perfectly with SimQPN
Screenshots
Motivation
QPE net editor
Motivation
QPE incidence function editor
XML Format
•
•
•
•
Why XML
Format extension vs. new definition
Demo
Schema definition
XML Format
Why XML?
• Portable
• Human readable
• Transformable
XML Format
Format extension vs. new definition
• PNML
– Filled with unnecessary features
– Unable to integrate global color definitions
• QPE format
– Lightweight
– Optimized for QPNs
• Conversion PNML QPE using XSL
XML Format
Format Demo
• ..\test-data\test2.xml
XML Format
Schema definition
• Schema
– Good tool support widely spread
– No support for type definition based on name
and attribute
• RelaxNG
– Easy format
– Able to define QPE format
XML Format
Schema Demo
• ..\qpn.rng
Approaches to Java GUI
development
• SWING & AWT
• Extending existing tools
– PIPE
• Graphic frameworks and libraries
– Touchgraph
– Eclipse & GEF
Approaches to Java GUI development
SWING & AWT
• AWT fast but little features
• SWING slow but many features
• Implement Framework for QPN
visualization by myself
• Reinventing the wheel is no solution
dropped
Approaches to Java GUI development
PIPE
•
•
•
•
High level code object oriented
Low level code procedural
Class names had nothing to do with their function
Hacking against my understanding of software
quality
• Reimplementation more time-consuming than
reimplementing from scratch using visualization
framework
dropped
Approaches to Java GUI development
PIPE based QPN editor
Approaches to Java GUI development
Touchgraph
• Library for visualizing net structures
• Amazing visualization
• Homogeneous elements
– No constraints
– No attribute types bound to certain node types
dropped because of GEF
Approaches to Java GUI development
Touchgraph application
Approaches to Java GUI development
Eclipse & GEF
• RCP (Rich Client Platform)
– Minimal Eclipse
– Usage of all Eclipse plug-ins
– Application generally usable as standalone
application or plug-in
• GEF = Graphical Editing Framework
– Visualization framework for building graphical
editors
QPE Design & Architecture
•
•
•
•
•
•
RCP Perspective
Problems
Main patterns
Model
Controller
View
QPE Design & Architecture
RCP Perspective
QPE Design & Architecture
Problems
• Change from 3.0 to 3.1
– Major changes in plug-in mechanism
– Samples and how-to's for 3.1 hard to find
– Google not yet indexed a lot of 3.1 content
• No Architecture Map
• How-to's mainly show samples without
explanation
QPE Design & Architecture
Main patterns
• MVC
– Model Model
– View Controller
• Observer
– PropertyChangeListener
• Reflection
– Parameters of type Object
– Implementing additional interface results in entirely
different behavior
QPE Design & Architecture
Model
•
•
•
•
XML (Dom4J and XPath for navigation)
Write access wrapped to enable event-listeners
General structure of read and write operations
Screenshots of sample actions
– Registering a new document
– Registering as event listener for an element
– Modify an element
QPE Design & Architecture
General structure
DocumentManager
XmlDocument
Controller
read access
Event notification
write access
EventWrapper
QPE Design & Architecture
Registering a new document
2. generate id and add as event-wrapper-id attribute
Net
Colors
Places
Transitions
DocumentManager
EventWrapper
3.
create EventWrapper
and store using id as key
Connections
Meta-Attributes
1. register document
4. fire document registerd
Color
Place
Contorller
Trnasition
Connection
Contoller
Meta-Attribute
Controller
QPE Design & Architecture
Registering as event listener
4. get event-wrapper-id
5. get event wrapper with id and register as listener for element
Net
2. get element
3. get document
Colors
Places
Transitions
Connections
Wants to listen to element
Color
Place
Contorller
DocumentManager
EventWrapper
Trnasition
Connection
Contoller
Meta-Attributes
1. Register request
Meta-Attribute
Controller
QPE Design & Architecture
Modify an element
5. get event wrapper with id
4. get event-wrapper-id
Net
Colors
Places
DocumentManager
EventWrapper
Transitions
Connections
7. fire element modified
Meta-Attributes
modify
6.
2. get element
3. get document
7. fire element modified
8. fire child modified
1.
Color
Place
Trnasition
Connection
tell
DocumentManager
to
Meta-Attribute modify element
Wants to modify
Contorller
Contoller
Controller
QPE Design & Architecture
Controller
• EditParts
– interacting with Platform
– Keeping model and view in sync
– Register as event listeners to platform and
model events
• Screenshot of EditPart structure
QPE Design & Architecture
EditPart stucture
Net
Incidence function
EditPart Structure
EditPart Structure
IncidenceFunction
EditPart
NetEditPart
children
children
children
PlaceTransition
EditPart
(base class)
PlaceEditPart
ModeEditPart
children
PlaceEditPart
TransitionEditPart
Sourceconnections
Target
Connections
Sourceconnections
Target
Connections
Connaction
EditPart
Sourceconnections
ColorRef
EditPart
Sourceconnections
Target
Connections
Target
Connections
NamedConnaction
EditPart
QPE Design & Architecture
View
• Figures = Visual components
• Problem
– Lists in Java only allow one reference to a
single Object
– How to distinguish between input and output
place?
• Solution: Wrapping in wrapper objects
• Screenshot of I.F. editor figures
Incidence function view structure
Place A
Color-ref
Dom Elements
Place B
Color-ref
Color-ref
Color-ref
Mode
Place A
Wrapper Elements
Place B
Editor
Place A
QPE Design & Architecture
Demo
• QPE
– Show everything
• SimQPN plug-in
– Show wizard
Conclusion
• Multiplatform QPN editor
• Integration of SimQPN simulator
• Together form QPME:
– Queueing Petri Net Modeling Environment
• Able to be widely spread
• Because of simulator performance will be
highly accepted by users
Future work
• Implementation of subnet editor
– QPN HQPN editor
• Final adjustments in simulator integration.
• Validation of simulator integration
• Implementation of custom problem view for
RuleEngine
• Branding to make executable binary
package for each supported platform
Fin