org.processmining.analysis.conformance
Class DiagnosticTransition

java.lang.Object
  extended by att.grappa.Element
      extended by att.grappa.Node
          extended by org.processmining.framework.models.ModelGraphVertex
              extended by org.processmining.framework.models.petrinet.PNNode
                  extended by org.processmining.framework.models.petrinet.Transition
                      extended by org.processmining.framework.models.petrinet.algorithms.logReplay.ReplayedTransition
                          extended by org.processmining.analysis.conformance.DiagnosticTransition
All Implemented Interfaces:
att.grappa.GrappaConstants, java.lang.Cloneable, LogEventProvider

public class DiagnosticTransition
extends ReplayedTransition

The diagnostic transition can be enhanced by diagnostic information to be stored during log replay and will be used to form a part of the diagnostic Petri net.

Author:
arozinat

Field Summary
 
Fields inherited from class org.processmining.framework.models.ModelGraphVertex
identifier, object2, value, visualObject
 
Fields inherited from class att.grappa.Node
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
DiagnosticTransition(Transition t, PetriNet net, java.util.ArrayList caseIDs)
          The constructor creates a normal transition but additionally initializes the diagnostic information for every process instance specified.
 
Method Summary
 void addAlwaysFollows(Transition trans)
          Record that this task was always followed by the given task in the log (but only sometimes in the model.
 void addAlwaysPrecedes(Transition trans)
          Record that this task was always preceded by the given task in the log (but only sometimes in the model.
 void addFailedInstances(int value)
          Adds the specified number of process instances to the counter of traces that failed execution for this transition.
 void addNeverFollows(Transition trans)
          Record that this task was never followed by the given task in the log (but sometimes in the model.
 void addNeverPrecedes(Transition trans)
          Record that this task was never preceded by the given task in the log (but sometimes in the model.
 void addNumberInstancesNeitherFailedNorRemaining(int similarInstances)
          Add the given number of process instances to the number of instances where this transition was neither remaining nor failed during log replay.
 void addRemainedInstances(int value)
          Adds the specified number of process instances to the counter of traces that remained enabled for this transition.
 java.util.Set<Transition> getAlwaysFollows()
          Retrieves the tasks that were always followed the given task in the log (but only sometimes in the model.
 java.util.Set<Transition> getAlwaysPrecedes()
          Retrieves the tasks that were always preceded the given task in the log (but only sometimes in the model.
 java.lang.String getDiagnosticToolTip(DiagnosticPetriNet net)
          Based on the current selection recorded at the DiagnosticPetriNet level, a tool tip containing information about the distribution of missing and remaining tokens with respect to the process instances.
 java.util.Set<Transition> getNeverFollows()
          Retrieves the tasks that were never followed the given task in the log (but sometimes in the model.
 java.util.Set<Transition> getNeverPrecedes()
          Retrieves the tasks that were never preceded the given task in the log (but sometimes in the model.
 int getNumberOfFirings()
          Determines the amount of firings for this transition.
 java.lang.String getOrdinaryToolTip()
          Only displays the name of the transition.
 boolean hasFailedExecution()
          Determine whether execution failed for this transition.
 boolean hasFired()
          Check whether the transition has fired at least once.
 boolean hasRemainedEnabled()
          Determine whether the transition remained enabled for this transition.
 boolean isAlternativeDuplicateTask()
          Gets the corresponding isAlternativeDuplicateTask status.
 boolean isRedundantInvisibleTask()
          Gets the corresponding isRedundantInvisibleTask status.
 void resetAlwaysAndNeverRelations()
          Resets the log relation element counter to 0, so that it can be filled with new values (based on the new log selection).
 void setAlternativeDuplicateTask()
          Sets the corresponding remainingEnabled entry to true.
 void setFailedExecution()
          Sets the corresponding failedExecution entry to true.
 void setRedundantInvisibleTask()
          Sets the corresponding failedExecution entry to true.
 void setRemainingEnabled()
          Sets the corresponding remainingEnabled entry to true.
protected  void takePostFiringMeasurement(ReplayedLogTrace diagnosticTrace)
          Will be called directly after this transition has been fired. Increments the number of firings for this transition.
protected  void takePreFiringMeasurement(ReplayedLogTrace diagnosticTrace, Measurer measurer)
          Will be called directly before this transition is fired. Counts the consumed and produced tokens and remembers the passed edges.
 
Methods inherited from class org.processmining.framework.models.petrinet.algorithms.logReplay.ReplayedTransition
fireQuick, fireSequenceOfTasks, getShortestSequenceOfInvisibleTasks, initDiagnosticDataStructures, isEnabled, takeActivityMeasurement, takeTimeBetweenMeasurement
 
Methods inherited from class org.processmining.framework.models.petrinet.Transition
clone, equals, fire, fire, fireQuick, fireQuick, getLogEvent, getModelElement, getNumber, hashCode, hasLogModelElement, isDuplicateTask, isEnabled, isEnabled, isInvisibleTask, isNegativeEnabled, setLogEvent, setModelElement, setNumber, toString, unFire, unFireQuick
 
Methods inherited from class org.processmining.framework.models.ModelGraphVertex
getIdentifier, getIncidentEdges, getInEdgesIterator, getNeighbors, getOutEdgesIterator, getPredecessors, getSuccessors, getValue, getVerticesOnlyPredecessor, getVerticesOnlySuccessor, getVerticesPredecessorAndSuccessor, setIdentifier, setValue
 
Methods inherited from class att.grappa.Node
addEdge, attributeType, edgeElements, findInEdgeByKey, findOutEdgeByKey, getCenterPoint, getInEdges, getOutEdges, getType, inDegree, inEdgeElements, isNode, outDegree, outEdgeElements, printNode, removeEdge
 
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, isOfInterest, isSubgraph, listAttrsOfInterest, printElement, removeTag, removeTags, setAttribute, setAttribute, setDefaultAttribute, setDefaultAttribute, setDefaultAttribute, setDefaultAttribute, setIdKey, setSubgraph, setUserAttributeType, typeString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DiagnosticTransition

public DiagnosticTransition(Transition t,
                            PetriNet net,
                            java.util.ArrayList caseIDs)

The constructor creates a normal transition but additionally initializes the diagnostic information for every process instance specified.

Note that the the copy constructor must be simulated on this level to assign the right Petri net to the new Transition, which eventually is required by Grappa.

Parameters:
t - The template transition for creating the object (to be passed to super class).
net - The Petri net it belongs to (to be passed to super class).
caseIDs - The list of process instances that want to be able to store results of the conformance analysis in this diagnostic transition.
Method Detail

takePreFiringMeasurement

protected void takePreFiringMeasurement(ReplayedLogTrace diagnosticTrace,
                                        Measurer measurer)
Will be called directly before this transition is fired. Does nothing per default (to be overridden in subclasses if necessary). Counts the consumed and produced tokens and remembers the passed edges.

Overrides:
takePreFiringMeasurement in class ReplayedTransition
Parameters:
diagnosticTrace - the case currently replayed
measurer - the measurer object in order to record diagnostic information

takePostFiringMeasurement

protected void takePostFiringMeasurement(ReplayedLogTrace diagnosticTrace)
Will be called directly after this transition has been fired. Does nothing per default (to be overridden in subclasses if necessary). Increments the number of firings for this transition.

Overrides:
takePostFiringMeasurement in class ReplayedTransition
Parameters:
diagnosticTrace - the case currently replayed

addFailedInstances

public void addFailedInstances(int value)
Adds the specified number of process instances to the counter of traces that failed execution for this transition.

Parameters:
value - corresponds to the number of similar process instances

addRemainedInstances

public void addRemainedInstances(int value)
Adds the specified number of process instances to the counter of traces that remained enabled for this transition.

Parameters:
value - corresponds to the number of similar process instances

addNumberInstancesNeitherFailedNorRemaining

public void addNumberInstancesNeitherFailedNorRemaining(int similarInstances)
Add the given number of process instances to the number of instances where this transition was neither remaining nor failed during log replay.

Parameters:
similarInstances - number of process instances for this trace

setFailedExecution

public void setFailedExecution()
Sets the corresponding failedExecution entry to true.


setRemainingEnabled

public void setRemainingEnabled()
Sets the corresponding remainingEnabled entry to true.


setRedundantInvisibleTask

public void setRedundantInvisibleTask()
Sets the corresponding failedExecution entry to true.


setAlternativeDuplicateTask

public void setAlternativeDuplicateTask()
Sets the corresponding remainingEnabled entry to true.


addAlwaysFollows

public void addAlwaysFollows(Transition trans)
Record that this task was always followed by the given task in the log (but only sometimes in the model.

Parameters:
trans - task that always followed this task

addNeverFollows

public void addNeverFollows(Transition trans)
Record that this task was never followed by the given task in the log (but sometimes in the model.

Parameters:
trans - task that never followed this task

addAlwaysPrecedes

public void addAlwaysPrecedes(Transition trans)
Record that this task was always preceded by the given task in the log (but only sometimes in the model.

Parameters:
trans - task that always preceded this task

addNeverPrecedes

public void addNeverPrecedes(Transition trans)
Record that this task was never preceded by the given task in the log (but sometimes in the model.

Parameters:
trans - task that never preceded this task

resetAlwaysAndNeverRelations

public void resetAlwaysAndNeverRelations()
Resets the log relation element counter to 0, so that it can be filled with new values (based on the new log selection).


getNumberOfFirings

public int getNumberOfFirings()
Determines the amount of firings for this transition.

Returns:
The amount of firings for this transition

hasFailedExecution

public boolean hasFailedExecution()
Determine whether execution failed for this transition.

Returns:
The failed execution status for this transition

hasRemainedEnabled

public boolean hasRemainedEnabled()
Determine whether the transition remained enabled for this transition.

Returns:
The failed execution status for for this transition

hasFired

public boolean hasFired()
Check whether the transition has fired at least once.

Returns:
True if has fired at least once, false otherwise

isRedundantInvisibleTask

public boolean isRedundantInvisibleTask()
Gets the corresponding isRedundantInvisibleTask status.


isAlternativeDuplicateTask

public boolean isAlternativeDuplicateTask()
Gets the corresponding isAlternativeDuplicateTask status.


getAlwaysFollows

public java.util.Set<Transition> getAlwaysFollows()
Retrieves the tasks that were always followed the given task in the log (but only sometimes in the model.

Returns:
all tasks that always followed this task

getNeverFollows

public java.util.Set<Transition> getNeverFollows()
Retrieves the tasks that were never followed the given task in the log (but sometimes in the model.

Returns:
all tasks that never followed this task

getAlwaysPrecedes

public java.util.Set<Transition> getAlwaysPrecedes()
Retrieves the tasks that were always preceded the given task in the log (but only sometimes in the model.

Returns:
all tasks that always preceded this task

getNeverPrecedes

public java.util.Set<Transition> getNeverPrecedes()
Retrieves the tasks that were never preceded the given task in the log (but sometimes in the model.

Returns:
all tasks that never preceded this task

getDiagnosticToolTip

public java.lang.String getDiagnosticToolTip(DiagnosticPetriNet net)
Based on the current selection recorded at the DiagnosticPetriNet level, a tool tip containing information about the distribution of missing and remaining tokens with respect to the process instances.

Returns:
The string to be displayed

getOrdinaryToolTip

public java.lang.String getOrdinaryToolTip()
Only displays the name of the transition.

Returns:
the name of the transition as html string