TestDijkstra entièrement décommenté
This commit is contained in:
parent
a894f8e032
commit
e466356c86
3 changed files with 15 additions and 18 deletions
|
|
@ -72,7 +72,6 @@ public class DijkstraAlgorithm extends ShortestPathAlgorithm {
|
||||||
if (succLabel.getMarque())
|
if (succLabel.getMarque())
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// Correction ici : on utilise getCoutRealise() pour Dijkstra
|
|
||||||
double newCost = LabelActuel.getCoutRealise() + data.getCost(arc);
|
double newCost = LabelActuel.getCoutRealise() + data.getCost(arc);
|
||||||
|
|
||||||
if (newCost < succLabel.getCoutRealise()) {
|
if (newCost < succLabel.getCoutRealise()) {
|
||||||
|
|
|
||||||
|
|
@ -16,8 +16,6 @@ public class LabelStar extends Label {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//pour optimiser l'algo : ATTENTION PAS à L'initialisation pas le faire sinon ça va le faire pr tout les pts
|
|
||||||
//on rajoute un paremètre distance ds le label et quand on passe sur le label si c'est linfini on le calcule
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -172,11 +172,11 @@ public class TestDijkstra {
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws Exception {
|
||||||
|
|
||||||
//cartes non routières
|
//cartes non routières
|
||||||
// System.out.println("== Chemin de longueur nulle ==");
|
System.out.println("== Chemin de longueur nulle ==");
|
||||||
// testScenario("carre.mapgr", 9, 9, Mode.LENGTH, true,false,false);
|
testScenario("carre.mapgr", 9, 9, Mode.LENGTH, true,0,false);
|
||||||
|
|
||||||
// System.out.println("== Sommet hors du graphe ==");
|
System.out.println("== Sommet hors du graphe ==");
|
||||||
// testScenario("carre.mapgr", 0, 9999, Mode.LENGTH, true,false,false);
|
testScenario("carre.mapgr", 0, 9999, Mode.LENGTH, true,0,false);
|
||||||
|
|
||||||
//cartes routières
|
//cartes routières
|
||||||
System.out.println("== Test en distance ==");
|
System.out.println("== Test en distance ==");
|
||||||
|
|
@ -187,21 +187,21 @@ public class TestDijkstra {
|
||||||
|
|
||||||
// autres scénarios
|
// autres scénarios
|
||||||
|
|
||||||
// System.out.println("== Trajet long (et pénible avec les enfants) ==");
|
System.out.println("== Trajet long (et pénible avec les enfants) ==");
|
||||||
// testScenario("bretagne.mapgr",564429,602395 , Mode.LENGTH, false,false,false);
|
testScenario("bretagne.mapgr",564429,602395 , Mode.LENGTH, false,0,false);
|
||||||
|
|
||||||
System.out.println("== Trajet impossible (piste cyclable) ==");
|
System.out.println("== Trajet impossible (piste cyclable) ==");
|
||||||
testScenario("insa.mapgr",90,922 , Mode.LENGTH, false,0,true);
|
testScenario("insa.mapgr",90,922 , Mode.LENGTH, false,0,true);
|
||||||
|
|
||||||
//test probleme ouvert
|
//tests probleme ouvert
|
||||||
//System.out.println("== Test Probleme Ouvert ==");
|
System.out.println("== Test Probleme Ouvert ==");
|
||||||
//testScenario("toulouse.mapgr",33056,16303 , Mode.TIME, false,2,false);
|
testScenario("toulouse.mapgr",33056,16303 , Mode.TIME, false,2,false);
|
||||||
|
|
||||||
//test probleme ouvert
|
|
||||||
// System.out.println("== Test Probleme Ouvert ==");
|
|
||||||
// testScenario("bretagne.mapgr",165317,74644 , Mode.TIME, false,2,false);
|
|
||||||
|
|
||||||
//System.out.println("== Test Probleme Ouvert ==");
|
System.out.println("== Test Probleme Ouvert ==");
|
||||||
//testScenario("bretagne.mapgr",165317,74644 , Mode.TIME, false,2,false);
|
testScenario("bretagne.mapgr",165317,74644 , Mode.TIME, false,2,false);
|
||||||
|
|
||||||
|
System.out.println("== Test Probleme Ouvert ==");
|
||||||
|
testScenario("bretagne.mapgr",165317,74644 , Mode.TIME, false,2,false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue