Class ETCBasedComposer<I extends AdvancedComposition<Place>>
- java.lang.Object
-
- org.processmining.specpp.componenting.system.link.AbstractBaseClass
-
- org.processmining.specpp.base.impls.AbstractComposer<Place,I,CollectionOfPlaces>
-
- org.processmining.specpp.composition.composers.ETCBasedComposer<I>
-
- All Implemented Interfaces:
java.util.function.Consumer<Place>,Composer<Place,I,CollectionOfPlaces>,FullComponentSystemUser,ComposerComponent<Place,I,CollectionOfPlaces>,HasComponentCollection,IsGlobalProvider,UsesGlobalComponentSystem,UsesLocalComponentSystem,Initializable
public class ETCBasedComposer<I extends AdvancedComposition<Place>> extends AbstractComposer<Place,I,CollectionOfPlaces>
-
-
Field Summary
-
Fields inherited from class org.processmining.specpp.base.impls.AbstractComposer
assembleResult, composition
-
-
Constructor Summary
Constructors Constructor Description ETCBasedComposer(I composition)Creates a new ETC-based Composer
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidacceptanceRevoked(Place candidate)Executed when candidate is revoked (is implicit (rho=0), insufficiently constrains precision (rho>0)).doublecalcETCPrecision(java.util.Map<Activity,java.lang.Integer> activityToEscapingEdges, java.util.Map<Activity,java.lang.Integer> activityToAllowed)Calculates the (approximate) ETC-precision based on the given activity mappings (including/excluding test-wise added/removed places)protected voidcandidateAccepted(Place candidate)Executed when candidate is accepted (its addition makes the intermediate model more precise (by gamma))-protected voidcandidateRejected(Place candidate)Executed when a candidate is rejected (adding it would not make the intermediate model (sufficiently) more precisevoidcandidatesAreExhausted()Executed after the (premature) abort of the discovery Prints the (approximate) precision of the final modelbooleancheckImplicitness(Place p)check (tau=1) / approximate (tau<1) whether a place is implicit (gamma=0) / insufficiently constrains precision (gamma>0)booleancheckPrecisionGain(Place p)check (tau=1) / approximate (tau<1) whether a place makes the intermediate result sufficiently more precisebooleancheckPrecisionThreshold(double p)Checks whether precision threshold rho has been metprotected booleandeliberateAcceptance(Place candidate)Deliberate, whether place should be added to the composition or notint[]evaluatePrecision(Activity a)reevaluates (tau=1) / approximates (tau<1) the activity's mapping entriesprotected voidinitSelf()Initialize the ETC-based composer: Builds prefix automaton and initial activity mappings.booleanisFinished()Checks whether search can be aborted prematurely.-
Methods inherited from class org.processmining.specpp.base.impls.AbstractComposer
accept, acceptCandidate, composition, generateResult, getIntermediateResult, rejectCandidate, revokeAcceptance, revokeLastAcceptance
-
Methods inherited from class org.processmining.specpp.componenting.system.link.AbstractBaseClass
collectTransitiveSubcomponents, getComponentCollection, getSubComponents, globalComponentSystem, init, localComponentSystem, postSubComponentInit, preSubComponentInit, registerSubComponent, unregisterSubComponent
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.processmining.specpp.componenting.system.FullComponentSystemUser
collectTransitiveSubcomponents, connectLocalComponentSystem, getComponentCollection, registerSubComponent, unregisterSubComponent
-
Methods inherited from interface org.processmining.specpp.traits.Initializable
init
-
Methods inherited from interface org.processmining.specpp.componenting.traits.UsesGlobalComponentSystem
globalComponentSystem
-
Methods inherited from interface org.processmining.specpp.componenting.traits.UsesLocalComponentSystem
bridgeToChildren, localComponentSystem
-
-
-
-
Constructor Detail
-
ETCBasedComposer
public ETCBasedComposer(I composition)
Creates a new ETC-based Composer- Parameters:
composition- Collection of places ("Intermediate Model")
-
-
Method Detail
-
deliberateAcceptance
protected boolean deliberateAcceptance(Place candidate)
Deliberate, whether place should be added to the composition or not- Specified by:
deliberateAcceptancein classAbstractComposer<Place,I extends AdvancedComposition<Place>,CollectionOfPlaces>- Parameters:
candidate- the candidate to decide acceptance for- Returns:
- true, if candidate should be added. Otherwise, false.
-
checkPrecisionGain
public boolean checkPrecisionGain(Place p)
check (tau=1) / approximate (tau<1) whether a place makes the intermediate result sufficiently more precise- Parameters:
p- place- Returns:
- true, if p is not implicit / sufficiently improves precision. Otherwise, false.
-
checkImplicitness
public boolean checkImplicitness(Place p)
check (tau=1) / approximate (tau<1) whether a place is implicit (gamma=0) / insufficiently constrains precision (gamma>0)- Parameters:
p- place- Returns:
- true, if p is implicit (gamma=0) / insufficiently constrains precision (gamma>0). Otherwise, false.
-
acceptanceRevoked
protected void acceptanceRevoked(Place candidate)
Executed when candidate is revoked (is implicit (rho=0), insufficiently constrains precision (rho>0)).- Specified by:
acceptanceRevokedin classAbstractComposer<Place,I extends AdvancedComposition<Place>,CollectionOfPlaces>- Parameters:
candidate- Revoked candidate.
-
candidateAccepted
protected void candidateAccepted(Place candidate)
Executed when candidate is accepted (its addition makes the intermediate model more precise (by gamma))-- Specified by:
candidateAcceptedin classAbstractComposer<Place,I extends AdvancedComposition<Place>,CollectionOfPlaces>- Parameters:
candidate- Accepted candidate.
-
candidateRejected
protected void candidateRejected(Place candidate)
Executed when a candidate is rejected (adding it would not make the intermediate model (sufficiently) more precise- Specified by:
candidateRejectedin classAbstractComposer<Place,I extends AdvancedComposition<Place>,CollectionOfPlaces>- Parameters:
candidate- Rejected candidate.
-
candidatesAreExhausted
public void candidatesAreExhausted()
Executed after the (premature) abort of the discovery Prints the (approximate) precision of the final model
-
initSelf
protected void initSelf()
Initialize the ETC-based composer: Builds prefix automaton and initial activity mappings.- Specified by:
initSelfin classAbstractBaseClass
-
isFinished
public boolean isFinished()
Checks whether search can be aborted prematurely.- Specified by:
isFinishedin interfaceComposer<Place,I extends AdvancedComposition<Place>,CollectionOfPlaces>- Overrides:
isFinishedin classAbstractComposer<Place,I extends AdvancedComposition<Place>,CollectionOfPlaces>- Returns:
- true, if search can be aborted. Otherwise, false.
-
checkPrecisionThreshold
public boolean checkPrecisionThreshold(double p)
Checks whether precision threshold rho has been met- Returns:
- true, if threshold is reached. Otherwise, false.
-
calcETCPrecision
public double calcETCPrecision(java.util.Map<Activity,java.lang.Integer> activityToEscapingEdges, java.util.Map<Activity,java.lang.Integer> activityToAllowed)
Calculates the (approximate) ETC-precision based on the given activity mappings (including/excluding test-wise added/removed places)- Parameters:
activityToEscapingEdges- Mapping from activities to #EscapingEdgesactivityToAllowed- Mapping from activities to #Allowed- Returns:
- (approximate) ETC-precision
-
evaluatePrecision
public int[] evaluatePrecision(Activity a)
reevaluates (tau=1) / approximates (tau<1) the activity's mapping entries- Parameters:
a- activity to evaluate- Returns:
- Integer-array of size two. [0]-#EscapingEdges a, [1]-#Allowed a
-
-