@SuppressWarnings("unused") private void addArc(CustomedTransition t, CustomedPlace p) { TransitionToPlace arc = new TransitionToPlace(); arc.p = p; arc.t = t; this.ttpList.put(String.valueOf(t.getId()) + "," + String.valueOf(p.getId()), arc); }
private void updateLastActivePlace(CustomedPlace p) { if (lastActivePlace != null) { lastActivePlace.setInvalid(false); // 把输入弧置为invalid Set<String> pSet = ttpList.keySet(); for (Iterator<String> it = pSet.iterator(); it.hasNext(); ) { String id = (String) it.next(); String idArray[] = id.split(","); if (null != idArray && idArray.length > 1 && null != idArray[1] && idArray[1].equals(String.valueOf(lastActivePlace.getId()))) { TransitionToPlace ttp = ttpList.get(id); if (ttp != null) ttp.invalid = true; } } // 把输出弧置为invalid pSet = pttList.keySet(); for (Iterator<String> it = pSet.iterator(); it.hasNext(); ) { String id = (String) it.next(); String idArray[] = id.split(","); if (null != idArray && idArray.length > 1 && null != idArray[0] && idArray[0].equals(String.valueOf(lastActivePlace.getId()))) { PlaceToTransition ptt = pttList.get(id); if (ptt != null) ptt.invalid = true; } } } lastActivePlace = p; }
private void addArc(CustomedTransition t, CustomedPlace p, CustomedCondition c) { TransitionToPlace arc = new TransitionToPlace(); arc.con = c; arc.p = p; arc.t = t; p.addInArc(arc); this.ttpList.put(String.valueOf(t.getId()) + "," + String.valueOf(p.getId()), arc); }