/// <summary> /// Preprocess end activity /// </summary> /// <param name="workflowLog">Workflow log</param> private static void PreprocessEndActivity(WorkflowLog workflowLog) { var endActivities = new HashSet <string>(); foreach (var trace in workflowLog.WorkflowTraces) { endActivities.Add(trace.Activities[^ 1]);
/// <summary> /// Is used to create a full relation matrix based on WorkflowLog. /// </summary> /// <param name="log">A workflow log made from loaded data.</param> public RelationMatrix(WorkflowLog log) : base(log) { Footprint = new Relation[Activities.Count, Activities.Count]; FindSuccession(log.WorkflowTraces); UpdateRelations(); }
public MatrixBase(WorkflowLog log) { StartActivities = new HashSet <string>(); EndActivities = new HashSet <string>(); Activities = new List <string>(); ActivityIndices = new Dictionary <string, int>(); FillActivities(log.WorkflowTraces); }
/// <summary> /// Is used to create a full DirectlyFollowsMatrix matrix based on WorkflowLog. /// </summary> /// <param name="log">A workflow log made from loaded data.</param> public SuccessorMatrix(WorkflowLog log) : base(log) { DirectMatrix = new int[Activities.Count, Activities.Count]; L2LMatrix = new int[Activities.Count, Activities.Count]; LongDistanceMatrix = new int[Activities.Count, Activities.Count]; ActivityOccurrences = new int[Activities.Count]; ComputeDirectLongMatrix(log.WorkflowTraces); ComputeL2L(log.WorkflowTraces); }
/// <summary> /// Preprocess start activity /// </summary> /// <param name="workflowLog">Workflow log</param> private static void PreprocessStartActivity(WorkflowLog workflowLog) { var startActivities = new HashSet <string>(); foreach (var trace in workflowLog.WorkflowTraces) { startActivities.Add(trace.Activities[0]); } if (startActivities.Count == 1) { return; } { foreach (var trace in workflowLog.WorkflowTraces) { trace.Activities.Insert(0, "a_i"); } } }
/// <summary> /// Creates same start activity and end activity for each trace in the Workflow log /// </summary> /// <param name="workflowLog">Workflow log</param> public static void WorkflowLogPreprocessor(WorkflowLog workflowLog) { PreprocessStartActivity(workflowLog); PreprocessEndActivity(workflowLog); }