X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=transportpce.git;a=blobdiff_plain;f=pce%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Ftransportpce%2Fpce%2Fgraph%2FPceGraph.java;h=484da76953d8b1503a35b5b233f3bb45c07aabba;hp=711cbcebe2d165e0d468a7b20fb1a4b3f7bd494c;hb=c5fc25e73679127ad29a5196410f24b50dcc8f7d;hpb=2ef6a7a4d8d7aaac99fe8f34d25ed1d5e23cb3c7 diff --git a/pce/src/main/java/org/opendaylight/transportpce/pce/graph/PceGraph.java b/pce/src/main/java/org/opendaylight/transportpce/pce/graph/PceGraph.java index 711cbcebe..484da7695 100644 --- a/pce/src/main/java/org/opendaylight/transportpce/pce/graph/PceGraph.java +++ b/pce/src/main/java/org/opendaylight/transportpce/pce/graph/PceGraph.java @@ -15,7 +15,7 @@ import java.util.List; import java.util.Map; import org.jgrapht.GraphPath; -import org.jgrapht.alg.shortestpath.KShortestPaths; +import org.jgrapht.alg.shortestpath.KShortestSimplePaths; import org.jgrapht.alg.shortestpath.PathValidator; import org.jgrapht.graph.DefaultDirectedWeightedGraph; import org.opendaylight.transportpce.common.ResponseCodes; @@ -136,10 +136,10 @@ public class PceGraph { } // KShortestPaths on weightedGraph - KShortestPaths swp = - new KShortestPaths(weightedGraph, kpathsToBring, mhopsPerPath, wpv); + KShortestSimplePaths swp = + new KShortestSimplePaths(weightedGraph, mhopsPerPath, wpv); - allWPaths = swp.getPaths(apceNode.getNodeId().getValue(), zpceNode.getNodeId().getValue()); + allWPaths = swp.getPaths(apceNode.getNodeId().getValue(), zpceNode.getNodeId().getValue(), kpathsToBring); if (allWPaths.isEmpty()) { LOG.info(" In runKgraphs : algorithm didn't find any path");