use of com.graphhopper.routing.AlternativeRoute.AlternativeBidirSearch in project graphhopper by graphhopper.
the class AlternativeRouteTest method testDisconnectedAreas.
@Test
public void testDisconnectedAreas() {
Graph g = createTestGraph(true, em);
// one single disconnected node
updateDistancesFor(g, 20, 0.00, -0.01);
Weighting weighting = new FastestWeighting(carFE);
AlternativeBidirSearch altDijkstra = new AlternativeBidirSearch(g, weighting, traversalMode, 1);
Path path = altDijkstra.calcPath(1, 20);
assertFalse(path.isFound());
// make sure not the full graph is traversed!
assertEquals(3, altDijkstra.getVisitedNodes());
}
use of com.graphhopper.routing.AlternativeRoute.AlternativeBidirSearch in project graphhopper by graphhopper.
the class AlternativeRouteTest method testDisconnectedAreas.
@ParameterizedTest
@ArgumentsSource(FixtureProvider.class)
public void testDisconnectedAreas(Fixture p) {
initTestGraph(p.graph, p.carFE);
// one single disconnected node
updateDistancesFor(p.graph, 20, 0.00, -0.01);
AlternativeBidirSearch altDijkstra = new AlternativeBidirSearch(p.graph, p.weighting, p.traversalMode, 1);
Path path = altDijkstra.calcPath(1, 20);
assertFalse(path.isFound());
// make sure not the full graph is traversed!
assertEquals(3, altDijkstra.getVisitedNodes());
}
Aggregations