Package org.woped.qualanalysis.soundness.datamodel

Examples of org.woped.qualanalysis.soundness.datamodel.TransitionNode


                break;
              }
            }
        
            // add current transition node
            TransitionNode tNode;
            if (opTrans != null && opTrans.getType() == TransitionModel.TRANS_OPERATOR_TYPE) {
              tNode = lNet.getTransitionNode(new TransitionNode(tm.getId(), tm.getNameValue(),
                    makeOriginId(tm.getId()), ((OperatorTransitionModel)opTrans).getOperatorType()));
            }
            else {
              tNode = lNet.getTransitionNode(new TransitionNode(tm.getId(), tm.getNameValue(),
                    makeOriginId(tm.getId()), OperatorTransitionModel.TRANS_SIMPLE_TYPE));
            }

            // add predecessor of current transition node
            for (AbstractPetriNetElementModel predecessor : predecessors) {
                lNet.getPlaceNode(
                        new PlaceNode(((PlaceModel) predecessor).getTokenCount(), ((PlaceModel) predecessor)
                                .getVirtualTokenCount(), predecessor.getId(), predecessor.getNameValue(),
                                makeOriginId(predecessor.getId()))).addPostNode(tNode);
            }

            // add successor of current transition node
            for (AbstractPetriNetElementModel successor : successors) {
                tNode.addPostNode(lNet.getPlaceNode(new PlaceNode(((PlaceModel) successor).getTokenCount(),
                        ((PlaceModel) successor).getVirtualTokenCount(), successor.getId(), successor.getNameValue(),
                        makeOriginId(successor.getId()))));
            }

        }
View Full Code Here


        PlaceNode p2 = lowlevelNet.getPlaceNode(new PlaceNode(0, 0, "p2", null, null));
        PlaceNode p3 = lowlevelNet.getPlaceNode(new PlaceNode(0, 0, "p3", null, null));
        PlaceNode p4 = lowlevelNet.getPlaceNode(new PlaceNode(0, 0, "p4", null, null));
        PlaceNode p5 = lowlevelNet.getPlaceNode(new PlaceNode(0, 0, "p5", null, null));

        TransitionNode t1 = lowlevelNet.getTransitionNode(new TransitionNode("t1", null, null,0));
        TransitionNode t2 = lowlevelNet.getTransitionNode(new TransitionNode("t2", null, null,0));
        TransitionNode t3 = lowlevelNet.getTransitionNode(new TransitionNode("t3", null, null,0));

        p1.addPostNode(t1);
        t1.addPostNode(p2);
        t1.addPostNode(p3);
        p2.addPostNode(t2);
        t2.addPostNode(p4);
        p3.addPostNode(t3);
        p4.addPostNode(t3);
        t3.addPostNode(p5);

        return lowlevelNet;

    }
View Full Code Here

  public void testGetSwitchableTransitions() {
    TransitionNode[] transitions = new TransitionNode[4];
    Set<TransitionNode> expected = new HashSet<TransitionNode>();
   
//    Create expected values
    transitions[0] = new TransitionNode("t3", "t3", "t3", OperatorTransitionModel.TRANS_SIMPLE_TYPE);
    transitions[1] = new TransitionNode("t2", "t2", "t2", OperatorTransitionModel.TRANS_SIMPLE_TYPE);
    transitions[2] = new TransitionNode("t1", "t1", "t1", OperatorTransitionModel.TRANS_SIMPLE_TYPE);
    transitions[3] = new TransitionNode("t*", "t*", "t*", OperatorTransitionModel.TRANS_SIMPLE_TYPE);
    for(int i = 0; i < transitions.length; i++)
      expected.add(transitions[i]);
   
//    Run test
    Set<TransitionNode> actual = deadTransition.getSwitchableTransitions();
View Full Code Here

    places[0] new PlaceNode(0, 0, "p3", "p3", "p3");
    places[1] new PlaceNode(1, 1, "p1", "p1", "p1");
    places[2] new PlaceNode(0, 0, "p2", "p2", "p2");
   
//    Create transitions
    transitions[0] = new TransitionNode("t3", "t3", "t3", OperatorTransitionModel.TRANS_SIMPLE_TYPE);
    transitions[1] = new TransitionNode("t2", "t2", "t2", OperatorTransitionModel.TRANS_SIMPLE_TYPE);
    transitions[2] = new TransitionNode("t1", "t1", "t1", OperatorTransitionModel.TRANS_SIMPLE_TYPE);
    transitions[3] = new TransitionNode("t*", "t*", "t*", OperatorTransitionModel.TRANS_SIMPLE_TYPE);
   
//    Create post- and preNode entries
    places[2].addPostNode(transitions[1]);
    transitions[1].addPreNode(places[2]);
    transitions[1].addPostNode(places[0]);
View Full Code Here

    places[0] new PlaceNode(0, 0, "p3", "p3", "p3");
    places[1] new PlaceNode(1, 1, "p1", "p1", "p1");
    places[2] new PlaceNode(0, 0, "p2", "p2", "p2");
   
//    Create transitions
    transitions[0] = new TransitionNode("t3", "t3", "t3", OperatorTransitionModel.TRANS_SIMPLE_TYPE);
    transitions[1] = new TransitionNode("t2", "t2", "t2", OperatorTransitionModel.TRANS_SIMPLE_TYPE);
    transitions[2] = new TransitionNode("t1", "t1", "t1", OperatorTransitionModel.TRANS_SIMPLE_TYPE);
   
//    Create post- and preNode entries
    places[2].addPostNode(transitions[1]);
    transitions[1].addPreNode(places[2]);
    transitions[1].addPostNode(places[0]);
View Full Code Here

TOP

Related Classes of org.woped.qualanalysis.soundness.datamodel.TransitionNode

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.