org.processmining.framework.models.petrinet.algorithms.logReplay
Class Measurer

java.lang.Object
  extended by org.processmining.framework.models.petrinet.algorithms.logReplay.Measurer
Direct Known Subclasses:
ConformanceMeasurer, PerformanceMeasurer

public class Measurer
extends java.lang.Object

Statelesss strategy object determining which kind of measurements should be taken along the course of log replay. In order to use a Measurer you should derive your own subclass, add a method to this parent class that does nothing (so other subclasses will not inherit your specific measurement strategy), and override it in your subclass in such a way that the desired measurements are taken.

Author:
Anne Rozinat

Constructor Summary
Measurer()
           
 
Method Summary
protected  LogReplayAnalysisResult initLogReplayAnalysisResult(AnalysisConfiguration analysisOptions, PetriNet petriNet, LogReader log, LogReplayAnalysisMethod analysisMethod)
          To be overridden in subclasses that want create custom analysis results.
protected  void initTraceReplay(ReplayedLogTrace pi, LogReplayAnalysisResult result)
          Will be called at the very beginning of replaying a trace.
protected  void takeFailedTaskMeasurement(ReplayedLogTrace pi, ReplayedTransition t, AuditTrailEntry ate)
          Will be called directly before a failed task becomes artificially enabled in order to progress with the log replay (non-blocking).
protected  void takeLogEventRecordingMeasurement(LogReplayAnalysisResult result, ReplayedLogTrace pi, AuditTrailEntry ate)
          Will be called directly after fetching the new log event from the currently replayed log trace.
protected  void takeMissingTokenMeasurement(ReplayedPlace p, ReplayedLogTrace pi)
          Will be called directly after artificially creating a new token for enabling a task that has failed execution during log replay.
protected  void takePostReplayMeasurement(LogReplayAnalysisResult result)
          Will be called after the whole replay of the log has finished.
protected  void takePostTraceReplayMeasurement(LogReplayAnalysisResult result, ReplayedLogTrace pi)
          Will be called directly after finishing replay of the current trace.
protected  void takePreStepExecutionMeasurement(LogReplayAnalysisResult result, ReplayedLogTrace pi)
          Will be called directly after fetching a new log event from the currently replayed log trace.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Measurer

public Measurer()
Method Detail

initLogReplayAnalysisResult

protected LogReplayAnalysisResult initLogReplayAnalysisResult(AnalysisConfiguration analysisOptions,
                                                              PetriNet petriNet,
                                                              LogReader log,
                                                              LogReplayAnalysisMethod analysisMethod)
To be overridden in subclasses that want create custom analysis results.

Parameters:
analysisOptions - the configuration object determining which parts of the analysis should be carried out (can be null, then all options are interpreted as enabled)

initTraceReplay

protected void initTraceReplay(ReplayedLogTrace pi,
                               LogReplayAnalysisResult result)
Will be called at the very beginning of replaying a trace.

Parameters:
pi - the trace currently being replayed
result - the result object filled by the log replay method

takePreStepExecutionMeasurement

protected void takePreStepExecutionMeasurement(LogReplayAnalysisResult result,
                                               ReplayedLogTrace pi)
Will be called directly after fetching a new log event from the currently replayed log trace. Does nothing per default (to be overridden in subclasses if necessary).

Parameters:
result - the result object filled by the log replay method
pi - the trace which is currently replayed

takeLogEventRecordingMeasurement

protected void takeLogEventRecordingMeasurement(LogReplayAnalysisResult result,
                                                ReplayedLogTrace pi,
                                                AuditTrailEntry ate)
Will be called directly after fetching the new log event from the currently replayed log trace.

Parameters:
result - the result object filled by the log replay method
pi - the trace which is currently replayed
ate - the log event occurrence currently replayed

takeFailedTaskMeasurement

protected void takeFailedTaskMeasurement(ReplayedLogTrace pi,
                                         ReplayedTransition t,
                                         AuditTrailEntry ate)
Will be called directly before a failed task becomes artificially enabled in order to progress with the log replay (non-blocking). Does nothing per default (to be overridden in subclasses if necessary).

Parameters:
pi - the trace which is currently replayed
t - the transition to be artificially enabled
ate - the audit trail entry relating to this failed execution

takeMissingTokenMeasurement

protected void takeMissingTokenMeasurement(ReplayedPlace p,
                                           ReplayedLogTrace pi)
Will be called directly after artificially creating a new token for enabling a task that has failed execution during log replay. Does nothing per default (to be overridden in subclasses if necessary).

Parameters:
p - the place for which the token is created
pi - the trace which is currently replayed

takePostTraceReplayMeasurement

protected void takePostTraceReplayMeasurement(LogReplayAnalysisResult result,
                                              ReplayedLogTrace pi)
Will be called directly after finishing replay of the current trace. Does nothing per default (to be overridden in subclasses if necessary).

Parameters:
result - the result object filled by the log replay method
pi - the trace which is currently replayed

takePostReplayMeasurement

protected void takePostReplayMeasurement(LogReplayAnalysisResult result)
Will be called after the whole replay of the log has finished. Does nothing per default (to be overridden in subclasses if necessary).

Parameters:
result - the result object filled by the log replay method