org.processmining.analysis.performance
Class PerformanceLogReplayResult

java.lang.Object
  extended by org.processmining.framework.models.petrinet.algorithms.logReplay.AnalysisResult
      extended by org.processmining.framework.models.petrinet.algorithms.logReplay.LogReplayAnalysisResult
          extended by org.processmining.analysis.performance.PerformanceLogReplayResult

public class PerformanceLogReplayResult
extends LogReplayAnalysisResult

Contains all the performance results obtained during log replay analysis. Can be used to retrieve values for the performance metrics and to get extended visualizations.

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

Field Summary
 
Fields inherited from class org.processmining.framework.models.petrinet.algorithms.logReplay.LogReplayAnalysisResult
inputLogReader, inputPetriNet, performLogReplay, replayedLog, replayedPetriNet
 
Fields inherited from class org.processmining.framework.models.petrinet.algorithms.logReplay.AnalysisResult
myAnalysisOptions
 
Constructor Summary
PerformanceLogReplayResult(AnalysisConfiguration analysisOptions, PetriNet net, LogReader log, LogReplayAnalysisMethod method)
           
 
Method Summary
 void calculateMetrics(java.util.ArrayList piList, int fitOption)
          Calculates the average, min ad max throughput time out of the throughput times of all traces in piList.
 void exportToFile(java.util.ArrayList piList, java.io.File file, long divider, java.lang.String sort, int fitOption)
          Exports the throughput times of all process instances in piList to a comma-seperated text-file.
 double getArrivalRate()
          Calculates and returns the arrival rate of the traces in piList
 org.apache.commons.math.stat.descriptive.SummaryStatistics getArrivalStats()
          Returns the arrival Stats of the traces in piList
 double[] getAverageTimes(double fastestPercentage, double slowestPercentage)
          Calculates the average of the (fastestpercentage) fast traces, the (slowestPercentage) slow traces and the (100% - fastestPercentage - slowestPercentage) normal speed traces and returns these averages in an array, where [0]: avg fast throughput time [1]: avg slow throughput time [2]: avg middle throughput time
 double getMaxThroughputTime()
          Returns the maximal throughput time
 double getMeanThroughputTime()
          Returns the mean throughput time
 double getMinThroughputTime()
          Returns the minimal throughput time.
 int getProperFrequency()
          returns the number of cases that execute successfully and complete properly
 int[] getSizes(double fastestPercentage, double slowestPercentage)
          Returns an array containing the number of process instances that are considered to be fast, i.e.
 double getStdevThroughputTime()
          Calculates and returns the stdev in throughput time out of the throughput times in timeStats.
 ModelGraphPanel getVisualization(java.util.ArrayList selectedInstances)
          Creates a visualization of the performance analysis results.
protected  void initDiagnosticDataStructures()
          Initializes the diagnostic data structures needed to store the measurements taken during the log replay analysis.
 
Methods inherited from class org.processmining.framework.models.petrinet.algorithms.logReplay.LogReplayAnalysisResult
performLogReplay
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PerformanceLogReplayResult

public PerformanceLogReplayResult(AnalysisConfiguration analysisOptions,
                                  PetriNet net,
                                  LogReader log,
                                  LogReplayAnalysisMethod method)
Method Detail

initDiagnosticDataStructures

protected void initDiagnosticDataStructures()
Initializes the diagnostic data structures needed to store the measurements taken during the log replay analysis.

Overrides:
initDiagnosticDataStructures in class LogReplayAnalysisResult

calculateMetrics

public void calculateMetrics(java.util.ArrayList piList,
                             int fitOption)
                      throws java.lang.Exception
Calculates the average, min ad max throughput time out of the throughput times of all traces in piList. Next to this, the arrival rate is calculated. All metrics are based on the process instances in piList only

Parameters:
piList - ArrayList: the process instances used
fitOption - int: the fit option used (how to deal with non-conformance)
Throws:
java.lang.Exception

exportToFile

public void exportToFile(java.util.ArrayList piList,
                         java.io.File file,
                         long divider,
                         java.lang.String sort,
                         int fitOption)
                  throws java.io.IOException
Exports the throughput times of all process instances in piList to a comma-seperated text-file.

Parameters:
piList - ArrayList: the process instances used
file - File: the file to which the times are exported
divider - long: the time divider used
sort - String: the time sort used
fitOption - int: the fit option used (how to deal with non-conformance)
Throws:
java.io.IOException

getStdevThroughputTime

public double getStdevThroughputTime()
Calculates and returns the stdev in throughput time out of the throughput times in timeStats. (make sure calculateProcessMetrics() is called before this method).

Returns:
double

getAverageTimes

public double[] getAverageTimes(double fastestPercentage,
                                double slowestPercentage)
Calculates the average of the (fastestpercentage) fast traces, the (slowestPercentage) slow traces and the (100% - fastestPercentage - slowestPercentage) normal speed traces and returns these averages in an array, where [0]: avg fast throughput time [1]: avg slow throughput time [2]: avg middle throughput time

Parameters:
fastestPercentage - double: the percentage of measurements that is to be counted as fast
slowestPercentage - double: the percentage of measurements that is to be counted as slow
Returns:
double[]

getSizes

public int[] getSizes(double fastestPercentage,
                      double slowestPercentage)
Returns an array containing the number of process instances that are considered to be fast, i.e. have a low throughput time (place 0 in array), the number of process instances that are slow (place 1 in array) and the number of process instances that are considered to be of normal speed (place 2 in array). Based on fastestPercentage, slowestPercentage and timeList (thus method calculateProcessMetrics() should be called before this one)

Parameters:
fastestPercentage - double: the percentage of measurements that is to be counted as fast
slowestPercentage - double: the percentage of measurements that is to be counted as slow
Returns:
int[]

getArrivalRate

public double getArrivalRate()
Calculates and returns the arrival rate of the traces in piList

Returns:
double

getArrivalStats

public org.apache.commons.math.stat.descriptive.SummaryStatistics getArrivalStats()
Returns the arrival Stats of the traces in piList

Returns:
SummaryStatistics

getMeanThroughputTime

public double getMeanThroughputTime()
Returns the mean throughput time

Returns:
double

getMinThroughputTime

public double getMinThroughputTime()
Returns the minimal throughput time. Note that method calculateProcessMetrics() should be called before this method.

Returns:
double

getMaxThroughputTime

public double getMaxThroughputTime()
Returns the maximal throughput time

Returns:
double

getProperFrequency

public int getProperFrequency()
returns the number of cases that execute successfully and complete properly

Returns:
int

getVisualization

public ModelGraphPanel getVisualization(java.util.ArrayList selectedInstances)
Creates a visualization of the performance analysis results. Note that a change of the display state by the user will have no effect before calling this methods. This is intended to prevent unnecessary cloning of the extended petri net, which actually delivers the custom visualization of the performance analysis results.

Parameters:
selectedInstances - The process instances that have been selected for updating the visualization.
Returns:
The visualization wrapped in a ModelGraphPanel.