public void AlignmentOnLogEasy() { // Arrange ImportedEventLog elog = CSVImport.MakeDataFrame(heuristicCsv); elog.SetActivity("act"); elog.SetCaseId("id"); WorkflowLog wlog = new WorkflowLog(elog); var pNet = CNetUtils.ConvertCNetToPetriNet(HeuristicMiner.MineCNet(wlog)); // Act AlignmentOnLog alignment = new AlignmentOnLog(wlog, pNet); // Assert Assert.IsTrue(alignment.Fitness >= 0.96); Assert.AreEqual(wlog.GetTracesWithOccurrence().Count, alignment.AlignmentsOnLog.Count); }
public void AlignmentOnLogHardCustomSettings() { // Arrange ImportedEventLog elog = CSVImport.MakeDataFrame(hardCsv); elog.SetActivity("act"); elog.SetCaseId("id"); WorkflowLog wlog = new WorkflowLog(elog); var pNet = CNetUtils.ConvertCNetToPetriNet(HeuristicMiner.MineCNet(wlog, new HeuristicMinerSettings() { L2LThreshold = 1 })); // Act AlignmentOnLog alignment = new AlignmentOnLog(wlog, pNet); // Assert // Now all traces doesn't fit, because L2L loop (B->C->B) is removed Assert.IsTrue(alignment.Fitness < 1); Assert.AreEqual(wlog.GetTracesWithOccurrence().Count, alignment.AlignmentsOnLog.Count); }