org.processmining.analysis.performance.sequence
Class Pattern

java.lang.Object
  extended by org.processmining.analysis.performance.sequence.Pattern

public class Pattern
extends java.lang.Object

Class needed to store and use pattern information

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

Constructor Summary
Pattern(Sequence sq)
          Constructor to initialize pattern
 
Method Summary
 void addSequence(Sequence sq)
          Adds sequence sq to the sequenceList, which contains all sequences that follow this pattern
 void calculateTimes()
          Calculates throughput times
 boolean compareToSequence(Sequence sq, boolean isStrict)
          Compares the sequence to the pattern, returns true if they match
 void drawPattern(java.util.HashMap lifeLines, int startY, java.awt.Graphics2D g)
          Draws the pattern in the pattern diagram
 void drawRectangle(double startX, double startY, double length, boolean logicSteps, java.awt.Graphics2D g)
          Draws a rectangle of width 20, height length and starting point (startX,startY) in the northwest corner of the rectangle.
 java.util.ArrayList getArrowList()
          Returns the sorted arrows of this pattern
 double[] getArrowPosition(int number)
          Returns the average time between the beginning of a sequence of this pattern and the Timestamp at which arrow number 'number' began and ended
 double getAvgTimeToBegin(int number)
          Returns the average time between the beginning of a sequence of this pattern and the Timestamp at which data-element part with number 'number' starts
 java.awt.Color getColor()
          Returns the color of the pattern
 int getFrequency()
          Returns the number of sequences that follow this pattern
 double getMaxThroughputTime()
          Returns maximum throughput time
 double getMeanThroughputTime()
          Returns mean throughput time
 double getMinThroughputTime()
          Returns minimum throughput time
 int getPatternNumber()
          Returns the number of the pattern
 java.util.HashSet getPiNames()
          Returns the set of (names of) process instances, which follow this pattern
 java.util.ArrayList getSortedDataElementBlocks()
          Returns the sorted list of data-element blocks
 double getStdevThroughputTime()
          Returns standard deviation in throughput time
 double getTimePart(int number)
          Returns the average time spend in data-element part with number 'number'
 void initializeDrawPattern(int patternNumber, int startY, double timePerPixel)
           
 void setPatternNumber(int patternNumber)
          Sets the number of the pattern
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Pattern

public Pattern(Sequence sq)
Constructor to initialize pattern

Parameters:
sq - Sequence
Method Detail

compareToSequence

public boolean compareToSequence(Sequence sq,
                                 boolean isStrict)
Compares the sequence to the pattern, returns true if they match

Parameters:
sq - Sequence
isStrict - boolean
Returns:
boolean

calculateTimes

public void calculateTimes()
Calculates throughput times


addSequence

public void addSequence(Sequence sq)
Adds sequence sq to the sequenceList, which contains all sequences that follow this pattern

Parameters:
sq - Sequence

getFrequency

public int getFrequency()
Returns the number of sequences that follow this pattern

Returns:
int

getTimePart

public double getTimePart(int number)
Returns the average time spend in data-element part with number 'number'

Parameters:
number - int
Returns:
double

getAvgTimeToBegin

public double getAvgTimeToBegin(int number)
Returns the average time between the beginning of a sequence of this pattern and the Timestamp at which data-element part with number 'number' starts

Parameters:
number - int
Returns:
double

getArrowPosition

public double[] getArrowPosition(int number)
Returns the average time between the beginning of a sequence of this pattern and the Timestamp at which arrow number 'number' began and ended

Parameters:
number - int
Returns:
double

getSortedDataElementBlocks

public java.util.ArrayList getSortedDataElementBlocks()
Returns the sorted list of data-element blocks

Returns:
ArrayList

getArrowList

public java.util.ArrayList getArrowList()
Returns the sorted arrows of this pattern

Returns:
ArrayList

getColor

public java.awt.Color getColor()
Returns the color of the pattern

Returns:
Color

getPatternNumber

public int getPatternNumber()
Returns the number of the pattern

Returns:
int

setPatternNumber

public void setPatternNumber(int patternNumber)
Sets the number of the pattern

Parameters:
patternNumber - int

getPiNames

public java.util.HashSet getPiNames()
Returns the set of (names of) process instances, which follow this pattern

Returns:
HashSet

getMeanThroughputTime

public double getMeanThroughputTime()
Returns mean throughput time

Returns:
double

getMinThroughputTime

public double getMinThroughputTime()
Returns minimum throughput time

Returns:
double

getMaxThroughputTime

public double getMaxThroughputTime()
Returns maximum throughput time

Returns:
double

getStdevThroughputTime

public double getStdevThroughputTime()
Returns standard deviation in throughput time

Returns:
double

initializeDrawPattern

public void initializeDrawPattern(int patternNumber,
                                  int startY,
                                  double timePerPixel)
Parameters:
patternNumber - int
startY - int
timePerPixel - double

drawPattern

public void drawPattern(java.util.HashMap lifeLines,
                        int startY,
                        java.awt.Graphics2D g)
Draws the pattern in the pattern diagram

Parameters:
lifeLines - HashMap
startY - int
g - Graphics2D

drawRectangle

public void drawRectangle(double startX,
                          double startY,
                          double length,
                          boolean logicSteps,
                          java.awt.Graphics2D g)
Draws a rectangle of width 20, height length and starting point (startX,startY) in the northwest corner of the rectangle. In case logicSteps is true, the height is 10.

Parameters:
startX - double
startY - double
length - double
logicSteps - boolean
g - Graphics2D