qpe a graphical editor for modeling using queueing petri nets christofer dutz

42
QPE A Graphical Editor for Modeling using Queueing Petri Nets Christofer Dutz

Upload: alan-sanders

Post on 21-Jan-2016

217 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: QPE A Graphical Editor for Modeling using Queueing Petri Nets Christofer Dutz

QPE

A Graphical Editor for Modeling using Queueing Petri Nets

Christofer Dutz

Page 2: 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

Page 3: QPE A Graphical Editor for Modeling using Queueing Petri Nets Christofer Dutz

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

Page 4: QPE A Graphical Editor for Modeling using Queueing Petri Nets Christofer Dutz

Benefits of QPNs over ordinary PNs

Motivation

Page 5: QPE A Graphical Editor for Modeling using Queueing Petri Nets Christofer Dutz

Problems analyzing QPNs

• State space explosion problems

• Analysis techniques not scalable

Motivation

Page 6: QPE A Graphical Editor for Modeling using Queueing Petri Nets Christofer Dutz

SimQPN simulator

• Scales much better

• Allows simulation of far more complex nets

• Unfortunately no GUI

Motivation

Page 7: QPE A Graphical Editor for Modeling using Queueing Petri Nets Christofer Dutz

HiQPN

• currently only GUI tool for QPNs

• Not portable (Solaris)

• Problematic integration with SimQPN – C Java

• Screenshots

Motivation

Page 8: QPE A Graphical Editor for Modeling using Queueing Petri Nets Christofer Dutz

HiQPN net editor

Motivation

Page 9: QPE A Graphical Editor for Modeling using Queueing Petri Nets Christofer Dutz

HiQPN incidence functioneditor

Motivation

Page 10: QPE A Graphical Editor for Modeling using Queueing Petri Nets Christofer Dutz

QPE

• Pure Java

• Developed directly for QPN support

• Available on all major platforms

• Integrates perfectly with SimQPN

• Screenshots

Motivation

Page 11: QPE A Graphical Editor for Modeling using Queueing Petri Nets Christofer Dutz

QPE net editor

Motivation

Page 12: QPE A Graphical Editor for Modeling using Queueing Petri Nets Christofer Dutz

QPE incidence function editor

Motivation

Page 13: QPE A Graphical Editor for Modeling using Queueing Petri Nets Christofer Dutz

XML Format

• Why XML

• Format extension vs. new definition

• Demo

• Schema definition

Page 14: QPE A Graphical Editor for Modeling using Queueing Petri Nets Christofer Dutz

Why XML?

• Portable

• Human readable

• Transformable

XML Format

Page 15: QPE A Graphical Editor for Modeling using Queueing Petri Nets Christofer Dutz

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

Page 16: QPE A Graphical Editor for Modeling using Queueing Petri Nets Christofer Dutz

Format Demo

• ..\test-data\test2.xml

XML Format

Page 17: QPE A Graphical Editor for Modeling using Queueing Petri Nets Christofer Dutz

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

Page 18: QPE A Graphical Editor for Modeling using Queueing Petri Nets Christofer Dutz

Schema Demo

• ..\qpn.rng

XML Format

Page 19: QPE A Graphical Editor for Modeling using Queueing Petri Nets Christofer Dutz

Approaches to Java GUI development

• SWING & AWT

• Extending existing tools– PIPE

• Graphic frameworks and libraries– Touchgraph – Eclipse & GEF

Page 20: QPE A Graphical Editor for Modeling using Queueing Petri Nets Christofer Dutz

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

Page 21: QPE A Graphical Editor for Modeling using Queueing Petri Nets Christofer Dutz

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

Page 22: QPE A Graphical Editor for Modeling using Queueing Petri Nets Christofer Dutz

PIPE based QPN editor

Approaches to Java GUI development

Page 23: QPE A Graphical Editor for Modeling using Queueing Petri Nets Christofer Dutz

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

Page 24: QPE A Graphical Editor for Modeling using Queueing Petri Nets Christofer Dutz

Touchgraph application

Approaches to Java GUI development

Page 25: QPE A Graphical Editor for Modeling using Queueing Petri Nets Christofer Dutz

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

Approaches to Java GUI development

Page 26: QPE A Graphical Editor for Modeling using Queueing Petri Nets Christofer Dutz

QPE Design & Architecture

• RCP Perspective

• Problems

• Main patterns

• Model

• Controller

• View

Page 27: QPE A Graphical Editor for Modeling using Queueing Petri Nets Christofer Dutz

RCP Perspective

QPE Design & Architecture

Page 28: QPE A Graphical Editor for Modeling using Queueing Petri Nets Christofer Dutz

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

Page 29: QPE A Graphical Editor for Modeling using Queueing Petri Nets Christofer Dutz

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

Page 30: QPE A Graphical Editor for Modeling using Queueing Petri Nets Christofer Dutz

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

Page 31: QPE A Graphical Editor for Modeling using Queueing Petri Nets Christofer Dutz

General structure

Document-Manager

Controller

read

acc

ess

writ

e ac

cess

Eve

nt n

otifi

catio

n

EventWrapperXmlDocument

QPE Design & Architecture

Page 32: QPE A Graphical Editor for Modeling using Queueing Petri Nets Christofer Dutz

Registering a new document

Net

Colors Places Transitions Connections Meta-Attributes

Color Place Trnasition Connection Meta-Attribute

EventWrapper

ControllerContorller Contoller

Document-Manager

2. generate id and add as event-wrapper-id attribute

1. register document

4. fire document registerd

3. create EventWrapper and store using id as key

QPE Design & Architecture

Page 33: QPE A Graphical Editor for Modeling using Queueing Petri Nets Christofer Dutz

Registering as event listener

Net

Colors Places Transitions Connections Meta-Attributes

Color Place Trnasition Connection Meta-Attribute

EventWrapper

ControllerContorller Contoller

Document-Manager

Wants to listen to element 1. Register request

2. get element3. get document

4. get event-wrapper-id 5. get event wrapper with id and register as listener for element

QPE Design & Architecture

Page 34: QPE A Graphical Editor for Modeling using Queueing Petri Nets Christofer Dutz

Modify an element

Net

Colors Places Transitions Connections Meta-Attributes

Color Place Trnasition Connection Meta-Attribute

4. get event-wrapper-id

1. tell

DocumentManager to

modify element

EventWrapper

5. get event wrapper with id

ControllerContorller Contoller

7. fire element modified

7. fire element modified

Document-Manager

2. get element

Wants to modify

8. fire child modified

3. get document

6. modify

QPE Design & Architecture

Page 35: QPE A Graphical Editor for Modeling using Queueing Petri Nets Christofer Dutz

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

Page 36: QPE A Graphical Editor for Modeling using Queueing Petri Nets Christofer Dutz

EditPart stucture

NetEditPart

PlaceTransitionEditPart

(base class)

PlaceEditPart TransitionEditPart

children

ConnactionEditPart

TargetConnections

Source- connections

TargetConnections

Source- connections

IncidenceFunctionEditPart

PlaceEditPart ModeEditPart

ColorRefEditPart

children children

children

NamedConnactionEditPart

TargetConnections

Source- connections

TargetConnections

Source- connections

NetEditPart Structure

Incidence function

EditPart Structure

QPE Design & Architecture

Page 37: QPE A Graphical Editor for Modeling using Queueing Petri Nets Christofer Dutz

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

QPE Design & Architecture

Page 38: QPE A Graphical Editor for Modeling using Queueing Petri Nets Christofer Dutz

Incidence function view structure

Wrapper Elements

Color-ref

Place A

Color-ref Color-ref

Place B

Color-ref Mode

Place A

Place A

Place B

Dom Elements

Editor

Page 39: QPE A Graphical Editor for Modeling using Queueing Petri Nets Christofer Dutz

Demo

• QPE– Show everything

• SimQPN plug-in– Show wizard

QPE Design & Architecture

Page 40: QPE A Graphical Editor for Modeling using Queueing Petri Nets Christofer Dutz

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

Page 41: QPE A Graphical Editor for Modeling using Queueing Petri Nets Christofer Dutz

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

Page 42: QPE A Graphical Editor for Modeling using Queueing Petri Nets Christofer Dutz

Fin