Example #1
0
        /// <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]);
Example #2
0
        /// <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();
        }
Example #3
0
 public MatrixBase(WorkflowLog log)
 {
     StartActivities = new HashSet <string>();
     EndActivities   = new HashSet <string>();
     Activities      = new List <string>();
     ActivityIndices = new Dictionary <string, int>();
     FillActivities(log.WorkflowTraces);
 }
Example #4
0
 /// <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);
 }
Example #5
0
        /// <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");
                }
            }
        }
Example #6
0
 /// <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);
 }