| | |
| | | |
| | | // 5. 转换为算法库接口XML |
| | | if (result) { |
| | | // result = createIfXmlFromRbd(modelRbd, algorithmList, modelNodeAndVnodeList); |
| | | result = createIfXmlFromRbd(modelRbd, algorithmList, modelNodeAndVnodeList); |
| | | } |
| | | |
| | | // 6. 保存模型 |
| | |
| | | ModelNode endNode = getBranchNodesOneParallel(pathOneGroup, branchNodeList); |
| | | if ("connect".equals(startNode.getNodeType()) && pathOneGroup.size()==lines.size()) { |
| | | // 替换成虚节点 |
| | | modelNodeAndVnodeList.add(startNode); |
| | | replaceToVnode("parallel", modelId, modelNodeList, modelLineList, |
| | | algorithmList, modelNodeAndVnodeList, startNode, endNode, branchNodeList); |
| | | } else { |
| | |
| | | |
| | | if ("connect".equals(startNode.getNodeType()) && startNode.getInLineNum()==2) { |
| | | // 替换成虚节点 |
| | | modelNodeAndVnodeList.add(startNode); |
| | | replaceToVnode("bridge", modelId, modelNodeList, modelLineList, |
| | | algorithmList, modelNodeAndVnodeList, startNode, endNode, branchNodeList); |
| | | } else { |
| | |
| | | } |
| | | } |
| | | if (thisNodeSuccess) { |
| | | modelNodeAndVnodeList.add(opNode); |
| | | replaceToVnode(opNode.getNodeType(), modelId, modelNodeList, modelLineList, |
| | | algorithmList, modelNodeAndVnodeList, opNode, endNode, branchNodeList); |
| | | hasSimplified = true; |
| | |
| | | algorithm.setAlgorithmType(type); |
| | | algorithm.setComputerList(computerList.get(0)); |
| | | algorithm.setObjectList(computerList.get(1)); |
| | | if ("vote".equals(type)) algorithm.setVoteNum(startNode.getVoteNum()); |
| | | algorithm.setStep(algorithmList.size()==0 ? 0 : algorithmList.get(algorithmList.size()-1).getStep()+1); |
| | | algorithmList.add(algorithm); |
| | | |