org.processmining.analysis.performance
Class ExtendedPetriNet

java.lang.Object
  extended by att.grappa.Element
      extended by att.grappa.Subgraph
          extended by att.grappa.Graph
              extended by org.processmining.framework.models.ModelGraph
                  extended by org.processmining.framework.models.petrinet.PetriNet
                      extended by org.processmining.framework.models.petrinet.algorithms.logReplay.ReplayedPetriNet
                          extended by org.processmining.analysis.performance.ExtendedPetriNet
All Implemented Interfaces:
att.grappa.GrappaConstants, java.lang.Cloneable, java.util.Comparator, DotFileWriter

public class ExtendedPetriNet
extends ReplayedPetriNet

This class is used to enhance the Petri net model with performance results.

Author:
Peter T.G. Hornix (p.t.g.hornix@student.tue.nl)

Field Summary
 java.util.ArrayList currentlySelectedInstances
          The currentlySelectedInstances attribute is necessary because the writeToDot() method has a fixed interface, though the visualization should be able to take them into account.
 
Fields inherited from class org.processmining.framework.models.ModelGraph
DOESNTCROSS_REGION, ENTERS_REGION, EXITS_REGION, identifier, nodeMapping, vertices, visualObject
 
Fields inherited from class att.grappa.Graph
INDENT_STRING, REFCNTXT
 
Fields inherited from class att.grappa.Subgraph
currentSelection, defaultNamePrefix
 
Fields inherited from class att.grappa.Element
counter, highlight, linewidth, object, printAllAttributes, printDefaultAttributes, usePrintList, visible
 
Fields inherited from interface att.grappa.GrappaConstants
_NO_TYPE, ANONYMOUS_PREFIX, BBOX_ATTR, BBOX_HASH, BOX_SHAPE, BOX_TYPE, CLUSTERRANK_ATTR, COLOR_ATTR, COLOR_HASH, COLOR_TYPE, CUSTOM_ATTR, CUSTOM_HASH, CUSTOM_SHAPE, DELETION_MASK, DIAMOND_SHAPE, DIR_ATTR, DIR_HASH, DIR_TYPE, DISTORTION_ATTR, DISTORTION_HASH, DOUBLE_TYPE, DOUBLECIRCLE_SHAPE, DOUBLEOCTAGON_SHAPE, EDGE, EGG_SHAPE, FILLCOLOR_ATTR, FILLCOLOR_HASH, FONTCOLOR_ATTR, FONTCOLOR_HASH, FONTNAME_ATTR, FONTNAME_HASH, FONTSIZE_ATTR, FONTSIZE_HASH, FONTSTYLE_ATTR, FONTSTYLE_HASH, FONTSTYLE_TYPE, GRAPPA_BACKGROUND_COLOR_ATTR, GRAPPA_BACKGROUND_COLOR_HASH, GRAPPA_DELETION_STYLE_ATTR, GRAPPA_DELETION_STYLE_HASH, GRAPPA_FONTSIZE_ADJUSTMENT_ATTR, GRAPPA_FONTSIZE_ADJUSTMENT_HASH, GRAPPA_SELECTION_STYLE_ATTR, GRAPPA_SELECTION_STYLE_HASH, GRAPPA_SHAPE, HASHLIST_TYPE, HEIGHT_ATTR, HEIGHT_HASH, HEXAGON_SHAPE, HIGHLIGHT_MASK, HIGHLIGHT_OFF, HIGHLIGHT_ON, HIGHLIGHT_TOGGLE, HOUSE_SHAPE, IDENTXFRM, IMAGE_ATTR, IMAGE_HASH, INTEGER_TYPE, INVERTEDHOUSE_SHAPE, INVERTEDTRAPEZIUM_SHAPE, INVERTEDTRIANGLE_SHAPE, LABEL_ATTR, LABEL_HASH, LINE_SHAPE, LINE_TYPE, LOG10, LP_ATTR, LP_HASH, MARGIN_ATTR, MARGIN_HASH, MCIRCLE_SHAPE, MCLIMIT_ATTR, MCLIMIT_HASH, MDIAMOND_SHAPE, MINBOX_ATTR, MINBOX_HASH, MINLEN_ATTR, MINLEN_HASH, MINSIZE_ATTR, MINSIZE_HASH, MRECORD_SHAPE, MSQUARE_SHAPE, NBSP, NEW_LINE, NO_SHAPE, NODE, NODESEP_ATTR, NODESEP_HASH, OCTAGON_SHAPE, ORIENTATION_ATTR, ORIENTATION_HASH, OVAL_SHAPE, PACKAGE_PREFIX, PARALLELOGRAM_SHAPE, PATCH_ATTR, PATCH_HASH, PENTAGON_SHAPE, PERIPHERIES_ATTR, PERIPHERIES_HASH, PERIPHERY_GAP, PKG_LOWER, PKG_UPLOW, PKG_UPPER, PLAINTEXT_SHAPE, POINT_TYPE, PointsPerInch, POLYGON_SHAPE, POS_ATTR, POS_HASH, PRINTLIST_ATTR, PRINTLIST_HASH, RANKDIR_ATTR, RANKDIR_HASH, RANKSEP_ATTR, RANKSEP_HASH, RECORD_SHAPE, RECTS_ATTR, RECTS_HASH, ROTATION_ATTR, ROTATION_HASH, ROUNDEDBOX_SHAPE, SELECTION_MASK, SHAPE_ATTR, SHAPE_HASH, SHAPE_MASK, SHAPE_TYPE, SIDES_ATTR, SIDES_HASH, SIZE_ATTR, SIZE_HASH, SIZE_TYPE, SKEW_ATTR, SKEW_HASH, STRING_TYPE, STYLE_ATTR, STYLE_HASH, STYLE_TYPE, SUBGRAPH, SYSTEM, TAG_ATTR, TAG_HASH, TIP_ATTR, TIP_HASH, TRAPEZIUM_SHAPE, TRIANGLE_SHAPE, TRIPLEOCTAGON_SHAPE, TYPES_SHIFT, WEIGHT_ATTR, WEIGHT_HASH, WIDTH_ATTR, WIDTH_HASH
 
Constructor Summary
ExtendedPetriNet(ExtendedPetriNet copyTemplate)
          Copy Constructor mimics the clone method and will be called by sub classes when the visualization state has changed in PerformanceAnalysisResult.
ExtendedPetriNet(PetriNet net, java.util.ArrayList caseIDs)
          Constructs an ExtendedPetriNet out of an ordinary one.
 
Method Summary
protected  PNEdge makeEdge(PNEdge template, Place sourceNode, Transition targetNode, ReplayedPetriNet targetNet, java.util.ArrayList caseIDs)
          Reproduces an edge based on the given edge (Direction: Place -> Transition). Produces an ExtendedPNEdge.
protected  PNEdge makeEdge(PNEdge template, Transition sourceNode, Place targetNode, ReplayedPetriNet targetNet, java.util.ArrayList caseIDs)
          Reproduces an edge based on the given edge (Direction: Transition -> Place). Produces a ExtendedPNEdge.
protected  Place makePlace(Place template, ReplayedPetriNet targetNet, java.util.ArrayList caseIDs)
          Reproduces a place based on the given place. Produces an ExtendedPlace.
protected  Transition makeTransition(Transition template, ReplayedPetriNet targetNet, java.util.ArrayList caseIDs)
          Reproduces a transition based on the given transition. Produces an ExtendedTransition.
 void setAdvancedSettings(int[] settings)
          Sets advanced settings to settings
 void setBounds(java.util.ArrayList bnds)
          Sets bounds to bnds
 void setFailedInstances(java.util.HashSet failedInstances)
          Sets failed instances
 void setLevelColors(java.util.ArrayList cols)
          Sets levelColors to cols
 void setTimeDivider(long tim)
          Sets the timeSort to tim
protected  void writeEdgesToDot(java.io.Writer bw)
          This is the edge writing part of the writeToDot procedure.
protected  void writePlacesToDot(java.io.Writer bw)
          This is the place writing part of the writeToDot procedure (refer to it for further information), which gets affected if the tokenCounterOption evaluates to true.
protected  void writeTransitionsToDot(java.io.Writer bw)
          This is the transition writing part of the writeToDot procedure (refer to it for further information).
 
Methods inherited from class org.processmining.framework.models.petrinet.algorithms.logReplay.ReplayedPetriNet
hasEnabledInvisibleTasks
 
Methods inherited from class org.processmining.framework.models.petrinet.PetriNet
addAndLinkEdge, addAndLinkEdge, addAndLinkPlace, addAndLinkTransition, addCluster, addEdge, addEdge, addNet, addPlace, addPlace, addToken, addTransition, addTransition, clone, delPlace, delTransition, extractNet, findPlace, findPlace, findRandomTransition, findTransition, findTransition, findTransitions, finishDotWriting, getClusters, getIncidenceMatrix, getInputArcsTransitionsIncidenceMatrix, getInvisibleTasks, getNodes, getNumberOfInvisibleTasks, getNumberOfNonDuplicateTasks, getNumberOfVisibleTasks, getOutputArcsTransitionsIncidenceMatrix, getPlaces, getSink, getSource, getTransitions, getVisibleTasks, initDotWriting, isAcyclic, makeClusters, mergePlaces, numberOfNodes, numberOfPlaces, numberOfTransitions, removeVertex, Test, writeClustersToDot, writeToDot
 
