Package org.opentripplanner.profile

Examples of org.opentripplanner.profile.ProfileRouter$ExtremaPropagationTraverseVisitor


        req.maxCarTime   = maxCarTime;
        req.minBikeTime  = minBikeTime;
        req.minCarTime   = minCarTime;
        req.suboptimalMinutes = suboptimalMinutes;

        ProfileRouter router = new ProfileRouter(graph, req);
        try {
            ProfileResponse response = router.route();
            if (req.analyst) {
                surfaceCache.add(router.minSurface);
                surfaceCache.add(router.maxSurface);
                List<TimeSurfaceShort> surfaceShorts = Lists.newArrayList();
                surfaceShorts.add(new TimeSurfaceShort(router.minSurface));
                surfaceShorts.add(new TimeSurfaceShort(router.maxSurface));
                return Response.status(Status.OK).entity(surfaceShorts).build();
            } else {
                return Response.status(Status.OK).entity(response).build();
            }
        } finally {
            router.cleanup(); // destroy routing contexts even when an exception happens
        }

    }
View Full Code Here

TOP

Related Classes of org.opentripplanner.profile.ProfileRouter$ExtremaPropagationTraverseVisitor

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.