org.processmining.analysis.performance.sequence
Class Sequence

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

public class Sequence
extends java.lang.Object

Represents a sequence, i.e. the transfer of work between data-element instances within one process instance.

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

Constructor Summary
Sequence(java.util.Date beginDate, java.util.Date endDate, java.lang.String piName)
          Constructor to initialize the sequence
 
Method Summary
 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.
 void drawSequence(java.util.HashMap lifeLines, java.awt.Graphics2D g)
           
 java.util.ArrayList getArrowList()
          Returns the list of arrows of this sequence
 double[] getArrowPosition(int number)
          Returns the beginposition of arrow number 'number'
 java.util.Date getBeginDate()
          Returns the begin date of the sequence
 double getBeginPositionBlock(int num)
          Returns the begin position of data-element block number 'num' of the sequence
 java.awt.Color getColor()
          Returns the color of the sequence
 java.util.Date getEndDate()
          Returns the end date of the sequence
 double getEndY()
          returns the end position of the sequence
 java.lang.String getPiName()
          Returns the name of the process instance to which this sequence corresponds
 java.util.ArrayList getSortedDataEltBlocks()
          Returns the sorted list of data-element blocks
 java.util.ArrayList getSortedOnEndDataEltBlocks()
          Returns the list of data-element blocks, sorted on end time, begin time and finally on data-element name.
 double getStartY()
          Returns the starting position of the sequence
 double getThroughputTime()
          Returns the throughput time of the sequence
 long getTimePart(int num)
          Returns the time spend in data-element block number num of the sequence
 void initializeDrawSequence(double timePerPixel, java.util.Date firstDate)
          Initializes the data-element blocks of the sequence so they can easily be drawn
 void initializeSequence(java.util.ArrayList relationList, java.lang.String dataEltType, boolean strict)
          This method initializes the sequence, and sorts the arrows and data-element blocks in such a manner that it can be easily compared with other sequences
 void setColor(java.awt.Color thisColor)
          Sets color of the sequence
 void setStartY(double startY)
          Sets the start position of the sequence
 void sortArrowList()
          Sorts arrowList on source data-element name, destination data-element name begin time and end time (in that order)
 void sortArrowListStrict()
          Sorts arrowList on begin time, end time source data-element name, destination data-element name(in that order)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Sequence

public Sequence(java.util.Date beginDate,
                java.util.Date endDate,
                java.lang.String piName)
Constructor to initialize the sequence

Parameters:
beginDate - Date
endDate - Date
piName - String
Method Detail

initializeSequence

public void initializeSequence(java.util.ArrayList relationList,
                               java.lang.String dataEltType,
                               boolean strict)
This method initializes the sequence, and sorts the arrows and data-element blocks in such a manner that it can be easily compared with other sequences

Parameters:
relationList - ArrayList: contains relations (arraylist of 2 audit trail entries (ates) ) between ates where the first ate corresponds to an event that is a direct precessor of the event that corresponds to the second ate.
dataEltType - String : the data-element type that is used
strict - boolean : true if 'strict' patterns used, false if 'flexible'.

sortArrowList

public void sortArrowList()
Sorts arrowList on source data-element name, destination data-element name begin time and end time (in that order)


sortArrowListStrict

public void sortArrowListStrict()
Sorts arrowList on begin time, end time source data-element name, destination data-element name(in that order)


setColor

public void setColor(java.awt.Color thisColor)
Sets color of the sequence

Parameters:
thisColor - Color

getColor

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

Returns:
Color

getArrowList

public java.util.ArrayList getArrowList()
Returns the list of arrows of this sequence

Returns:
ArrayList

getSortedDataEltBlocks

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

Returns:
ArrayList

getSortedOnEndDataEltBlocks

public java.util.ArrayList getSortedOnEndDataEltBlocks()
Returns the list of data-element blocks, sorted on end time, begin time and finally on data-element name.

Returns:
ArrayList

getTimePart

public long getTimePart(int num)
Returns the time spend in data-element block number num of the sequence

Parameters:
num - int
Returns:
long

getBeginPositionBlock

public double getBeginPositionBlock(int num)
Returns the begin position of data-element block number 'num' of the sequence

Parameters:
num - int
Returns:
double

getArrowPosition

public double[] getArrowPosition(int number)
Returns the beginposition of arrow number 'number'

Parameters:
number - int
Returns:
double

getBeginDate

public java.util.Date getBeginDate()
Returns the begin date of the sequence

Returns:
Date

getEndDate

public java.util.Date getEndDate()
Returns the end date of the sequence

Returns:
Date

getPiName

public java.lang.String getPiName()
Returns the name of the process instance to which this sequence corresponds

Returns:
String

getThroughputTime

public double getThroughputTime()
Returns the throughput time of the sequence

Returns:
double

getStartY

public double getStartY()
Returns the starting position of the sequence

Returns:
double

getEndY

public double getEndY()
returns the end position of the sequence

Returns:
double

setStartY

public void setStartY(double startY)
Sets the start position of the sequence

Parameters:
startY - double

initializeDrawSequence

public void initializeDrawSequence(double timePerPixel,
                                   java.util.Date firstDate)
Initializes the data-element blocks of the sequence so they can easily be drawn

Parameters:
timePerPixel - double : time per pixel
firstDate - Date : the starting date of the first sequence in the sequence diagram

drawSequence

public void drawSequence(java.util.HashMap lifeLines,
                         java.awt.Graphics2D g)
Parameters:
lifeLines - HashMap
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