Package org.opentripplanner.routing.impl

Examples of org.opentripplanner.routing.impl.DefaultStreetVertexIndexFactory


        }
       
        tempDir.delete();
       
        Graph graph = graphBuilder.getGraph();
        graph.index(new DefaultStreetVertexIndexFactory());
       
        server.graphService.registerGraph(routerId, new MemoryGraphSource(routerId, graph));
        return Response.status(Status.CREATED).entity(graph.toString() + "\n").build();
    }
View Full Code Here


        GraphBuilderTask graphBuilder = configurator.builderFromParameters();
        if (graphBuilder != null) {
            graphBuilder.run();
            // Inform configurator which graph is to be used for in-memory handoff.
            if (params.inMemory || params.preFlight) {
                graphBuilder.getGraph().index(new DefaultStreetVertexIndexFactory());
                configurator.makeGraphService(graphBuilder.getGraph());
            }
        }
       
        // start visualizer, if asked for
View Full Code Here

     * @throws IOException
     * @throws ClassNotFoundException
     */
    public static Graph load(ObjectInputStream in, LoadLevel level) throws IOException,
            ClassNotFoundException {
        return load(in, level, new DefaultStreetVertexIndexFactory());
    }
View Full Code Here

        options = new RoutingRequest();
        graph = new Graph();
        GTFSPatternHopFactory factory = new GTFSPatternHopFactory(context);
        factory.run(graph);
        graph.putService(CalendarServiceData.class, GtfsLibrary.createCalendarServiceData(context.getDao()));
        graph.index(new DefaultStreetVertexIndexFactory());
    }
View Full Code Here

        // Create graph
        GtfsContext context = GtfsLibrary.readGtfs(new File(ConstantsForTests.FAKE_GTFS));
        graph = spy(new Graph());
        GTFSPatternHopFactory factory = new GTFSPatternHopFactory(context);
        factory.run(graph);
        graph.index(new DefaultStreetVertexIndexFactory());
        graph.putService(CalendarServiceData.class,
                GtfsLibrary.createCalendarServiceData(context.getDao()));

        // Add simple transfer to make transfer possible between N-K and F-H
        createSimpleTransfer("agency:K", "agency:F", 100);
View Full Code Here

        bundles.getBundles().get(0).setDefaultBikesAllowed(false);
        _builder.setGtfsBundles(bundles);

        Graph graph = new Graph();
        _builder.buildGraph(graph, _extra);
        graph.index(new DefaultStreetVertexIndexFactory());

        Trip trip = graph.index.tripForId.get(new AgencyAndId("a0", "t0"));
        TripPattern pattern = graph.index.patternForTrip.get(trip);
        List<Trip> trips = pattern.getTrips();
        assertEquals(BikeAccess.UNKNOWN,
View Full Code Here

        bundles.getBundles().get(0).setDefaultBikesAllowed(true);
        _builder.setGtfsBundles(bundles);

        Graph graph = new Graph();
        _builder.buildGraph(graph, _extra);
        graph.index(new DefaultStreetVertexIndexFactory());

        Trip trip = graph.index.tripForId.get(new AgencyAndId("a0", "t0"));
        TripPattern pattern = graph.index.patternForTrip.get(trip);
        List<Trip> trips = pattern.getTrips();
        assertEquals(BikeAccess.ALLOWED,
View Full Code Here

        builder.setSchema(schema);
        builder.buildGraph(graph, new HashMap<Class<?>, Object>());
        initTransit();

        initBikeRental();
        graph.index(new DefaultStreetVertexIndexFactory());

        if (DEBUG_OUTPUT) {
            try {
                graph.save(File.createTempFile("graph", ".obj"));
            } catch (IOException e) {
View Full Code Here

    public static void setUpClass() throws Exception {
        context = GtfsLibrary.readGtfs(new File(ConstantsForTests.FAKE_GTFS));

        GTFSPatternHopFactory factory = new GTFSPatternHopFactory(context);
        factory.run(graph);
        graph.index(new DefaultStreetVertexIndexFactory());

        TripDescriptor.Builder tripDescriptorBuilder = TripDescriptor.newBuilder();

        tripDescriptorBuilder.setTripId("1.1");
        tripDescriptorBuilder.setScheduleRelationship(TripDescriptor.ScheduleRelationship.CANCELED);
View Full Code Here

        gtfsBundle.setTransfersTxtDefinesStationPaths(true);
        gtfsGraphBuilderImpl.buildGraph(graph, null);
        // Set the agency ID to be used for tests to the first one in the feed.
        agencyId = graph.getAgencyIds().iterator().next();
        System.out.printf("Set the agency ID for this test to %s\n", agencyId);
        graph.index(new DefaultStreetVertexIndexFactory());
        timetableSnapshotSource = new TimetableSnapshotSource(graph);
        timetableSnapshotSource.purgeExpiredData = (false);
        graph.timetableSnapshotSource = (timetableSnapshotSource);
        alertPatchServiceImpl = new AlertPatchServiceImpl(graph);
        alertsUpdateHandler.setAlertPatchService(alertPatchServiceImpl);
View Full Code Here

TOP

Related Classes of org.opentripplanner.routing.impl.DefaultStreetVertexIndexFactory

Copyright © 2018 www.massapicom. 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.