Examples of NegativeHopTime


Examples of org.opentripplanner.graph_builder.annotation.NegativeHopTime

                }
            }
            int runningTime = st1.getArrivalTime() - st0.getDepartureTime();

            if (runningTime < 0) {
                LOG.warn(graph.addBuilderAnnotation(new NegativeHopTime(new StopTime(st0), new StopTime(st1))));
                // negative hops are usually caused by incorrect coding of midnight crossings
                midnightCrossed = true;
                if (st0.getDepartureTime() > 23 * SECONDS_IN_HOUR && st1.getArrivalTime() < 1 * SECONDS_IN_HOUR) {
                    st1.setArrivalTime(st1.getArrivalTime() + 24 * SECONDS_IN_HOUR);
                } else {
View Full Code Here

Examples of org.opentripplanner.graph_builder.annotation.NegativeHopTime

    public void testAnnotation() {
        boolean found = false;
        for (GraphBuilderAnnotation annotation : graph.getBuilderAnnotations()) {
            if (annotation instanceof NegativeHopTime) {
                NegativeHopTime nht = (NegativeHopTime) annotation;
                assertTrue(nht.st0.getDepartureTime() > nht.st1.getArrivalTime());
                found = true;
            }
        }
        assertTrue(found);
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.