Examples of freezeTraverseMode()


Examples of org.opentripplanner.routing.core.RoutingRequest.freezeTraverseMode()

        GraphPath path = tree.getPath(C, false);
        assertNull(path);

        // or CAR+WALK (no P+R).
        options = new RoutingRequest("WALK,CAR");
        options.freezeTraverseMode();
        options.setRoutingContext(graph, A, C);
        tree = aStar.getShortestPathTree(options);
        path = tree.getPath(C, false);
        assertNull(path);
View Full Code Here

Examples of org.opentripplanner.routing.core.RoutingRequest.freezeTraverseMode()

        new ParkAndRideLinkEdge(B, PRB);

        // But it is still impossible to get from A to C by WALK only
        // (AB is CAR only).
        options = new RoutingRequest("WALK");
        options.freezeTraverseMode();
        options.setRoutingContext(graph, A, C);
        tree = aStar.getShortestPathTree(options);
        path = tree.getPath(C, false);
        assertNull(path);
       
View Full Code Here

Examples of org.opentripplanner.routing.core.RoutingRequest.freezeTraverseMode()

        path = tree.getPath(C, false);
        assertNull(path);
       
        // Or CAR only (BC is WALK only).
        options = new RoutingRequest("CAR");
        options.freezeTraverseMode();
        options.setRoutingContext(graph, A, C);
        tree = aStar.getShortestPathTree(options);
        path = tree.getPath(C, false);
        assertNull(path);
View Full Code Here

Examples of org.opentripplanner.routing.core.RoutingRequest.freezeTraverseMode()

        GenericAStar aStar = new GenericAStar();

        // Impossible to get from B to D in BIKE+WALK (no bike P+R).
        RoutingRequest options = new RoutingRequest("BICYCLE_PARK,TRANSIT");
        options.freezeTraverseMode();
        options.setRoutingContext(graph, B, D);
        ShortestPathTree tree = aStar.getShortestPathTree(options);
        GraphPath path = tree.getPath(D, false);
        assertNull(path);
View Full Code Here

Examples of org.opentripplanner.routing.core.RoutingRequest.freezeTraverseMode()

        GraphPath path = tree.getPath(v3, false);
        assertNull(path);

        // or biking + walking (assuming walking bikes is disallowed)
        options = new RoutingRequest(new TraverseModeSet("WALK,BICYCLE,TRANSIT"));
        options.freezeTraverseMode();
        options.setRoutingContext(graph, v1, v3);
        tree = aStar.getShortestPathTree(options);

        path = tree.getPath(v3, false);
        assertNull(path);
View Full Code Here

Examples of org.opentripplanner.routing.core.RoutingRequest.freezeTraverseMode()

        new RentABikeOnEdge(stationVertex, stationVertex, networks);
        new RentABikeOffEdge(stationVertex, stationVertex, networks);

        // but we can't get off the bike at v3, so we still fail
        options = new RoutingRequest(new TraverseModeSet("WALK,BICYCLE,TRANSIT"));
        options.freezeTraverseMode();
        options.setRoutingContext(graph, v1, v3);
        tree = aStar.getShortestPathTree(options);

        path = tree.getPath(v3, false);
        // null is returned because the only state at the target is not final
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.