Package org.opentripplanner.api.model

Examples of org.opentripplanner.api.model.TripPlan


        Response response = new Response(uriInfo);
        RoutingRequest request = null;
        try {
            // fill in request from query parameters via shared superclass method
            request = super.buildRequest();
            TripPlan plan = otpServer.planGenerator.generate(request);
            response.setPlan(plan);
        } catch (Exception e) {
            PlannerError error = new PlannerError(e);
            if(!PlannerError.isPlanningError(e.getClass()))
                LOG.warn("Error while planning path: ", e);
View Full Code Here


                    LOG.error("A graph path leaves before the requested time. This implies a bug.");
                }
            }
        }

        TripPlan plan = generatePlan(paths, originalOptions);
        if (plan != null) {
            for (Itinerary i : plan.itinerary) {
                i.tooSloped = tooSloped;
                /* fix up from/to on first/last legs */
                if (i.legs.size() == 0) {
View Full Code Here

        Place to = new Place(tripEndVertex.getX(), tripEndVertex.getY(), endName);

        from.orig = request.from.name;
        to.orig = request.to.name;

        TripPlan plan = new TripPlan(from, to, request.getDateTime());

        for (GraphPath path : paths) {
            Itinerary itinerary = generateItinerary(path, request.showIntermediateStops);
            itinerary = adjustItinerary(request, itinerary);
            plan.addItinerary(itinerary);
        }
        return plan;
    }
View Full Code Here

        // since this makes interlining _worse_ than alighting and re-boarding the same line.
        // TODO rethink whether it makes sense to weight waiting to board _less_ than 1.
        routingRequest.setWaitReluctance(1);
        routingRequest.setWalkBoardCost(30);

        TripPlan tripPlan = planGenerator.generate(routingRequest);
        // Stored in instance field for use in individual tests
        itinerary = tripPlan.itinerary.get(0);

        assertEquals(legCount, itinerary.legs.size());
View Full Code Here

TOP

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

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.