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

java.lang.Object
  extended by org.processmining.framework.models.petrinet.algorithms.logReplay.LogReplayAnalysisMethod
All Implemented Interfaces:
AnalysisMethod

public class LogReplayAnalysisMethod
extends java.lang.Object
implements AnalysisMethod

Replays the given log in the given Petri net model in a non-blocking way. It replays the given log in the given Petri net model in a non-blocking way while taking care of invisible tasks that might transparently enable visible tasks, and duplicate tasks, which lead to a conflict that needs to be resolved.
Taking measurements that are needed to calculate any metrics based on the log replay method is only done in the Measurer object. That is, if an additional measurement step is to be introduced, call a newly defined protected "takeAdditionalmeasurement()" method (that does nothing per default but can be overridden in your specific subclass of the measurer during the appropriate phase of log replay. This way, side effects on other log-replay using applications can be avoided.
All the diagnostic information is stored in an object of the class LogReplayAnalysisResult. Deriving subclasses should create their special-purpose subclass from it in initLogReplayAnalysisResult.

Author:
arozinat

Field Summary
protected  LogReader myLogReader
           
protected  Measurer myMeasurer
           
protected  PetriNet myPetriNet
           
protected  LogReplayAnalysisResult myResult
           
protected  Progress progress
           
protected  int progressCounter
           
 
Constructor Summary
LogReplayAnalysisMethod(PetriNet inputPetriNet, LogReader inputLog, Measurer measurer)
          Creates the log replay analysis method object.
 
Method Summary
 AnalysisResult analyse(AnalysisConfiguration analysisOptions)
          Invokes the log replay analysis.
 AnalysisMethodEnum getIdentifier()
          Gets the belonging identifier.
 void setMaxDepth(int maxDepth)
          Restricts the depth of search for a sequence of invisible tasks that might enable the task currently to be replayed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

myPetriNet

protected PetriNet myPetriNet

myLogReader

protected LogReader myLogReader

myResult

protected LogReplayAnalysisResult myResult

myMeasurer

protected Measurer myMeasurer

progress

protected Progress progress

progressCounter

protected int progressCounter
Constructor Detail

LogReplayAnalysisMethod

public LogReplayAnalysisMethod(PetriNet inputPetriNet,
                               LogReader inputLog,
                               Measurer measurer)
Creates the log replay analysis method object.

Parameters:
inputPetriNet - the PetriNet passed to the conformance check plugin
inputLog - the LogReader passed to the conformance check plugin
Method Detail

setMaxDepth

public void setMaxDepth(int maxDepth)
Restricts the depth of search for a sequence of invisible tasks that might enable the task currently to be replayed.
Per default the whole state space is built each time a transition is not enabled in order to check for a potential enabling sequence of invisible tasks only. If this leads to performance bottlenecks, you might want to restrict the maximum lenght of invisible task sequences that can be found by the log replay method.

Parameters:
maxDepth - indicates the maximum length for an enabling sequence of invisible tasks that can be found during log replay. If it is 0, no invisible task will be considered for whether it might enable the currently replayed task. If it is 1, enabling sequences of length 1 can be found (if they exist) etc. Note that the full state space will be constructed, if the provided maxDepth < 0

getIdentifier

public AnalysisMethodEnum getIdentifier()
Gets the belonging identifier. In order to implement a new analysis method one has to extend the AnalysisMethodEnum class by another nominal value denominating this kind of analysis method.

Specified by:
getIdentifier in interface AnalysisMethod
Returns:
the LOG_REPLAY

analyse

public AnalysisResult analyse(AnalysisConfiguration analysisOptions)
Invokes the log replay analysis.
Method replaying the log in a non-blocking way. This means that for each event in the log the associated task in the model is looked up and fired. In the case of a transition not being enabled, the missing tokens are created artificially and the transition is fired anyway.
Furthermore, the Petri net is allowed to contain invisible tasks, i.e., which get not logged and therefore are not visible in the log.
Note that the diagnostic log is replayed in the diagnostic petri net, which both are created by initializing the corresponding LogReplayResult object. This means that parts of the diagnostic data collection are carried out within the diagnostic structures itself, e.g., incrementing a counter for firing a transition.

Specified by:
analyse in interface AnalysisMethod
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)
Returns:
the LogReplayAnalysisResult object containing all diagnostic results if the log replay could be finished successfully, null otherwise