}
// rekursive Funktion mit Breitensuche
private void runThroughNet(LinkedList<NodePair> q) {
if (!(q.isEmpty())) {
NodePair np = q.removeFirst();
for (Arc a : np.getFirst().getSuccessor()) {
Node m = a.getTarget();
if (!m.isJoinReached()) {
double val = a.getProbability() * np.getSecond().getTempRuns();
if (!(val < epsilon)) {
Node y = new Node(m.getId(), m.getName());
y.setTempRuns(val);
m.incIteration();
y.setIteration(m.getIteration());
if (m.isAndJoin())
m.setJoinReached(true);
np.getSecond().getSuccessor().add(new Arc(y, a.getProbability()));
Key k = new Key(m.getId(), val);
unfoldedNet.put(k, y);
if (!(containsElement(q, m)))
q.addLast(new NodePair(m, y));
}
}
}
runThroughNet(q);