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

fixed bugs in simplified signal flattening

parent 5b257c96
Branches
No related tags found
No related merge requests found
...@@ -16,7 +16,7 @@ aspect SignalTransforms { ...@@ -16,7 +16,7 @@ aspect SignalTransforms {
for (DinerosTransition dt : entry.getValue()) { for (DinerosTransition dt : entry.getValue()) {
for (Place p : dt.incomingPlaces()) { for (Place p : dt.incomingPlaces()) {
if (!p.getId().startsWith(TemplateConstants.PD_PLACE_PREFIX)) { if (!p.getId().startsWith(TemplateConstants.PD_PLACE_PREFIX)) {
if (usageCount == 1) { if (usageCount == 0) {
System.out.println("[SignalPostProcessing] Creating new linkage between " + p.getId() + " and " + toTrue.getId()); System.out.println("[SignalPostProcessing] Creating new linkage between " + p.getId() + " and " + toTrue.getId());
TransformationUtils.createAndIncludeArc(this.getPage(0), p.getId() + "-to-" + toTrue.getId(), p, toTrue); TransformationUtils.createAndIncludeArc(this.getPage(0), p.getId() + "-to-" + toTrue.getId(), p, toTrue);
TransformationUtils.createAndIncludeArc(this.getPage(0), toTrue.getId() + "-to-" + p.getId(), toTrue, p); TransformationUtils.createAndIncludeArc(this.getPage(0), toTrue.getId() + "-to-" + p.getId(), toTrue, p);
...@@ -26,17 +26,18 @@ aspect SignalTransforms { ...@@ -26,17 +26,18 @@ aspect SignalTransforms {
TransformationUtils.createAndIncludeArc(this.getPage(0), toFalse.getId() + "-to-" + p.getId(), toFalse, p); TransformationUtils.createAndIncludeArc(this.getPage(0), toFalse.getId() + "-to-" + p.getId(), toFalse, p);
} else { } else {
DinerosTransition newToTrue = PrimitiveTemplates.getDinerosTransition(); DinerosTransition newToTrue = PrimitiveTemplates.getDinerosTransition();
newToTrue.setId(toTrue.getId() + "-" + usageCount); long millis = System.currentTimeMillis();
newToTrue.setId(toTrue.getId() + "-" + usageCount + "-" + millis);
newToTrue.getName().setText(newToTrue.getId()); newToTrue.getName().setText(newToTrue.getId());
DinerosTransition newToFalse = PrimitiveTemplates.getDinerosTransition(); DinerosTransition newToFalse = PrimitiveTemplates.getDinerosTransition();
newToFalse.setId(toFalse.getId() + "-" + usageCount); newToFalse.setId(toFalse.getId() + "-" + usageCount + "-" + millis);
newToFalse.getName().setText(newToFalse.getId()); newToFalse.getName().setText(newToFalse.getId());
this.getPage(0).addObject(newToTrue); this.getPage(0).addObject(newToTrue);
this.getPage(0).addObject(newToFalse); this.getPage(0).addObject(newToFalse);
TransformationUtils.createAndIncludeArc(this.getPage(0), placeTrue.getId() + "-to-" + newToFalse.getId(), placeTrue, newToFalse); TransformationUtils.createAndIncludeArc(this.getPage(0), placeTrue.getId() + "-to-" + newToFalse.getId(), placeTrue, newToFalse);
TransformationUtils.createAndIncludeArc(this.getPage(0), newToFalse.getId() + "-to-" + placeFalse.getId(), toFalse, placeFalse); TransformationUtils.createAndIncludeArc(this.getPage(0), newToFalse.getId() + "-to-" + placeFalse.getId(), newToFalse, placeFalse);
TransformationUtils.createAndIncludeArc(this.getPage(0), placeFalse.getId() + "-to-" + newToTrue.getId(), placeFalse, newToTrue); TransformationUtils.createAndIncludeArc(this.getPage(0), placeFalse.getId() + "-to-" + newToTrue.getId(), placeFalse, newToTrue);
TransformationUtils.createAndIncludeArc(this.getPage(0), newToTrue.getId() + "-to-" + placeTrue.getId(), toTrue, placeTrue); TransformationUtils.createAndIncludeArc(this.getPage(0), newToTrue.getId() + "-to-" + placeTrue.getId(), newToTrue, placeTrue);
System.out.println("[SignalPostProcessing] Creating new linkage between " + p.getId() + " and " + newToTrue.getId()); System.out.println("[SignalPostProcessing] Creating new linkage between " + p.getId() + " and " + newToTrue.getId());
TransformationUtils.createAndIncludeArc(this.getPage(0), p.getId() + "-to-" + newToTrue.getId(), p, newToTrue); TransformationUtils.createAndIncludeArc(this.getPage(0), p.getId() + "-to-" + newToTrue.getId(), p, newToTrue);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment