Package org.opentripplanner.api.model

Examples of org.opentripplanner.api.model.Itinerary


        Graph graph = Context.getInstance().graph;
        when(graph.getTransferTable()).thenReturn(table);

        // Do the planning
        Response response = planner.getItineraries();
        Itinerary itinerary = response.getPlan().itinerary.get(0);
        // Check the ids of the first two busses
        assertEquals("190W1280", itinerary.legs.get(1).tripId);
        assertEquals("751W1330", itinerary.legs.get(3).tripId);

        // Now add a transfer between the two busses of minimal 126 seconds
View Full Code Here


        Graph graph = Context.getInstance().graph;
        when(graph.getTransferTable()).thenReturn(table);

        // Do the planning
        Response response = planner.getItineraries();
        Itinerary itinerary = response.getPlan().itinerary.get(0);
        // Check the ids of the first two busses
        assertEquals("190W1280", itinerary.legs.get(1).tripId);
        assertEquals("751W1330", itinerary.legs.get(3).tripId);

        // Now add a forbidden transfer between the two busses
View Full Code Here

        Graph graph = Context.getInstance().graph;
        when(graph.getTransferTable()).thenReturn(table);

        // Do the planning
        Response response = planner.getItineraries();
        Itinerary itinerary = response.getPlan().itinerary.get(0);
        // Check the ids of the first two busses
        assertEquals("751W1320", itinerary.legs.get(1).tripId);
        assertEquals("91W1350", itinerary.legs.get(3).tripId);

        // Now add a timed transfer between two other busses
View Full Code Here

        Graph graph = Context.getInstance().graph;
        when(graph.getTransferTable()).thenReturn(table);

        // Do the planning
        Response response = planner.getItineraries();
        Itinerary itinerary = response.getPlan().itinerary.get(0);
        // Check the ids of the first two busses
        assertEquals("751W1320", itinerary.legs.get(1).tripId);
        assertEquals("91W1350", itinerary.legs.get(3).tripId);

        // Now add a timed transfer between two other busses
View Full Code Here

            }
        }
        Geometry geom = GeometryUtils.getGeometryFactory().createLineString(coordinates);
        this.geometry = PolylineEncoder.createEncodings(geom);
        PlanGenerator pgen = new PlanGenerator(null, null);
        Itinerary itin = pgen.generateItinerary(path, false);
        for (Leg leg : itin.legs) {
            walkSteps.addAll(leg.walkSteps);
        }
        time = (int) (state.getElapsedTimeSeconds());
    }
View Full Code Here

TOP

Related Classes of org.opentripplanner.api.model.Itinerary

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.