org.processmining.models.heuristics.impl
Class ContinuousSemanticsParser

java.lang.Object
  extended by org.processmining.models.heuristics.impl.ContinuousSemanticsParser
All Implemented Interfaces:
HeuristicsNetParser
Direct Known Subclasses:
ExtraBehaviorParser

public class ContinuousSemanticsParser
extends java.lang.Object
implements HeuristicsNetParser

Replays log traces in HeuristicsNet objects using a continuous semantics. This means that the parsing process proceeds even when activities are not enabled during the log replay. Instead, any problems encountered during the parsing are registered and can be retrieved via the various "get" methods that are provided in this class.

Author:
Ana Karla Alves de Medeiros

Field Summary
protected  java.util.Set<org.deckfour.xes.classification.XEventClass> disabledElements
           
protected  MarkingHeuristicsNet marking
           
protected  int numExtraTokensLeftBehind
           
protected  int numMissingTokens
           
protected  int numParsedElements
           
protected  int numUnparsedElements
           
protected  boolean properlyCompleted
           
protected  int traceSize
           
protected  org.deckfour.xes.classification.XEventClasses xEventClassesInHeuristicsNet
           
 
Constructor Summary
ContinuousSemanticsParser(HeuristicsNet net, java.util.Random generator)
          Constructs a ContinuousSemanticsParser object.
 
Method Summary
 java.util.Set<org.deckfour.xes.classification.XEventClass> getDisabledElements()
          Retrieves the set of event classes that were not enabled during the log replay
 int getNumExtraTokensLeftBehind()
          Retrieves number of tokens that have been left behind after parsing log traces
 int getNumMissingTokens()
          Retrieves the number of missing tokens during the replay process
 int getNumParsedElements()
          Retrieves the number of activities in the log that could be parsed without problems
 int getNumUnparsedElements()
          Retrieves the number of activities in a log that could not be parsed without any problems
 boolean getProperlyCompleted()
          Indicates if the last trace to be replayed has properly completed (i.e., no tokens are left behind).
 int getSizeDisabledElements()
          Retrieves the number of event classes that were not enabled during the log replay
 boolean parse(org.deckfour.xes.model.XTrace trace)
          Replays a log trace in a HeuristicNet object.
protected  void registerProblemWhileParsing(org.deckfour.xes.classification.XEventClass element)
          Registers parsing problems for activities that are part of the HeuristicsNet object connected to this ContinuousSemantics parser.
protected  void reset()
          Resets this parser object back to its initial state.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

marking

protected MarkingHeuristicsNet marking

disabledElements

protected java.util.Set<org.deckfour.xes.classification.XEventClass> disabledElements

numUnparsedElements

protected int numUnparsedElements

xEventClassesInHeuristicsNet

protected org.deckfour.xes.classification.XEventClasses xEventClassesInHeuristicsNet

numParsedElements

protected int numParsedElements

numMissingTokens

protected int numMissingTokens

numExtraTokensLeftBehind

protected int numExtraTokensLeftBehind

traceSize

protected int traceSize

properlyCompleted

protected boolean properlyCompleted
Constructor Detail

ContinuousSemanticsParser

public ContinuousSemanticsParser(HeuristicsNet net,
                                 java.util.Random generator)
Constructs a ContinuousSemanticsParser object. This object will replay log traces in the given HeuristicsNet object. The random aspect of this replaying process is based on the provided Random generator

Parameters:
net - heuristics net object
generator - random generator used during the parsing of log traces
Method Detail

reset

protected void reset()
Resets this parser object back to its initial state.


parse

public boolean parse(org.deckfour.xes.model.XTrace trace)
Description copied from interface: HeuristicsNetParser
Replays a log trace in a HeuristicNet object.

Specified by:
parse in interface HeuristicsNetParser
Parameters:
trace - log trace to be replayed (or parsed).
Returns:
true if the trace could be replayed, false otherwise.

registerProblemWhileParsing

protected void registerProblemWhileParsing(org.deckfour.xes.classification.XEventClass element)
Registers parsing problems for activities that are part of the HeuristicsNet object connected to this ContinuousSemantics parser.

Parameters:
element - log event that could not be parsed.

getDisabledElements

public java.util.Set<org.deckfour.xes.classification.XEventClass> getDisabledElements()
Retrieves the set of event classes that were not enabled during the log replay

Returns:
set of events that were disabled during log replay

getSizeDisabledElements

public int getSizeDisabledElements()
Retrieves the number of event classes that were not enabled during the log replay

Returns:
number of disabled activities

getNumUnparsedElements

public int getNumUnparsedElements()
Retrieves the number of activities in a log that could not be parsed without any problems

Returns:
number of activities with parsing problems

getNumMissingTokens

public int getNumMissingTokens()
Retrieves the number of missing tokens during the replay process

Returns:
number of missing tokens

getNumExtraTokensLeftBehind

public int getNumExtraTokensLeftBehind()
Retrieves number of tokens that have been left behind after parsing log traces

Returns:
number of unused tokens after completely parsing traces

getProperlyCompleted

public boolean getProperlyCompleted()
Indicates if the last trace to be replayed has properly completed (i.e., no tokens are left behind).

Returns:
true if the trace replay completes properly, false otherwise.

getNumParsedElements

public int getNumParsedElements()
Retrieves the number of activities in the log that could be parsed without problems

Returns:
number of activities in the log that could be successfully parsed