Skip to content

Commit

Permalink
change start and end
Browse files Browse the repository at this point in the history
change to single entry, single exit
  • Loading branch information
NourEldin-Ali committed Aug 20, 2024
1 parent 1bbf3e0 commit 46f1e32
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public class XESAnalyzer {
public static void main(String[] args) {
try {
// Start timing
String fileName = "S10";
String fileName = "S7";
String pathLog = "C:\\Users\\AliNourEldin\\Desktop\\da-bpmn\\generated-BPMN\\event_logs\\" + fileName + ".xes";
String outputpath = "C:\\Users\\AliNourEldin\\Desktop\\da-bpmn\\generated-BPMN\\our\\" + fileName + ".bpmn";
Double epsilom = 1.0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public class XESAnalyzerSplitMiner {
public static void main(String[] args) {
try {
// Start timing
String fileName = "M3";
String fileName = "M7";
String pathLog = "C:\\Users\\AliNourEldin\\Desktop\\da-bpmn\\generated-BPMN\\event_logs\\" + fileName + ".xes";
String outputpath = "C:\\Users\\AliNourEldin\\Desktop\\da-bpmn\\generated-BPMN\\our\\" + fileName + ".bpmn";
Double epsilom = 1.0;
Expand All @@ -45,28 +45,36 @@ public static void main(String[] args) {
List<String> endActivities = new ArrayList<>(dependencyGraph.endActivities);
dependencyGraph.startActivities.clear();
dependencyGraph.endActivities.clear();
String startEvent = "start" ;
dependencyGraph.addVertex(startEvent);
dependencyGraph.elementInformations.put(startEvent, new HashMap<String, String>() {{
put("type", "start");
}});
dependencyGraph.elementsName.put(startEvent.trim(), startEvent);

for (String str : startActivities) {
String startEvent = "start_" + str;
dependencyGraph.addVertex(startEvent);
dependencyGraph.addEdge(startEvent, str);
dependencyGraph.elementInformations.put(startEvent, new HashMap<String, String>() {{
put("type", "start");
}});
dependencyGraph.elementsName.put(startEvent.trim(), startEvent);
dependencyGraph.startActivities.add(startEvent);
}

startActivities.clear();
startActivities.add(startEvent);
dependencyGraph.startActivities.add(startEvent);


String endEvent = "end";
dependencyGraph.addVertex(endEvent);
dependencyGraph.elementInformations.put(endEvent, new HashMap<String, String>() {{
put("type", "end");
}});
dependencyGraph.elementsName.put(endEvent.trim(), endEvent);
dependencyGraph.endActivities.add(endEvent);

for (String str : endActivities) {
dependencyGraph.addEdge(str, endEvent);
dependencyGraph.endActivities.remove(str);
// dependencyGraph.endActivities.remove(str);
}
endActivities.clear();
endActivities.add(endEvent);
dependencyGraph.endActivities.add(endEvent);

// for (String end : endActivities) {
// String endEvent = "end_" + end;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -718,15 +718,15 @@ public void changeVertexNameToRegex() {
for (String v : vertix) {
changeVertexName(dependencyGraph, v, regex(v));
changeVertexName(dependencyGraphWithLoop, v, regex(v));
if (elementInformations.containsKey(v)) {
if (elementInformations.containsKey(v) && !regex(v).contentEquals(v)) {
elementInformations.put(regex(v), elementInformations.get(v));
elementInformations.remove(v);
}

elementsName.put(regex(v), elementsName.get(v));
if (!regex(v).contentEquals(v)) {
elementsName.remove(v);
}

}
regex(startActivities);
regex(endActivities);
Expand Down

0 comments on commit 46f1e32

Please sign in to comment.