Package org.woped.core.model.petrinet

Examples of org.woped.core.model.petrinet.AbstractPetriNetElementModel


        // Add the temporary transition 't*'
        // and consider it as another transition
        // This is necessary to detect
        // handles in the short-circuited net
        AbstractPetriNetElementModel tStar = addTStar();
        HashSet<AbstractPetriNetElementModel> transitionsWithTStar = new HashSet<AbstractPetriNetElementModel>(m_transitions);
        transitionsWithTStar.add(tStar);

        // Detect all PT handles in the short-circuited net
        LowLevelNet myNet = CreateFlowNet(m_places, transitionsWithTStar);
View Full Code Here


        // Add the temporary transition 't*'
        // and consider it as another transition
        // This is necessary to detect
        // handles in the short-circuited net
        AbstractPetriNetElementModel tStar = addTStar();
        HashSet<AbstractPetriNetElementModel> transitionsWithTStar = new HashSet<AbstractPetriNetElementModel>(m_transitions);
        transitionsWithTStar.add(tStar);

        // Detect all PT handles in the short-circuited net
        LowLevelNet myNet = CreateFlowNet(m_places, transitionsWithTStar);
View Full Code Here

    private void AddOutgoingArcs(LowLevelNet lolnet, AbstractPetriNetElementModel i) {
        Set<AbstractPetriNetElementModel> successors = NetAlgorithms.getDirectlyConnectedNodes(i,
                NetAlgorithms.connectionTypeOUTBOUND);
        FlowNode source = lolnet.getNodeForElement(i, false);
        for (Iterator<AbstractPetriNetElementModel> s = successors.iterator(); s.hasNext();) {
            AbstractPetriNetElementModel t = s.next();
            FlowNode target = lolnet.getNodeForElement(t, true);

            lolnet.addArc(source, target);
        }
    }
View Full Code Here

    private void AddAalstNetOutgoingArcs(LowLevelNet lolnet, AbstractPetriNetElementModel i) {
        Map<String, AbstractPetriNetElementModel> successors = this.m_currentEditor.getModelProcessor().getElementContainer()
                .getTargetElements(i.getId());
        FlowNode source = lolnet.getNodeForElement(i, false);
        for (Iterator<Map.Entry<String, AbstractPetriNetElementModel>> s = successors.entrySet().iterator(); s.hasNext();) {
            AbstractPetriNetElementModel t = s.next().getValue();
            FlowNode target = lolnet.getNodeForElement(t, true);

            lolnet.addArc(source, target);
        }
    }
View Full Code Here

        Set<Set<ClusterElement>> result = new HashSet<Set<ClusterElement>>();

        Iterator<AbstractPetriNetElementModel> i = firstNodeType.iterator();
        long time1 = System.nanoTime();
        while (i.hasNext()) {
            AbstractPetriNetElementModel firstNode = i.next();
            if (useVanDerAalstModel) {
                Map<String, AbstractPetriNetElementModel> elementMapRef = m_currentEditor.getModelProcessor()
                        .getElementContainer().getSourceElements(firstNode.getId());
                arcConfig.m_numIncoming = (elementMapRef != null) ? elementMapRef.size() : 0;
                elementMapRef = m_currentEditor.getModelProcessor().getElementContainer().getTargetElements(
                        firstNode.getId());
                arcConfig.m_numOutgoing = (elementMapRef != null) ? elementMapRef.size() : 0;
            } else {
                NetAlgorithms.getArcConfiguration(firstNode, arcConfig);
            }
            if (arcConfig.m_numOutgoing > 1) {
                Iterator<AbstractPetriNetElementModel> j = secondNodeType.iterator();
                while (j.hasNext()) {
                    AbstractPetriNetElementModel secondNode = j.next();
                    if (useVanDerAalstModel) {
                        Map<String, AbstractPetriNetElementModel> elementMapRef = m_currentEditor.getModelProcessor()
                                .getElementContainer().getSourceElements(secondNode.getId());
                        arcConfig.m_numIncoming = (elementMapRef != null) ? elementMapRef.size() : 0;
                        elementMapRef = m_currentEditor.getModelProcessor().getElementContainer().getTargetElements(
                                secondNode.getId());
                        arcConfig.m_numOutgoing = (elementMapRef != null) ? elementMapRef.size() : 0;
                    } else {
                        NetAlgorithms.getArcConfiguration(secondNode, arcConfig);
                    }
View Full Code Here

        // Add the temporary transition 't*'
        // and consider it as another transition
        // This is necessary to detect
        // handles in the short-circuited net
        AbstractPetriNetElementModel tStar = addTStar();
        HashSet<AbstractPetriNetElementModel> transitionsWithTStar = new HashSet<AbstractPetriNetElementModel>(m_transitions);
        transitionsWithTStar.add(tStar);

        LowLevelNet myNet = useVanDerAalstNet ? CreateAalstFlowNet() : CreateFlowNet(m_places, transitionsWithTStar);
        detectHandles(myNet, useVanDerAalstNet);
View Full Code Here

  public void cleanHiglights() {
    IEditor editor = sideBar.getEditor();
    Iterator<AbstractPetriNetElementModel> i = editor.getModelProcessor()
        .getElementContainer().getRootElements().iterator();
    while (i.hasNext()) {
      AbstractPetriNetElementModel current = (AbstractPetriNetElementModel) i.next();
      current.setHighlighted(false);
    }
    editor.getGraph().repaint();
  }
View Full Code Here

    // but not yet with the real name
    super(displayString);

    while (elementIterator.hasNext()) {
      try {
        AbstractPetriNetElementModel current = (AbstractPetriNetElementModel) elementIterator.next();
        add(new NodeNetInfo(current, false));
      } catch (ClassCastException e) {
        // Ignore all nodes that are not at least AbstractElementModel
      }
    }
View Full Code Here

      ModelElementContainer simpleTransContainer = operator.getSimpleTransContainer();
      // Recursively call ourselves to add inner nodes
      Iterator<AbstractPetriNetElementModel> innerIterator = simpleTransContainer.getRootElements().iterator();
      while (innerIterator.hasNext()) {
        try {
          AbstractPetriNetElementModel current = (AbstractPetriNetElementModel) innerIterator.next();
          AbstractPetriNetElementModel owningElement = current.getRootOwningContainer().getOwningElement();
          if ((owningElement != null)
              && (operator.equals(current.getRootOwningContainer().getOwningElement())))
            add(new NodeNetInfo(current, true));
        } catch (ClassCastException e) {
          // Ignore all nodes that are not at least
View Full Code Here

    StringBuffer result = new StringBuffer();
    Iterator<AbstractPetriNetElementModel> relevantNodes = NetAlgorithms.getDirectlyConnectedNodes(node, connectionType).iterator();
    int nodeHierarchyLevel = node.getHierarchyLevel();
    boolean isFirst = true;
    while (relevantNodes.hasNext()) {
      AbstractPetriNetElementModel currentNode = (AbstractPetriNetElementModel) relevantNodes.next();
      // If superOnly is specified
      // only nodes that are contained in the next lower level container
      // are relevant for us
      if ((!superOnly) || (currentNode.getHierarchyLevel() < nodeHierarchyLevel)) {
        if (isFirst)
          isFirst = false;
        else
          result.append(", ");
        String currentNodeName = currentNode.getNameValue();
        result.append((currentNodeName != null) ? currentNodeName : currentNode.getId());
      }
    }
    if (result.length() > 0)
      result = new StringBuffer("(" + result.toString() + ")");
    return result.toString();
View Full Code Here

TOP

Related Classes of org.woped.core.model.petrinet.AbstractPetriNetElementModel

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.