diff --git a/be-graphes-algos/src/main/java/org/insa/graphs/algorithm/shortestpath/AStarAlgorithm.java b/be-graphes-algos/src/main/java/org/insa/graphs/algorithm/shortestpath/AStarAlgorithm.java index 79b320e..5a7c102 100644 --- a/be-graphes-algos/src/main/java/org/insa/graphs/algorithm/shortestpath/AStarAlgorithm.java +++ b/be-graphes-algos/src/main/java/org/insa/graphs/algorithm/shortestpath/AStarAlgorithm.java @@ -56,7 +56,7 @@ public class AStarAlgorithm extends DijkstraAlgorithm { maxSpeed = graph.getGraphInformation().getMaximumSpeed()/3.6; - System.out.println(maxSpeed); + //System.out.println(maxSpeed); for(Node node : graph.getNodes()){ nodeId = node.getId(); @@ -67,7 +67,7 @@ public class AStarAlgorithm extends DijkstraAlgorithm { else{ // Mode TEMPS sans vitesse max - System.err.println("uh"); + //System.err.println("uh"); for(Node node : graph.getNodes()) @@ -104,7 +104,7 @@ public class AStarAlgorithm extends DijkstraAlgorithm { IdxNewOrigin = minHeap.deleteMin().currentNode.getId(); labels[IdxNewOrigin].mark = true; - notifyNodeMarked(labels[IdxNewOrigin].currentNode); + //notifyNodeMarked(labels[IdxNewOrigin].currentNode); for (Arc arc : labels[IdxNewOrigin].currentNode.getSuccessors()) { // le arrayList de getSucessors, ça ne retourne que des arc forward. donc pas besoin de vérifier qui est l'origine o`u la destination diff --git a/be-graphes-algos/src/main/java/org/insa/graphs/algorithm/shortestpath/DijkstraAlgorithm.java b/be-graphes-algos/src/main/java/org/insa/graphs/algorithm/shortestpath/DijkstraAlgorithm.java index 793f658..758d172 100644 --- a/be-graphes-algos/src/main/java/org/insa/graphs/algorithm/shortestpath/DijkstraAlgorithm.java +++ b/be-graphes-algos/src/main/java/org/insa/graphs/algorithm/shortestpath/DijkstraAlgorithm.java @@ -19,8 +19,6 @@ public class DijkstraAlgorithm extends ShortestPathAlgorithm { @Override protected ShortestPathSolution doRun() { - - // retrieve data from the input problem (getInputData() is inherited from the // parent class ShortestPathAlgorithm) final ShortestPathData data = getInputData(); @@ -66,7 +64,7 @@ public class DijkstraAlgorithm extends ShortestPathAlgorithm { IdxNewOrigin = minHeap.deleteMin().currentNode.getId(); labels[IdxNewOrigin].mark = true; - notifyNodeMarked(labels[IdxNewOrigin].currentNode); + //notifyNodeMarked(labels[IdxNewOrigin].currentNode); for (Arc arc : labels[IdxNewOrigin].currentNode.getSuccessors()) { // le arrayList de getSucessors, ça ne retourne que des arc forward. donc pas besoin de vérifier si le chemin est empruntable @@ -80,8 +78,7 @@ public class DijkstraAlgorithm extends ShortestPathAlgorithm { NewCost = labels[IdxNewOrigin].computedCost + data.getCost(arc); // calcul de la nouvelle distance OldCost = labels[arc.getDestination().getId()].computedCost; // lecture de l'ancienne - if (Double.isInfinite(OldCost) - && Double.isFinite(NewCost)) { + if (Double.isInfinite(OldCost) && Double.isFinite(NewCost)) { notifyNodeReached(arc.getDestination()); }