13
12
import javax.xml.parsers.DocumentBuilderFactory;
14
13
import javax.xml.parsers.ParserConfigurationException;
15
import dk.aau.cs.debug.Logger;
16
import dk.aau.cs.model.tapn.Colored.*;
17
import dk.aau.cs.model.tapn.Colored.Color;
18
import dk.aau.cs.model.tapn.Colored.Expressions.ArcExpression;
19
import dk.aau.cs.model.tapn.Colored.Expressions.ExpressionContext;
20
import dk.aau.cs.model.tapn.Colored.Expressions.GuardExpression;
16
21
import org.w3c.dom.Document;
17
22
import org.w3c.dom.Element;
18
23
import org.w3c.dom.Node;
35
40
import pipe.gui.graphicElements.Place;
36
41
import pipe.gui.graphicElements.PlaceTransitionObject;
37
42
import pipe.gui.graphicElements.Transition;
43
import pipe.gui.graphicElements.cpn.*;
38
44
import pipe.gui.graphicElements.tapn.TimedInhibitorArcComponent;
39
45
import pipe.gui.graphicElements.tapn.TimedInputArcComponent;
40
46
import pipe.gui.graphicElements.tapn.TimedOutputArcComponent;
73
79
import dk.aau.cs.model.tapn.Weight;
74
80
import dk.aau.cs.util.FormatException;
75
81
import dk.aau.cs.util.Require;
82
import sun.rmi.runtime.Log;
77
84
public class TapnXmlLoader {
78
85
private static final String PLACENAME_ERROR_MESSAGE = "The keywords \"true\" and \"false\" are reserved and can not be used as place names.\nPlaces with these names will be renamed to \"_true\" and \"_false\" respectively.\n\n Note that any queries using these places may not be parsed correctly.";
79
private HashMap<TimedTransitionComponent, TimedTransportArcComponent> presetArcs = new HashMap<TimedTransitionComponent, TimedTransportArcComponent>();;
86
private HashMap<TimedTransitionComponent, TimedTransportArcComponent> presetArcs = new HashMap<TimedTransitionComponent, TimedTransportArcComponent>();
80
87
private HashMap<TimedTransitionComponent, TimedTransportArcComponent> postsetArcs = new HashMap<TimedTransitionComponent, TimedTransportArcComponent>();
81
88
private HashMap<TimedTransportArcComponent, TimeInterval> transportArcsTimeIntervals = new HashMap<TimedTransportArcComponent, TimeInterval>();
89
private HashMap<ColoredTransportArcComponent, List<ColoredTimeInterval>> coloredTransportArcsTimeIntervals = new HashMap<ColoredTransportArcComponent, List<ColoredTimeInterval>>();
90
private LoadTACPN loadTACPN = new LoadTACPN();
83
92
private DrawingSurfaceImpl drawingSurface;
84
93
private NameGenerator nameGenerator = new NameGenerator();
137
146
idResolver.clear();
139
148
ConstantStore constants = new ConstantStore(parseConstants(doc));
141
TimedArcPetriNetNetwork network = new TimedArcPetriNetNetwork(constants);
149
TimedArcPetriNetNetwork network;
150
if (doc.getElementsByTagName("net").item(0).getAttributes().getNamedItem("type").getNodeValue().equals("TACPN"))
151
network = new ColoredArcPetriNetNetwork(constants);
153
network = new TimedArcPetriNetNetwork(constants);
143
155
parseSharedPlaces(doc, network, constants);
144
156
parseSharedTransitions(doc, network);
261
277
guiModel = new DataLayer(NetType.TAPN);
263
279
Template template = new Template(tapn, guiModel, new Zoomer());
265
280
NodeList nodeList = tapnNode.getChildNodes();
266
281
for (int i = 0; i < nodeList.getLength(); i++) {
267
282
Node node = nodeList.item(i);
283
if (node instanceof Element) {
284
if (node.getNodeName().equals("declaration")) {
285
loadTACPN.parseDeclarations(node, tapn, template);
289
for (int i = 0; i < nodeList.getLength(); i++) {
290
Node node = nodeList.item(i);
268
291
if(node instanceof Element){
269
292
parseElement((Element)node, template, network, constants);
302
325
template.guiModel().addPetriNetObject(transition);
303
326
addListeners(transition, template);
304
327
} else if ("arc".equals(element.getNodeName())) {
305
parseAndAddArc(element, template, constants);
328
parseAndAddArc(element, template, constants, network);
398
421
if (nameInput.length() == 0 && idInput.length() > 0) {
399
422
nameInput = idInput;
424
GuardExpression guardExpr = null;
425
if (network.isColored()) {
426
Node conditionNode = PNMLoader.getFirstDirectChild(transition, "condition");
427
if (conditionNode != null) {
429
guardExpr = loadTACPN.parseGuardExpression(PNMLoader.getFirstDirectChild(conditionNode, "structure"));
430
} catch (FormatException e) {
436
if (network.isColored())
437
t = new ColoredTransition(nameInput, guardExpr);
439
t = new TimedTransition(nameInput);
403
TimedTransition t = new TimedTransition(nameInput);
404
441
t.setUrgent(isUrgent);
405
442
if(network.isNameUsedForShared(nameInput)){
406
443
t.setName(nameGenerator.getNewTransitionName(tapn)); // introduce temporary name to avoid exceptions
412
449
nameGenerator.updateIndicesForAllModels(nameInput);
413
TimedTransitionComponent transitionComponent = new TimedTransitionComponent(
414
positionXInput, positionYInput, idInput, nameInput,
415
nameOffsetXInput, nameOffsetYInput, true,
416
infiniteServer, angle, priority);
450
TimedTransitionComponent transitionComponent;
451
if (network.isColored())
452
transitionComponent = new ColoredTransitionComponent(positionXInput, positionYInput, idInput, nameInput,
453
nameOffsetXInput, nameOffsetYInput,
454
true, infiniteServer, angle, priority);
456
transitionComponent = new TimedTransitionComponent(
457
positionXInput, positionYInput, idInput, nameInput,
458
nameOffsetXInput, nameOffsetYInput, true,
459
infiniteServer, angle, priority);
417
461
transitionComponent.setUnderlyingTransition(t);
419
464
if (!displayName){
420
465
transitionComponent.setAttributesVisible(false);
422
467
return transitionComponent;
470
private Pair<String, Vector<Color>> parseColorInvariant(Element colorinvariant, TimedArcPetriNetNetwork network) {
471
String inscription, colorTypeName;
472
Vector<Color> colors = new Vector<Color>();
473
Element colorTypeELe = (Element) colorinvariant.getElementsByTagName("colortype").item(0);
474
inscription = colorinvariant.getElementsByTagName("inscription").item(0).getAttributes().getNamedItem("inscription").getNodeValue();
475
colorTypeName = colorTypeELe.getAttributes().getNamedItem("name").getNodeValue();
476
if (network.isNameUsedForColorType(colorTypeName)) {
477
NodeList colorNodeList = colorTypeELe.getElementsByTagName("color");
479
ColorType ct = network.getColorTypeByName(colorTypeName);
480
for (int i = 0; i < colorNodeList.getLength(); i++) {
481
colorName = colorNodeList.item(i).getAttributes().getNamedItem("value").getNodeValue();
482
colors.add(new Color(ct, 0, colorName));
486
throw new FormatException("The color type used for an invariant does not exist");
487
} catch (FormatException e) {
492
Pair<String, Vector<Color>> pair = new Pair<String, Vector<Color>>(inscription, colors);
425
496
private TimedPlaceComponent parsePlace(Element place, TimedArcPetriNetNetwork network, TimedArcPetriNet tapn, ConstantStore constants) {
426
497
double positionXInput = Double.parseDouble(place.getAttribute("positionX"));
427
498
double positionYInput = Double.parseDouble(place.getAttribute("positionY"));
453
524
firstPlaceRenameWarning = false;
527
List<ColoredTimeInvariant> ctiList = new ArrayList<ColoredTimeInvariant>();
528
ColorType ct = ColorType.COLORTYPE_DOT;
529
Point position = new Point(0,0);
530
ArcExpression colorMarking = null;
531
if (network.isColored()) {
532
NodeList nodes = place.getElementsByTagName("colorinvariant");
534
for (int i = 0; i < nodes.getLength(); i++) {
535
Pair<String, Vector<Color>> pair = parseColorInvariant((Element) nodes.item(i), network);
536
ColoredTimeInvariant cti = ColoredTimeInvariant.parse(pair.getFirst(), constants, pair.getSecond());
540
ctiList.add(ColoredTimeInvariant.parse(place.getAttribute("inscription"), constants, new Vector<Color>(){{add(Color.STAR_COLOR);}}));
541
Node hlInitialMarkingNode = place.getElementsByTagName("hlinitialMarking").item(0);
542
Node typeNode = place.getElementsByTagName("type").item(0);
543
if (typeNode != null) {
545
ct = loadTACPN.parseUserSort(typeNode);
546
} catch (FormatException e) {
551
if (hlInitialMarkingNode != null && hlInitialMarkingNode instanceof Element) {
552
Element graphics =(Element) ((Element)hlInitialMarkingNode).getElementsByTagName("graphics").item(0);
553
position = loadTACPN.parseGraphics(graphics, PNMLoader.GraphicsType.Offset);
555
colorMarking = loadTACPN.parseArcExpression(((Element)hlInitialMarkingNode).getElementsByTagName("structure").item(0));
556
} catch (FormatException e) {
457
563
idResolver.add(tapn.name(), idInput, nameInput);
461
567
p = network.getSharedPlaceByName(nameInput);
464
p = new LocalTimedPlace(nameInput, TimeInvariant.parse(invariant, constants));
466
for (int i = 0; i < initialMarkingInput; i++) {
467
network.marking().add(new TimedToken(p));
570
if (network.isColored()) {
571
p = new LocalColoredPlace(nameInput, ct);
573
((LocalColoredPlace)p).setCtiList(ctiList);
575
if (colorMarking != null) {
576
ExpressionContext context = new ExpressionContext(new HashMap<String, Color>(), loadTACPN.getColortypes());
577
ColorMultiset cm = colorMarking.eval(context);
578
for (ColoredToken ctElement : cm.getTokens(p)) {
579
network.marking().add(ctElement);
580
//p.addToken(ctElement);
584
p = new LocalTimedPlace(nameInput, TimeInvariant.parse(invariant, constants));
586
for (int i = 0; i < initialMarkingInput; i++) {
587
network.marking().add(new TimedToken(p));
591
TimedPlaceComponent placeComponent;
470
592
nameGenerator.updateIndicesForAllModels(nameInput);
471
TimedPlaceComponent placeComponent = new TimedPlaceComponent(positionXInput, positionYInput, idInput, nameInput, nameOffsetXInput, nameOffsetYInput, initialMarkingInput, markingOffsetXInput, markingOffsetYInput, 0);
593
if (network.isColored())
594
placeComponent = new ColoredPlaceComponent(positionXInput, positionYInput, idInput, nameInput, nameOffsetXInput, nameOffsetYInput, position.x, position.y);
596
placeComponent = new TimedPlaceComponent(positionXInput, positionYInput, idInput, nameInput, nameOffsetXInput, nameOffsetYInput, initialMarkingInput, markingOffsetXInput, markingOffsetYInput, 0);
472
598
placeComponent.setUnderlyingPlace(p);
474
600
if (!displayName){
478
604
return placeComponent;
481
private void parseAndAddArc(Element arc, Template template, ConstantStore constants) throws FormatException {
607
private void parseAndAddArc(Element arc, Template template, ConstantStore constants, TimedArcPetriNetNetwork network) throws FormatException {
482
608
String idInput = arc.getAttribute("id");
483
609
String sourceInput = arc.getAttribute("source");
484
610
String targetInput = arc.getAttribute("target");
516
642
weight = Weight.parseWeight(arc.getAttribute("weight"), constants);
645
ArcExpression arcExpr = null;
646
List<ColoredTimeInterval> ctiList = new ArrayList<ColoredTimeInterval>();
647
if (network.isColored()) {
648
Node hlInscription = PNMLoader.getFirstDirectChild(arc, "hlinscription");
649
if (hlInscription != null)
650
hlInscription = PNMLoader.getFirstDirectChild(hlInscription, "structure");
651
if (hlInscription != null)
652
arcExpr = loadTACPN.parseArcExpression(hlInscription);
654
NodeList intervalNodes = arc.getElementsByTagName("colorinterval");
655
if (intervalNodes != null) {
656
for (int i = 0; i < intervalNodes.getLength(); i++) {
657
if (intervalNodes.item(i) instanceof Element) {
658
Element interval = (Element) intervalNodes.item(i);
659
Pair<String, Vector<Color>> pair = parseColorInvariant(interval, network);
660
ColoredTimeInterval coloredinterval = ColoredTimeInterval.parse(pair.getFirst(), constants, pair.getSecond());
661
ctiList.add(coloredinterval);
521
669
if (type.equals("tapnInhibitor")) {
523
670
tempArc = parseAndAddTimedInhibitorArc(idInput, taggedArc,
524
671
inscriptionTempStorage, sourceIn, targetIn, _startx,
525
672
_starty, _endx, _endy,template, constants, weight);
528
675
if (type.equals("timed")) {
529
676
tempArc = parseAndAddTimedInputArc(idInput, taggedArc,
530
677
inscriptionTempStorage, sourceIn, targetIn, _startx,
531
_starty, _endx, _endy, template, constants, weight);
678
_starty, _endx, _endy, template, constants, weight, network.isColored(), ctiList, arcExpr);
533
} else if (type.equals("transport")) {
680
} else if (type.equals("transport")) { // crashes here
534
681
tempArc = parseAndAddTransportArc(idInput, taggedArc,
535
682
inscriptionTempStorage, sourceIn, targetIn, _startx,
536
_starty, _endx, _endy, template, constants, weight);
683
_starty, _endx, _endy, template, constants, weight, arcExpr, network.isColored(), ctiList);
539
686
tempArc = parseAndAddTimedOutputArc(idInput, taggedArc,
540
687
inscriptionTempStorage, sourceIn, targetIn, _startx,
541
_starty, _endx, _endy, template, weight);
688
_starty, _endx, _endy, template, weight, arcExpr, network.isColored());
545
691
tempArc.setNameOffsetX(nameOffsetXInput);
546
692
tempArc.setNameOffsetY(nameOffsetYInput);
551
697
private TimedOutputArcComponent parseAndAddTimedOutputArc(String idInput, boolean taggedArc,
552
698
String inscriptionTempStorage, PlaceTransitionObject sourceIn,
553
699
PlaceTransitionObject targetIn, double _startx, double _starty,
554
double _endx, double _endy, Template template, Weight weight) throws FormatException {
556
TimedOutputArcComponent tempArc = new TimedOutputArcComponent(_startx, _starty, _endx, _endy,
700
double _endx, double _endy, Template template, Weight weight,
701
ArcExpression expr, boolean isColored) throws FormatException {
703
TimedOutputArcComponent tempArc;
706
tempArc = new TimedOutputArcComponent(_startx, _starty, _endx, _endy,
557
707
sourceIn, targetIn, (inscriptionTempStorage!="" ? Integer.valueOf(inscriptionTempStorage) : 1), idInput, taggedArc);
709
tempArc = new ColoredOutputArcComponent(_startx, _starty, _endx, _endy,
710
sourceIn, targetIn, weight.value(), expr, idInput, taggedArc);
559
712
TimedPlace place = template.model().getPlaceByName(targetIn.getName());
560
713
TimedTransition transition = template.model().getTransitionByName(sourceIn.getName());
562
TimedOutputArc outputArc = new TimedOutputArc(transition, place, weight);
715
TimedOutputArc outputArc;
717
outputArc = new TimedOutputArc(transition, place, weight);
719
outputArc = new ColoredOutputArc(transition, place, expr);
563
720
tempArc.setUnderlyingArc(outputArc);
565
722
if(template.model().hasArcFromTransitionToPlace(outputArc.source(),outputArc.destination())) {
578
735
private TimedTransportArcComponent parseAndAddTransportArc(String idInput, boolean taggedArc,
579
736
String inscriptionTempStorage, PlaceTransitionObject sourceIn,
580
737
PlaceTransitionObject targetIn, double _startx, double _starty,
581
double _endx, double _endy, Template template, ConstantStore constants, Weight weight) {
738
double _endx, double _endy, Template template, ConstantStore constants, Weight weight, ArcExpression expr, boolean isColored, List<ColoredTimeInterval> ctiList) {
584
741
String[] inscriptionSplit = {};
589
746
if (sourceIn instanceof Place) {
590
747
isInPreSet = true;
592
TimedTransportArcComponent tempArc = new TimedTransportArcComponent(new TimedInputArcComponent(
749
TimedTransportArcComponent tempArc;
751
tempArc = new TimedTransportArcComponent(new TimedInputArcComponent(
593
752
new TimedOutputArcComponent(_startx, _starty, _endx, _endy, sourceIn, targetIn, 1, idInput, taggedArc),
594
753
inscriptionSplit[0]), Integer.parseInt(inscriptionSplit[1]), isInPreSet);
755
tempArc = new ColoredTransportArcComponent(new ColoredInputArcComponent(
756
new ColoredOutputArcComponent(_startx, _starty, _endx, _endy, sourceIn, targetIn, 1, expr, idInput, taggedArc),
757
inscriptionTempStorage), weight.value(), isInPreSet);
596
759
sourceIn.addConnectFrom(tempArc);
597
760
targetIn.addConnectTo(tempArc);
599
762
if (isInPreSet) {
600
if (postsetArcs.containsKey((TimedTransitionComponent) targetIn)) {
601
TimedTransportArcComponent postsetTransportArc = postsetArcs.get((TimedTransitionComponent) targetIn);
763
TimeInterval interval;
765
interval = TimeInterval.parse(inscriptionSplit[0], constants);
767
interval = ColoredTimeInterval.parse(inscriptionTempStorage, constants, new Vector<Color>(){{add(Color.STAR_COLOR);}});
768
ctiList.add((ColoredTimeInterval) interval);
770
if (postsetArcs.containsKey(targetIn)) {
771
TimedTransportArcComponent postsetTransportArc = postsetArcs.get(targetIn);
602
772
TimedPlace sourcePlace = template.model().getPlaceByName(sourceIn.getName());
603
773
TimedTransition trans = template.model().getTransitionByName(targetIn.getName());
604
774
TimedPlace destPlace = template.model().getPlaceByName(postsetTransportArc.getTarget().getName());
605
TimeInterval interval = TimeInterval.parse(inscriptionSplit[0], constants);
607
778
assert (sourcePlace != null);
608
779
assert (trans != null);
609
780
assert (destPlace != null);
611
TransportArc transArc = new TransportArc(sourcePlace, trans, destPlace, interval, weight);
782
TransportArc transArc;
784
transArc = new TransportArc(sourcePlace, trans, destPlace, interval, weight);
786
transArc = new ColoredTransportArc(sourcePlace, trans, destPlace, ctiList);
613
788
tempArc.setUnderlyingArc(transArc);
614
789
postsetTransportArc.setUnderlyingArc(transArc);
621
796
postsetArcs.remove((TimedTransitionComponent) targetIn);
623
798
presetArcs.put((TimedTransitionComponent) targetIn, tempArc);
624
transportArcsTimeIntervals.put(tempArc, TimeInterval.parse(inscriptionSplit[0], constants));
800
coloredTransportArcsTimeIntervals.put((ColoredTransportArcComponent) tempArc, ctiList);
802
transportArcsTimeIntervals.put(tempArc, TimeInterval.parse(inscriptionSplit[0], constants)); //TODO:: exception crash
627
if (presetArcs.containsKey((TimedTransitionComponent) sourceIn)) {
628
TimedTransportArcComponent presetTransportArc = presetArcs.get((TimedTransitionComponent) sourceIn);
805
if (presetArcs.containsKey( sourceIn)) {
806
TimedTransportArcComponent presetTransportArc = presetArcs.get(sourceIn);
629
807
TimedPlace sourcePlace = template.model().getPlaceByName(presetTransportArc.getSource().getName());
630
808
TimedTransition trans = template.model().getTransitionByName(sourceIn.getName());
631
809
TimedPlace destPlace = template.model().getPlaceByName(targetIn.getName());
632
TimeInterval interval = transportArcsTimeIntervals.get(presetTransportArc);
810
Logger.log(coloredTransportArcsTimeIntervals.get(presetTransportArc));
811
TimeInterval interval = null;
812
List<ColoredTimeInterval> timeIntervals = null;
814
interval = transportArcsTimeIntervals.get(presetTransportArc);
816
timeIntervals = coloredTransportArcsTimeIntervals.get(presetTransportArc);
634
818
assert (sourcePlace != null);
635
819
assert (trans != null);
636
820
assert (destPlace != null);
638
TransportArc transArc = new TransportArc(sourcePlace, trans, destPlace, interval, weight);
822
TransportArc transArc;
824
transArc = new TransportArc(sourcePlace, trans, destPlace, interval, weight);
826
transArc = new ColoredTransportArc(sourcePlace, trans, destPlace, timeIntervals);
640
828
tempArc.setUnderlyingArc(transArc);
641
829
presetTransportArc.setUnderlyingArc(transArc);
657
845
private Arc parseAndAddTimedInputArc(String idInput, boolean taggedArc,
658
846
String inscriptionTempStorage, PlaceTransitionObject sourceIn,
659
847
PlaceTransitionObject targetIn, double _startx, double _starty,
660
double _endx, double _endy, Template template, ConstantStore constants, Weight weight) throws FormatException {
848
double _endx, double _endy, Template template, ConstantStore constants, Weight weight, boolean isColored, List<ColoredTimeInterval> ctiList, ArcExpression expr ) throws FormatException {
662
tempArc = new TimedInputArcComponent(new TimedOutputArcComponent(
852
tempArc = new TimedInputArcComponent(new TimedOutputArcComponent(
663
853
_startx, _starty, _endx, _endy, sourceIn, targetIn, 1, idInput,
665
855
(inscriptionTempStorage != null ? inscriptionTempStorage : ""));
857
tempArc = new ColoredInputArcComponent(new ColoredOutputArcComponent(_startx, _starty, _endx, _endy, sourceIn,
858
targetIn, 1, expr, idInput, taggedArc), inscriptionTempStorage);
667
860
TimedPlace place = template.model().getPlaceByName(sourceIn.getName());
668
861
TimedTransition transition = template.model().getTransitionByName(targetIn.getName());
669
TimeInterval interval = TimeInterval.parse(inscriptionTempStorage, constants);
671
TimedInputArc inputArc = new TimedInputArc(place, transition, interval, weight);
863
TimeInterval interval;
865
interval = TimeInterval.parse(inscriptionTempStorage, constants);
867
interval = ColoredTimeInterval.parse(inscriptionTempStorage, constants, new Vector<Color>(){{add(Color.STAR_COLOR);}});
868
ctiList.add((ColoredTimeInterval) interval);
874
TimedInputArc inputArc;
876
inputArc = new TimedInputArc(place, transition, interval, weight);
878
inputArc = new ColoredInputArc(place, transition, ctiList, expr);
672
880
((TimedInputArcComponent) tempArc).setUnderlyingArc(inputArc);
674
882
if(template.model().hasArcFromPlaceToTransition(inputArc.source(), inputArc.destination())) {
695
903
(inscriptionTempStorage != null ? inscriptionTempStorage : ""));
696
904
TimedPlace place = template.model().getPlaceByName(sourceIn.getName());
697
905
TimedTransition transition = template.model().getTransitionByName(targetIn.getName());
698
TimeInterval interval = TimeInterval.parse(inscriptionTempStorage, constants);
700
if(!interval.equals(TimeInterval.ZERO_INF) && firstInhibitorIntervalWarning) {
701
JOptionPane.showMessageDialog(CreateGui.getApp(), "The chosen model contained inhibitor arcs with unsupported intervals.\n\nTAPAAL only supports inhibitor arcs with intervals [0,inf).\n\nAny other interval on inhibitor arcs will be replaced with [0,inf).", "Unsupported Interval Detected on Inhibitor Arc", JOptionPane.INFORMATION_MESSAGE);
702
firstInhibitorIntervalWarning = false;
705
TimedInhibitorArc inhibArc = new TimedInhibitorArc(place, transition, interval, weight);
906
TimeInterval interval = null;
907
if (!inscriptionTempStorage.equals("")) {
908
interval = TimeInterval.parse(inscriptionTempStorage, constants);
910
if(!interval.equals(TimeInterval.ZERO_INF) && firstInhibitorIntervalWarning) {
911
JOptionPane.showMessageDialog(CreateGui.getApp(), "The chosen model contained inhibitor arcs with unsupported intervals.\n\nTAPAAL only supports inhibitor arcs with intervals [0,inf).\n\nAny other interval on inhibitor arcs will be replaced with [0,inf).", "Unsupported Interval Detected on Inhibitor Arc", JOptionPane.INFORMATION_MESSAGE);
912
firstInhibitorIntervalWarning = false;
916
TimedInhibitorArc inhibArc = new TimedInhibitorArc(place, transition, interval, weight);
707
918
tempArc.setUnderlyingArc(inhibArc);
708
919
template.guiModel().addPetriNetObject(tempArc);