EMap<Path, Witness> result = new BasicEMap<Path, Witness>();
Deque<SearchTree> stack = new ArrayDeque<SearchTree>();
ampl.setSolver(solver);
ampl.loadModel(ActTCG2AMPLModel.transform(atcg));
AbstractTCGNode currentNode = atcg.getInitialNode();
AbstractTCGEdge currentEdge;
SearchTree currentElement;
// Add Initial Search Tree Nodes
int pDInc = (currentNode.getOutgoing().size() >= 2 ? 1 : 0); // passed
// Decissions
// Increment
// (set
// to 1
// whenever
// the
// current
// node
// has
// multiple
// outgoing
// edges)
for (AbstractTCGEdge e : atcg.getInitialNode().getOutgoing()) {
stack.addLast(new SearchTree(e, null, 0, pDInc));
}
// Perform Breadth First Search
while (!stack.isEmpty()
&& (result.size() < maxNoPaths || maxNoPaths == -1)) {
pDInc = 0;
currentElement = stack.removeFirst();
currentEdge = currentElement.edge;
currentNode = currentEdge.getTarget();
if (currentElement.depth <= maxDepth || maxDepth == -1) {
pDInc = (currentNode.getOutgoing().size() >= 2 ? 1 : 0);
// Eliminate Infeasible Paths
if (pDInc == 1