ajout restriction autres voies pour les test

This commit is contained in:
bezza 2025-05-25 17:31:16 +02:00
parent 469c810f44
commit 94a837123b
2 changed files with 11 additions and 5 deletions

View file

@ -21,7 +21,13 @@ public class MyArcInspector implements ArcInspector {
boolean result=true;
if (this.restreint){
RoadInformation.RoadType type=arc.getRoadInformation().getType();
if (type==RoadInformation.RoadType.PEDESTRIAN || type==RoadInformation.RoadType.CYCLEWAY ) {
if (type != RoadInformation.RoadType.MOTORWAY &&
type != RoadInformation.RoadType.TRUNK &&
type != RoadInformation.RoadType.PRIMARY &&
type != RoadInformation.RoadType.SECONDARY &&
type != RoadInformation.RoadType.TERTIARY &&
type != RoadInformation.RoadType.RESIDENTIAL &&
type != RoadInformation.RoadType.UNCLASSIFIED ) {
result=false;
}
}

View file

@ -175,10 +175,10 @@ public class TestDijkstra {
// System.out.println("== Trajet long (et pénible avec les enfants) ==");
// testScenario("bretagne.mapgr",564429,602395 , Mode.LENGTH, false,false,false);
System.out.println("== Test bug dijkstra temps ==");
testScenario("paris.mapgr", 27361, 36108, Mode.TIME, true,false,false);
// System.out.println("== Test bug dijkstra temps ==");
// testScenario("paris.mapgr", 27361, 36108, Mode.TIME, true,false,false); // ce test mettait en lumière un problème d'arrondi qui est mtn résolu.
// System.out.println("== Trajet impossible (piste cyclable) ==");
// testScenario("insa.mapgr",90,922 , Mode.LENGTH, false,false,true); //marche pas
System.out.println("== Trajet impossible (piste cyclable) ==");
testScenario("insa.mapgr",90,922 , Mode.LENGTH, false,false,true); //marche pas
}
}