Methods inherited from class org.processmining.framework.models.ModelGraph
addEdge, addEdge, addVertex, calculateAllNonCompRegions, calculateAllRegions, calculateMinimalRegions, calculateRegionsMaxSize, delEdge, getAllEdges, getEdgeObjects, getEdges, getEdgesBetween, getFirstEdge, getGrappaVisualization, getIdentifier, getNumberOfEdges, getPostRegions, getPreRegions, getShortestDistances, getVerticeList, getWeightedArcs, reduceTransitively, removeEdge, removeEdges, setIdentifier, setWeightedArcs
 
Methods inherited from class att.grappa.Graph
addPanel, attributeType, buildShapes, decrementIndent, dropcloth, getErrorWriter, getGlobalAttribute, getGlobalAttributeKeys, getGlobalAttributePairs, getGlobalAttributeSize, getGrappaAttribute, getGrappaAttributeKeys, getGrappaAttributeValue, getId, getIndent, getSynchronizePaint, getToolTipText, incrementIndent, isDirected, isEditable, isMenuable, isSelectable, isStrict, paintImmediately, printError, printError, printGraph, printGraph, removePanel, repaint, reset, reset, resync, setEditable, setErrorWriter, setGrappaAttribute, setMenuable, setSelectable, setSynchronizePaint, setToolTipText, validGrappaAttributeKey
 
Methods inherited from class att.grappa.Subgraph
addEdge, addNode, addSubgraph, addTypeTag, clearPatchWork, compare, computePatchWork, countOfElements, countOfLocalElements, createElement, edgeElements, elements, elements, equals, findEdgeByName, findNodeByName, findSubgraphByName, getBoundingBox, getEdgeAttribute, getEdgeAttributeKeys, getEdgeAttributePairs, getEdgeAttributeValue, getNodeAttribute, getNodeAttributeKeys, getNodeAttributePairs, getNodeAttributeValue, getShowEdgeLabels, getShowNodeLabels, getShowSubgraphLabels, getType, hasEmptySubgraphs, hasTypeTag, hasTypeTags, isCluster, isLR, isRoot, isSubgraph, nodeElements, patchWork, preparePatchWork, printSubgraph, removeEdge, removeEmptySubgraphs, removeNode, removeSubgraph, removeTypeTag, removeTypeTags, resetBoundingBox, setAttribute, setAttribute, setEdgeAttribute, setEdgeAttribute, setName, setNodeAttribute, setNodeAttribute, setShowEdgeLabels, setShowNodeLabels, setShowSubgraphLabels, subgraphElements, vectorOfElements
 
Methods inherited from class att.grappa.Element
addTag, attrNotOfInterest, attrOfInterest, bdfs, buildShape, canonString, canonValue, clearBBox, delete, getAttribute, getAttributePairs, getAttributeValue, getDefaultAttribute, getDefaultAttribute, getGraph, getGrappaNexus, getId, getIdKey, getLocalAttribute, getLocalAttributeKeys, getLocalAttributePairs, getName, getSubgraph, getThisAttribute, getThisAttributeValue, hasAttributeForKey, hasDefaultTag, hasDefaultTags, hasLocalTag, hasLocalTags, hasTag, hasTags, isEdge, isNode, isOfInterest, listAttrsOfInterest, printElement, removeTag, removeTags, setDefaultAttribute, setDefaultAttribute, setDefaultAttribute, setDefaultAttribute, setIdKey, setSubgraph, setUserAttributeType, toString, typeString
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

currentlySelectedInstances

public java.util.ArrayList currentlySelectedInstances
The currentlySelectedInstances attribute is necessary because the writeToDot() method has a fixed interface, though the visualization should be able to take them into account.

Constructor Detail

ExtendedPetriNet

public ExtendedPetriNet(PetriNet net,
                        java.util.ArrayList caseIDs)
Constructs an ExtendedPetriNet out of an ordinary one.

Parameters:
net - the Petri net that is re-established in the replayed net
caseIDs - a list of strings containing the IDs of those instances that want to store diagnostic information

ExtendedPetriNet

public ExtendedPetriNet(ExtendedPetriNet copyTemplate)
Copy Constructor mimics the clone method and will be called by sub classes when the visualization state has changed in PerformanceAnalysisResult. Note that a deep copy with respect to the Petri net elements is created, i.e., the places, transitions and edges will be different objects afterwards. Nevertheless, the list of selected instances and the associated extended log are reassigned and do not get cloned.

Parameters:
copyTemplate - The Petri net containing all the diagnostic information that should be preserved.
Method Detail

makeTransition

protected Transition makeTransition(Transition template,
                                    ReplayedPetriNet targetNet,
                                    java.util.ArrayList caseIDs)
Reproduces a transition based on the given transition.
Should be overridden by subclasses so that they can build up their own diagnostic data structures instead. Produces an ExtendedTransition.

Overrides:
makeTransition in class ReplayedPetriNet
Parameters:
template - the Transition serving as a template for the new Transition
targetNet - the ReplayedPetriNet to which the new transition belongs to
caseIDs - the list of trace IDs for initializing diagnostic data structures
Returns:
the reproduced Transition

makePlace

protected Place makePlace(Place template,
                          ReplayedPetriNet targetNet,
                          java.util.ArrayList caseIDs)
Reproduces a place based on the given place.
Should be overridden by subclasses so that they can build up their own diagnostic data structures instead. Produces an ExtendedPlace.

Overrides:
makePlace in class ReplayedPetriNet
Parameters:
template - the Place serving as a template for the new Place
targetNet - the ReplayedPetriNet to which the new place belongs to
caseIDs - the list of trace IDs for initializing diagnostic data structures
Returns:
the reproduced Place

makeEdge

protected PNEdge makeEdge(PNEdge template,
                          Place sourceNode,
                          Transition targetNode,
                          ReplayedPetriNet targetNet,
                          java.util.ArrayList caseIDs)
Reproduces an edge based on the given edge (Direction: Place -> Transition).
Should be overridden by subclasses so that they can build up their own diagnostic data structures instead. Produces an ExtendedPNEdge.

Overrides:
makeEdge in class ReplayedPetriNet
Parameters:
template - the PNEdge serving as a template for the new PNEdge
sourceNode - the Place being the source of the new edge
targetNode - the Transition being the target of the new edge
targetNet - the ReplayedPetriNet to which the new place belongs to
caseIDs - the list of trace IDs for initializing diagnostic data structures
Returns:
the reproduced PNEdge

makeEdge

protected PNEdge makeEdge(PNEdge template,
                          Transition sourceNode,
                          Place targetNode,
                          ReplayedPetriNet targetNet,
                          java.util.ArrayList caseIDs)
Reproduces an edge based on the given edge (Direction: Transition -> Place).
Should be overridden by subclasses so that they can build up their own diagnostic data structures instead. Produces a ExtendedPNEdge.

Overrides:
makeEdge in class ReplayedPetriNet
Parameters:
template - the PNEdge serving as a template for the new PNEdge
sourceNode - the Transition being the source of the new edge
targetNode - the Place being the target of the new edge
targetNet - the ReplayedPetriNet to which the new place belongs to
caseIDs - the list of trace IDs for initializing diagnostic data structures
Returns:
the reproduced PNEdge

writeTransitionsToDot

protected void writeTransitionsToDot(java.io.Writer bw)
                              throws java.io.IOException
This is the transition writing part of the writeToDot procedure (refer to it for further information).

Overrides:
writeTransitionsToDot in class PetriNet
Parameters:
bw - The writer used by the framework to create the temporary dot file.
Throws:
java.io.IOException - If writing to the writer fails.

writePlacesToDot

protected void writePlacesToDot(java.io.Writer bw)
                         throws java.io.IOException
This is the place writing part of the writeToDot procedure (refer to it for further information), which gets affected if the tokenCounterOption evaluates to true.

Overrides:
writePlacesToDot in class PetriNet
Parameters:
bw - The writer used by the framework to create the temporary dot file.
Throws:
java.io.IOException - If writing to the writer fails.

writeEdgesToDot

protected void writeEdgesToDot(java.io.Writer bw)
                        throws java.io.IOException
This is the edge writing part of the writeToDot procedure. This part of the visualization gets affected by the probabilities that are displayed at XOR-splits.

Overrides:
writeEdgesToDot in class PetriNet
Parameters:
bw - the writer used by the framework to create the temporary dot file
Throws:
java.io.IOException - if writing to the writer fails

setTimeDivider

public void setTimeDivider(long tim)
Sets the timeSort to tim

Parameters:
tim - String

setBounds

public void setBounds(java.util.ArrayList bnds)
Sets bounds to bnds

Parameters:
bnds - ArrayList

setLevelColors

public void setLevelColors(java.util.ArrayList cols)
Sets levelColors to cols

Parameters:
cols - ArrayList

setAdvancedSettings

public void setAdvancedSettings(int[] settings)
Sets advanced settings to settings

Parameters:
settings - int[]

setFailedInstances

public void setFailedInstances(java.util.HashSet failedInstances)
Sets failed instances

Parameters:
failedInstances - HashSet