public class PerfCounter extends java.lang.Object implements IPerfCounter<org.processmining.plugins.petrinet.manifestreplayresult.ManifestEvClassPattern>
| Modifier and Type | Field and Description |
|---|---|
protected gnu.trove.map.hash.TIntObjectHashMap<short[]> |
encodedTrans2Pred
for each pair of transition (from-->to), record the following information
[ index where the from is stored | block 1 | block 2 | ...] each block
contains [ to | min | max | mval | sval | freq ]
|
protected gnu.trove.map.hash.TIntObjectHashMap<short[]> |
encodedTrans2Succ |
protected org.processmining.models.graphbased.directed.petrinet.elements.Transition[] |
idx2Trans
Mapping the visualization petri net
|
protected org.deckfour.xes.info.XLogInfo |
logInfo |
protected gnu.trove.map.TIntIntMap |
manifestCount |
protected gnu.trove.map.TIntObjectMap<org.processmining.plugins.manifestanalysis.visualization.performance.ManifestTimeInfo> |
manifestLimit |
protected java.util.Map<short[],nl.tue.astar.util.ShortShortMultiset> |
marking2LogMoveCounter |
protected double[] |
patternInfoDouble
Sequentially for each pattern, store the following info: 1.
|
protected int[] |
patternInfoInt
Store total frequency where patterns occur | total unique case where
patterns occur
|
protected static int |
PLACESOJOURN |
protected static int |
PLACESYNCHRONIZATION |
protected static int |
PLACEWAITING |
MULTIPLIER, SOJOURNTIME, THROUGHPUTTIME, WAITINGTIME| Constructor and Description |
|---|
PerfCounter() |
| Modifier and Type | Method and Description |
|---|---|
void |
calculatePerformance(org.processmining.plugins.petrinet.manifestreplayresult.ManifestEvClassPattern manifest,
boolean[] caseFilter) |
void |
calculatePerformance(org.processmining.plugins.petrinet.manifestreplayresult.ManifestEvClassPattern manifest,
java.lang.String timeAtt,
java.lang.Class<?> bindedClass,
boolean[] caseFilter) |
protected short[] |
constructEncInitMarking(org.processmining.models.semantics.petrinet.Marking mNewNet) |
protected long |
extractTimestamp(org.deckfour.xes.model.XEvent currEvent,
java.lang.String timeAtt,
java.lang.Class<?> bindedClass)
This method extract timestamp or numerical attribute values, assuming
that the values exists for all events.
|
double |
getCaseFitnessMax() |
double |
getCaseFitnessMin() |
int |
getCaseNonFittingFreq() |
double |
getCasePeriod() |
int |
getCaseProperlyStartedFreq() |
double |
getCaseThroughputAvg() |
double |
getCaseThroughputMax() |
double |
getCaseThroughputMin() |
double |
getCaseThroughputStdDev() |
long[] |
getCaseThroughputTime() |
int |
getCaseTotalFreq() |
int |
getEncOfPlace(org.processmining.models.graphbased.directed.petrinet.elements.Place place) |
int |
getEncOfTrans(org.processmining.models.graphbased.directed.petrinet.elements.Transition trans) |
int |
getFreqPatternSojournTime(int patternIDOfManifest)
Return the frequency of sojourn time of pattern patternIDOfManifest
|
int |
getFreqPatternWaitingTime(int patternIDOfManifest)
Return the frequency of waiting time of pattern patternIDOfManifest
|
org.processmining.models.graphbased.directed.petrinet.elements.Place[] |
getIdx2Place() |
org.deckfour.xes.classification.XEventClass[] |
getIdx2Resource() |
org.processmining.models.graphbased.directed.petrinet.elements.Transition[] |
getIdx2Trans() |
double |
getMoveModelOfTrans(int encodedTransID) |
int[] |
getMoveModelOnlyCounter() |
int |
getNumPlaces() |
int |
getNumTrans() |
double[] |
getPatternInfoDouble() |
int[] |
getPatternInfoInt() |
java.lang.String |
getPatternString(org.processmining.plugins.petrinet.manifestreplayresult.ManifestEvClassPattern manifest,
short patternID) |
gnu.trove.map.TObjectIntMap<org.processmining.models.graphbased.directed.petrinet.elements.Place> |
getPlace2Idx() |
org.processmining.models.graphbased.directed.petrinet.elements.Place[] |
getPlaceArray() |
double[] |
getPlaceInfoDouble() |
int[] |
getPlaceInfoInt() |
double[] |
getPlaceStats(int encodedPlaceID)
get stats of places
Result:
[0] = min waiting time;
[1] = max waiting time;
[2] = average waiting time;
[3] = std dev waiting time;
[4] = freq waiting time;
[5] = min sync time;
[6] = max sync time;
[7] = average sync time;
[8] = std dev sync time;
[9] = freq sync time;
[10] = min sojourn time;
[11] = max sojourn time;
[12] = average sojourn time;
[13] = std dev sojourn time;
[14] = freq sojourn time;
|
gnu.trove.map.TObjectIntMap<org.deckfour.xes.classification.XEventClass> |
getResource2Idx() |
gnu.trove.map.TObjectIntMap<org.processmining.models.graphbased.directed.petrinet.elements.Transition> |
getTrans2Idx() |
org.processmining.models.graphbased.directed.petrinet.elements.Transition[] |
getTransArray() |
double[] |
getTransStats(org.processmining.plugins.petrinet.manifestreplayresult.ManifestEvClassPattern manifest,
int encodedTransID)
Get performance information related to a transition.
|
int |
getUniqueCaseMoveModelOfTrans(int encodedTransID) |
void |
incNumCases()
increment number of considered cases
|
void |
incNumNonFittingCases()
increment number of non fitting cases
|
protected void |
incPatternCaseInvolvement(int patternID) |
protected void |
incPatternFreq(int patternID)
Increse pattern frequency.
|
void |
init(org.processmining.plugins.petrinet.manifestreplayresult.ManifestEvClassPattern manifest,
java.lang.String timeAtt,
java.lang.Class<?> c,
boolean[] caseFilter) |
protected void |
initEncoding(org.processmining.plugins.petrinet.manifestreplayresult.Manifest manifest,
org.deckfour.xes.info.XLogInfo logInfo) |
protected void |
initTimedPlaces(gnu.trove.map.TIntObjectMap<java.util.List<java.lang.Long>> timedPlaces,
short[] marking) |
protected void |
produceTokens(gnu.trove.map.TIntObjectMap<java.util.List<java.lang.Long>> timedPlaces,
short[] marking,
int encTrans,
java.lang.Long firingTime)
Produce new tokens with time the same as the moment manifest fires.
|
void |
resetAllStats() |
protected java.lang.Long |
takeTokens(gnu.trove.map.TIntObjectMap<java.util.List<java.lang.Long>> timedPlaces,
short[] marking,
int encTrans,
long takenDate)
Take tokens, return the most recent date of taken tokens (if exists), or
the takenDate if there is no most recent date.
|
protected void |
updateManifestSojournTime(java.lang.Long lastTokenTakenTime,
long firingTime,
int patternIDOfManifest)
Calculate sojourn time of manifest, assuming that the lastTokenTakenTime
is NOT null, because if it is null, it has been replaced with firingTime.
|
protected void |
updateManifestThroughputTime(long firingTime,
long currEventTime,
int patternIDOfManifest)
Calculate throughput time of manifest.
|
protected void |
updateManifestWaitingTime(java.lang.Long lastTokenTakenTime,
long firingTime,
int patternIDOfManifest)
Calculate waiting time of a pattern manifest, assume the
lastTokenTakenTime is the same as firingTime if it was null.
|
protected void |
updateMarkingMoveModel(gnu.trove.map.TIntObjectMap<java.util.List<java.lang.Long>> timedPlaces,
short[] marking,
int encTrans)
This firing is only used for move model only move on model means firing
transitions as soon as they are enabled
|
protected void |
updatePatternPerformance(int performanceType,
int patternID,
long timePeriod)
Wrapper class for pattern performance
|
protected void |
updatePatternPerformance(int performanceType,
int patternID,
long timePeriod,
int frequencyAfterIncrease)
Update the minimum, maximum, mval, and sval value of a pattern.
|
protected void |
updatePlaceSojournTime(int place,
java.lang.Long tokenTime,
java.lang.Long takenTime)
Update place sojourn time without updating frequency
|
protected void |
updatePlaceSyncTime(int place,
java.lang.Long tokenTime,
java.lang.Long maxSyncTime)
Update place sync time without updating frequency
|
protected void |
updatePlaceTime(int updateType,
int place,
long time)
Low level code to update statistics of a place (waiting/sync/sojourn) but
NOT the frequency of the place
|
protected void |
updatePlaceTimeAll(int place,
java.lang.Long tokenTime,
java.lang.Long maxSyncTime,
java.lang.Long takenTime)
Update stats for place
|
protected void |
updatePlaceWaitingTime(int place,
java.lang.Long maxSyncTime,
java.lang.Long takenTime)
Update place waiting time without updating frequency
|
protected org.processmining.models.graphbased.directed.petrinet.elements.Transition[] idx2Trans
protected double[] patternInfoDouble
protected int[] patternInfoInt
protected static final int PLACEWAITING
protected static final int PLACESYNCHRONIZATION
protected static final int PLACESOJOURN
protected gnu.trove.map.hash.TIntObjectHashMap<short[]> encodedTrans2Pred
protected gnu.trove.map.hash.TIntObjectHashMap<short[]> encodedTrans2Succ
protected java.util.Map<short[],nl.tue.astar.util.ShortShortMultiset> marking2LogMoveCounter
protected gnu.trove.map.TIntIntMap manifestCount
protected gnu.trove.map.TIntObjectMap<org.processmining.plugins.manifestanalysis.visualization.performance.ManifestTimeInfo> manifestLimit
protected org.deckfour.xes.info.XLogInfo logInfo
public void init(org.processmining.plugins.petrinet.manifestreplayresult.ManifestEvClassPattern manifest,
java.lang.String timeAtt,
java.lang.Class<?> c,
boolean[] caseFilter)
init in interface IPerfCounter<org.processmining.plugins.petrinet.manifestreplayresult.ManifestEvClassPattern>public void calculatePerformance(org.processmining.plugins.petrinet.manifestreplayresult.ManifestEvClassPattern manifest,
boolean[] caseFilter)
calculatePerformance in interface IPerfCounter<org.processmining.plugins.petrinet.manifestreplayresult.ManifestEvClassPattern>public void resetAllStats()
public void calculatePerformance(org.processmining.plugins.petrinet.manifestreplayresult.ManifestEvClassPattern manifest,
java.lang.String timeAtt,
java.lang.Class<?> bindedClass,
boolean[] caseFilter)
calculatePerformance in interface IPerfCounter<org.processmining.plugins.petrinet.manifestreplayresult.ManifestEvClassPattern>protected void updateManifestThroughputTime(long firingTime,
long currEventTime,
int patternIDOfManifest)
firingTime - currEventTime - patternIDOfManifest - protected void updateManifestSojournTime(java.lang.Long lastTokenTakenTime,
long firingTime,
int patternIDOfManifest)
lastTokenTakenTime - firingTime - patternIDOfManifest - protected void updateManifestWaitingTime(java.lang.Long lastTokenTakenTime,
long firingTime,
int patternIDOfManifest)
lastTokenTakenTime - firingTime - patternIDOfManifest - protected long extractTimestamp(org.deckfour.xes.model.XEvent currEvent,
java.lang.String timeAtt,
java.lang.Class<?> bindedClass)
currEvent - timeAtt - bindedClass - protected void initTimedPlaces(gnu.trove.map.TIntObjectMap<java.util.List<java.lang.Long>> timedPlaces,
short[] marking)
protected void incPatternCaseInvolvement(int patternID)
protected void updatePatternPerformance(int performanceType,
int patternID,
long timePeriod)
performanceType - patternID - timePeriod - method(int performanceType, int patternID, long timePeriod, int oldFrequency)protected void updatePatternPerformance(int performanceType,
int patternID,
long timePeriod,
int frequencyAfterIncrease)
performanceType - patternID - timePeriod - frequencyAfterIncrease - if >= 1 then it is used instead of the frequency from patternInfoInt[patternID * 2]methodprotected void incPatternFreq(int patternID)
patternID - protected void updateMarkingMoveModel(gnu.trove.map.TIntObjectMap<java.util.List<java.lang.Long>> timedPlaces,
short[] marking,
int encTrans)
timedPlaces - marking - encTrans - time - protected java.lang.Long takeTokens(gnu.trove.map.TIntObjectMap<java.util.List<java.lang.Long>> timedPlaces,
short[] marking,
int encTrans,
long takenDate)
timedPlaces - marking - encTrans - tokenTakeTime - public int getFreqPatternWaitingTime(int patternIDOfManifest)
getFreqPatternWaitingTime in interface IPerfCounter<org.processmining.plugins.petrinet.manifestreplayresult.ManifestEvClassPattern>patternIDOfManifest - public int getFreqPatternSojournTime(int patternIDOfManifest)
getFreqPatternSojournTime in interface IPerfCounter<org.processmining.plugins.petrinet.manifestreplayresult.ManifestEvClassPattern>patternIDOfManifest - protected void updatePlaceTimeAll(int place,
java.lang.Long tokenTime,
java.lang.Long maxSyncTime,
java.lang.Long takenTime)
place - place to be updatedtokenTime - the timestamp of token coming to the placemaxSyncTime - maximum timestamp of tokens that are synchronized with the
placetakenTime - the timestamp where transition takes the token from the place.
Must not be nullprotected void updatePlaceWaitingTime(int place,
java.lang.Long maxSyncTime,
java.lang.Long takenTime)
place - maxSyncTime - takenTime - protected void updatePlaceSojournTime(int place,
java.lang.Long tokenTime,
java.lang.Long takenTime)
place - tokenTime - takenTime - protected void updatePlaceSyncTime(int place,
java.lang.Long tokenTime,
java.lang.Long maxSyncTime)
place - tokenTime - maxSyncTime - protected void updatePlaceTime(int updateType,
int place,
long time)
updateType - place - time - protected void produceTokens(gnu.trove.map.TIntObjectMap<java.util.List<java.lang.Long>> timedPlaces,
short[] marking,
int encTrans,
java.lang.Long firingTime)
timedPlaces - marking - encTrans - firingTime - protected short[] constructEncInitMarking(org.processmining.models.semantics.petrinet.Marking mNewNet)
protected void initEncoding(org.processmining.plugins.petrinet.manifestreplayresult.Manifest manifest,
org.deckfour.xes.info.XLogInfo logInfo)
net - log - public void incNumCases()
public void incNumNonFittingCases()
public int getCaseTotalFreq()
getCaseTotalFreq in interface IPerfCounter<org.processmining.plugins.petrinet.manifestreplayresult.ManifestEvClassPattern>public int getCaseNonFittingFreq()
getCaseNonFittingFreq in interface IPerfCounter<org.processmining.plugins.petrinet.manifestreplayresult.ManifestEvClassPattern>public int getCaseProperlyStartedFreq()
getCaseProperlyStartedFreq in interface IPerfCounter<org.processmining.plugins.petrinet.manifestreplayresult.ManifestEvClassPattern>public double getCaseThroughputMin()
getCaseThroughputMin in interface IPerfCounter<org.processmining.plugins.petrinet.manifestreplayresult.ManifestEvClassPattern>public double getCaseThroughputMax()
getCaseThroughputMax in interface IPerfCounter<org.processmining.plugins.petrinet.manifestreplayresult.ManifestEvClassPattern>public double getCaseThroughputAvg()
getCaseThroughputAvg in interface IPerfCounter<org.processmining.plugins.petrinet.manifestreplayresult.ManifestEvClassPattern>public double getCaseThroughputStdDev()
getCaseThroughputStdDev in interface IPerfCounter<org.processmining.plugins.petrinet.manifestreplayresult.ManifestEvClassPattern>public double getCaseFitnessMax()
public double getCaseFitnessMin()
public org.processmining.models.graphbased.directed.petrinet.elements.Place[] getIdx2Place()
getIdx2Place in interface IPerfCounter<org.processmining.plugins.petrinet.manifestreplayresult.ManifestEvClassPattern>public org.processmining.models.graphbased.directed.petrinet.elements.Transition[] getIdx2Trans()
getIdx2Trans in interface IPerfCounter<org.processmining.plugins.petrinet.manifestreplayresult.ManifestEvClassPattern>public gnu.trove.map.TObjectIntMap<org.processmining.models.graphbased.directed.petrinet.elements.Place> getPlace2Idx()
getPlace2Idx in interface IPerfCounter<org.processmining.plugins.petrinet.manifestreplayresult.ManifestEvClassPattern>public gnu.trove.map.TObjectIntMap<org.processmining.models.graphbased.directed.petrinet.elements.Transition> getTrans2Idx()
getTrans2Idx in interface IPerfCounter<org.processmining.plugins.petrinet.manifestreplayresult.ManifestEvClassPattern>public org.deckfour.xes.classification.XEventClass[] getIdx2Resource()
getIdx2Resource in interface IPerfCounter<org.processmining.plugins.petrinet.manifestreplayresult.ManifestEvClassPattern>public gnu.trove.map.TObjectIntMap<org.deckfour.xes.classification.XEventClass> getResource2Idx()
getResource2Idx in interface IPerfCounter<org.processmining.plugins.petrinet.manifestreplayresult.ManifestEvClassPattern>public double[] getPatternInfoDouble()
getPatternInfoDouble in interface IPerfCounter<org.processmining.plugins.petrinet.manifestreplayresult.ManifestEvClassPattern>public int[] getPatternInfoInt()
getPatternInfoInt in interface IPerfCounter<org.processmining.plugins.petrinet.manifestreplayresult.ManifestEvClassPattern>public int[] getMoveModelOnlyCounter()
getMoveModelOnlyCounter in interface IPerfCounter<org.processmining.plugins.petrinet.manifestreplayresult.ManifestEvClassPattern>public double[] getPlaceInfoDouble()
getPlaceInfoDouble in interface IPerfCounter<org.processmining.plugins.petrinet.manifestreplayresult.ManifestEvClassPattern>public int[] getPlaceInfoInt()
getPlaceInfoInt in interface IPerfCounter<org.processmining.plugins.petrinet.manifestreplayresult.ManifestEvClassPattern>public double getCasePeriod()
getCasePeriod in interface IPerfCounter<org.processmining.plugins.petrinet.manifestreplayresult.ManifestEvClassPattern>public int getNumPlaces()
getNumPlaces in interface IPerfCounter<org.processmining.plugins.petrinet.manifestreplayresult.ManifestEvClassPattern>public int getNumTrans()
getNumTrans in interface IPerfCounter<org.processmining.plugins.petrinet.manifestreplayresult.ManifestEvClassPattern>public org.processmining.models.graphbased.directed.petrinet.elements.Transition[] getTransArray()
getTransArray in interface IPerfCounter<org.processmining.plugins.petrinet.manifestreplayresult.ManifestEvClassPattern>public org.processmining.models.graphbased.directed.petrinet.elements.Place[] getPlaceArray()
getPlaceArray in interface IPerfCounter<org.processmining.plugins.petrinet.manifestreplayresult.ManifestEvClassPattern>public double[] getPlaceStats(int encodedPlaceID)
getPlaceStats in interface IPerfCounter<org.processmining.plugins.petrinet.manifestreplayresult.ManifestEvClassPattern>public double[] getTransStats(org.processmining.plugins.petrinet.manifestreplayresult.ManifestEvClassPattern manifest,
int encodedTransID)
getTransStats in interface IPerfCounter<org.processmining.plugins.petrinet.manifestreplayresult.ManifestEvClassPattern>public java.lang.String getPatternString(org.processmining.plugins.petrinet.manifestreplayresult.ManifestEvClassPattern manifest,
short patternID)
getPatternString in interface IPerfCounter<org.processmining.plugins.petrinet.manifestreplayresult.ManifestEvClassPattern>public double getMoveModelOfTrans(int encodedTransID)
getMoveModelOfTrans in interface IPerfCounter<org.processmining.plugins.petrinet.manifestreplayresult.ManifestEvClassPattern>public int getUniqueCaseMoveModelOfTrans(int encodedTransID)
getUniqueCaseMoveModelOfTrans in interface IPerfCounter<org.processmining.plugins.petrinet.manifestreplayresult.ManifestEvClassPattern>public int getEncOfTrans(org.processmining.models.graphbased.directed.petrinet.elements.Transition trans)
getEncOfTrans in interface IPerfCounter<org.processmining.plugins.petrinet.manifestreplayresult.ManifestEvClassPattern>public int getEncOfPlace(org.processmining.models.graphbased.directed.petrinet.elements.Place place)
getEncOfPlace in interface IPerfCounter<org.processmining.plugins.petrinet.manifestreplayresult.ManifestEvClassPattern>public long[] getCaseThroughputTime()
getCaseThroughputTime in interface IPerfCounter<org.processmining.plugins.petrinet.manifestreplayresult.ManifestEvClassPattern>