public class BehavioralConstraintPattern
extends java.lang.Object
Constructor and Description |
---|
BehavioralConstraintPattern(java.lang.String patternType,
java.lang.String referenceActivityName,
java.lang.String referenceActivityNodeId,
java.lang.String targetActivityName,
java.lang.String targetActivityNodeId,
java.lang.String sourceClassName,
java.lang.String sourceClassNodeId,
java.lang.String targetClassName,
java.lang.String targetClassNodeId,
ClassEdge classRelationship)
initialize parameters
|
Modifier and Type | Method and Description |
---|---|
void |
computeMetricsOfAllSolutionsForPattern(java.lang.String fitnessAlgorithm,
java.lang.String precisionAlgorithm,
java.lang.String generalizationAlgorithm,
double fitnessThreshold,
double precisionThreshold,
double generalizationThreshold,
boolean fitnessUpdateFlag,
boolean precisionUpdateFlag,
boolean generalizationUpdateFlag)
compute the metrics for each model solution (2^9 in total)
based on the input pair list of a constraint source (consisting
of a reference activity, a target activity and a intermediary, i.e., a class or relationship);
|
java.lang.String |
getClassRelationshipEdgeId()
gets the classRelationshipEdgeId
|
java.lang.String |
getClassRelationshipName()
gets the classRelationshipName;
it is null for the triangle (OC) pattern;
|
java.util.List<java.lang.String> |
getConstraintTypeList()
gets the constraintTypeList
|
java.lang.String |
getIntermediaryId()
gets the intermediaryId
|
java.lang.String |
getIntermediaryName()
gets the intermediaryName
|
java.lang.String |
getPatternId()
gets the pattern id (referenceActivityNodeId + "-" + intermediaryId + "-" + targetActivityNodeId)
|
java.lang.String |
getPatternName()
gets the pattern name (referenceActivityName + "-" + intermediaryName + "-" + targetActivityName)
|
java.lang.String |
getPatternType()
gets the pattern type (mxConstants.CRELOCRELATION or mxConstants.CRELRTRELATION)
|
java.util.List<org.processmining.framework.util.Pair<java.lang.Integer,java.lang.Integer>> |
getPrecedenceAndResponsePairList()
gets the constraintTypeList
|
java.lang.String |
getReferenceActivityName()
gets the referenceActivityName
|
java.lang.String |
getReferenceActivityNodeId()
gets the id of the node (in an OCBC model) corresponding the reference activity
|
java.util.Map<XOCEvent,java.util.List<XOCEvent>> |
getReferenceEventVSPrecedenceTargetEventListMap()
gets the referenceEventVSPrecedenceTargetEventList
|
java.util.Map<XOCEvent,java.util.List<XOCEvent>> |
getReferenceEventVSResposeTargetEventListMap()
gets the referenceEventVSResponseTargetEventList
|
java.util.Map<java.lang.Long,java.lang.Double> |
getSolutionVSFitnessMap()
gets the solutionVSFitness
|
java.util.Map<java.lang.Long,java.lang.Double> |
getSolutionVSGeneralizationMap()
gets the solutionVSGeneralization
|
java.util.Map<java.lang.Long,java.lang.Double> |
getSolutionVSPrecisionMap()
gets the solutionVSPrecison
|
java.lang.String |
getSourceClassName()
gets the sourceClassName (source class is connected to reference activity)
|
java.lang.String |
getSourceClassNodeId()
gets the id of the node (in an OCBC model) corresponding the source class
|
java.lang.String |
getTargetActivityName()
gets the targetActivityName
|
java.lang.String |
getTargetActivityNodeId()
gets the id of the node (in an OCBC model) corresponding the target activity
|
java.lang.String |
getTargetClassName()
gets the targetClassName (target class is connected to target activity)
|
java.lang.String |
getTargetClassNodeId()
gets the id of the node (in an OCBC model) corresponding the target class
|
static void |
main(java.lang.String[] args) |
java.lang.Long |
searchBestSolutionBasedOnWeights(double fitnessWeight,
double precisionWeight,
double generalizationWeight)
find the best solutions based on weights of fitness, precision and generalization;
ranked the solutions based on the mean
Score = fitnessWeight*fitness(solution) + fitnessWeight*fitness(solution) + fitnessWeight*fitness(solution);
|
java.util.List<java.lang.String> |
transformSolutionIntoConstraintTypeList(java.lang.Long solution)
Transform a solution (parse the corresponding integer) into a list of constraint types
A solution indicate the possible variants,
<(0,0), (1,0), (2+,0), (0,1), (1,1), (2+,1), (0,2+), (1,2+), (2+,2+)> is the sequence of variants
its state (allowed/not allowed) is denoted by a binary number with 9 bits: e.g., 0b101010000
the first variant (0,0) corresponds to the highest bit i.e., 1 while
the last variant (2+,2+) corresponds to the lowest bit i.e., 0
|
void |
transformSolutionIntoModelVariantArray(java.lang.Long solution,
boolean[] modelVariantArray)
Transform a solution (parse the corresponding integer) into a model variant array
A solution indicate the possible variants,
<(0,0), (1,0), (2+,0), (0,1), (1,1), (2+,1), (0,2+), (1,2+), (2+,2+)> is the sequence of variants
its state (allowed/not allowed) is denoted by a binary number with 9 bits: e.g., 0b101010000
the first variant (0,0) corresponds to the highest bit i.e., 1 while
the last variant (2+,2+) corresponds to the lowest bit i.e., 0
|
void |
transformSolutionIntoPossibleVariantList(java.lang.Long solution,
java.util.List<java.lang.String> modelVariantList)
Transform a solution (parse the corresponding integer) into a list contains the possible variants
|
public BehavioralConstraintPattern(java.lang.String patternType, java.lang.String referenceActivityName, java.lang.String referenceActivityNodeId, java.lang.String targetActivityName, java.lang.String targetActivityNodeId, java.lang.String sourceClassName, java.lang.String sourceClassNodeId, java.lang.String targetClassName, java.lang.String targetClassNodeId, ClassEdge classRelationship)
patternType
- referenceActivityName
- referenceActivityNodeId
- targetActivityName
- targetActivityNodeId
- sourceClassName
- sourceClassNodeId
- targetClassName
- targetClassNodeId
- classRelationshipName
- classRelationshipEdgeId
- public void transformSolutionIntoModelVariantArray(java.lang.Long solution, boolean[] modelVariantArray)
solution
- An integer to indicate the solution e.g., 0b101010000modelVariantArray
- An array which contains the model variant flag, i.e., boolean values
(the first element corresponds to the first variant (0,0)), e.g., model = {true,false,true,false,true,false,false,false,false}public void computeMetricsOfAllSolutionsForPattern(java.lang.String fitnessAlgorithm, java.lang.String precisionAlgorithm, java.lang.String generalizationAlgorithm, double fitnessThreshold, double precisionThreshold, double generalizationThreshold, boolean fitnessUpdateFlag, boolean precisionUpdateFlag, boolean generalizationUpdateFlag)
constraintPatternId:
- reference activity id + "-" + intermediary id + "-" + target activity idactivityCardinalityPairList
- public java.lang.Long searchBestSolutionBasedOnWeights(double fitnessWeight, double precisionWeight, double generalizationWeight)
constraintPatternId
- fitnessWeight:
- double in [0,1]precisionWeight:
- double in [0,1]generalizationWeight:
- double in [0,1]public void transformSolutionIntoPossibleVariantList(java.lang.Long solution, java.util.List<java.lang.String> modelVariantList)
solution
- An integer to indicate the solution e.g., 0b101010000modelVariantArray
- An array which contains the model variant flag, i.e., boolean values
(the first element corresponds to the first variant (0,0)), e.g., model = {true,false,true,false,true,false,false,false,false}public java.util.List<java.lang.String> transformSolutionIntoConstraintTypeList(java.lang.Long solution)
solution
- An integer to indicate the solutionminimalConstraintTypeList
- The minimal constraint type listpublic java.lang.String getPatternId()
public java.lang.String getPatternName()
public java.lang.String getPatternType()
public java.lang.String getReferenceActivityName()
public java.lang.String getReferenceActivityNodeId()
public java.lang.String getTargetActivityName()
public java.lang.String getTargetActivityNodeId()
public java.lang.String getSourceClassName()
public java.lang.String getSourceClassNodeId()
public java.lang.String getTargetClassName()
public java.lang.String getTargetClassNodeId()
public java.lang.String getClassRelationshipName()
public java.lang.String getClassRelationshipEdgeId()
public java.lang.String getIntermediaryName()
public java.lang.String getIntermediaryId()
public java.util.Map<XOCEvent,java.util.List<XOCEvent>> getReferenceEventVSPrecedenceTargetEventListMap()
public java.util.Map<XOCEvent,java.util.List<XOCEvent>> getReferenceEventVSResposeTargetEventListMap()
public java.util.List<org.processmining.framework.util.Pair<java.lang.Integer,java.lang.Integer>> getPrecedenceAndResponsePairList()
public java.util.Map<java.lang.Long,java.lang.Double> getSolutionVSFitnessMap()
public java.util.Map<java.lang.Long,java.lang.Double> getSolutionVSPrecisionMap()
public java.util.Map<java.lang.Long,java.lang.Double> getSolutionVSGeneralizationMap()
public java.util.List<java.lang.String> getConstraintTypeList()
public static void main(java.lang.String[] args) throws java.lang.Exception
java.lang.Exception