Skip to content
Snippets Groups Projects
Commit 776e581b authored by Sebastian Ebert's avatar Sebastian Ebert
Browse files

fixed net id bug

parent af5a71fd
No related branches found
No related tags found
No related merge requests found
...@@ -23,7 +23,7 @@ public class Main { ...@@ -23,7 +23,7 @@ public class Main {
return; return;
} }
// List<PetriNet> petriNets = PnmlParser.parsePnml("pnml-relast-splitter/src/main/nets/topicTest1.pnml"); // List<PetriNet> petriNets = PnmlParser.parsePnml("src/main/nets/topicTest1.pnml");
List<PetriNet> petriNets = PnmlParser.parsePnml(inputPath); List<PetriNet> petriNets = PnmlParser.parsePnml(inputPath);
List<List<PetriNet>> disconnectedPetriNets = new ArrayList<>(); List<List<PetriNet>> disconnectedPetriNets = new ArrayList<>();
......
...@@ -46,12 +46,15 @@ public class GlobalToLocalNetsPostProcessor implements PostProcessor<PetriNet> { ...@@ -46,12 +46,15 @@ public class GlobalToLocalNetsPostProcessor implements PostProcessor<PetriNet> {
// serialize for deep copy // serialize for deep copy
String serializedNetPath = PnmlExporter.serializeToPnmlFile(serviceCuttedNet, "-pre-split.pnml"); String serializedNetPath = PnmlExporter.serializeToPnmlFile(serviceCuttedNet, "-pre-split.pnml");
int netSuffix = 0;
// filter deep copy elements by location // filter deep copy elements by location
for (String location : locations) { for (String location : locations) {
List<PetriNet> reParsedPetriNets = PnmlParser.parsePnml(serializedNetPath); List<PetriNet> reParsedPetriNets = PnmlParser.parsePnml(serializedNetPath);
for (PetriNet pn : reParsedPetriNets) { for (PetriNet pn : reParsedPetriNets) {
PetriNet separatedNet = createdSeparatedNetByLocation(pn, location); PetriNet separatedNet = createdSeparatedNetByLocation(pn, location);
separatedNet.setId(separatedNet.getType() + "-" + netSuffix);
pns.add(separatedNet); pns.add(separatedNet);
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment