Package org.opentripplanner.routing.graph

Examples of org.opentripplanner.routing.graph.Edge.traverse()


        }
       
        Edge backEdge = lastStateClicked.getBackEdge();
        State backState = lastStateClicked.getBackState();
       
        backEdge.traverse(backState);
      }
        });
        pane.add(traverseButton);
       
        return pane;
View Full Code Here


                    ) {

                    ret = ((TransitBoardAlight) edge).traverse(ret, orig.getBackState().getTimeSeconds());
                    newInitialWaitTime = ret.stateData.initialWaitTime;
                } else {
                    ret = edge.traverse(ret);
                }

                if (ret != null && ret.getBackMode() != null && orig.getBackMode() != null &&
                        ret.getBackMode() != orig.getBackMode()) {
                    ret = ret.next; // Keep the mode the same as on the original graph path (in K+R)
View Full Code Here

        System.out.println(intermediate.getOutgoing());
       
        State partialS0 = new State(options);
        State partialS1 = e1.traverse(partialS0);
        State partialS2A = partialE2First.traverse(partialS1);
        State partialS2B = partialE2Second.traverse(partialS2A);
        State partialS3 = e3.traverse(partialS2B);
       
        // Should start at the same time.
        assertEquals(s0.getTimeSeconds(), partialS0.getTimeSeconds());
       
View Full Code Here

        State s3NoCost = e3.traverse(s2NoCost);
       
        State partialS0NoCost = new State(options);
        State partialS1NoCost = e1.traverse(partialS0NoCost);
        State partialS2ANoCost = partialE2First.traverse(partialS1NoCost);
        State partialS2BNoCost = partialE2Second.traverse(partialS2ANoCost);
        State partialS3NoCost = e3.traverse(partialS2BNoCost);
       
        // Time and cost should be the same up to a rounding difference.
        assertTrue(Math.abs(s3NoCost.getTimeSeconds() - partialS3NoCost.getTimeSeconds()) <= 1);
        assertTrue(Math.abs(s3NoCost.getElapsedTimeSeconds() - partialS3NoCost.getElapsedTimeSeconds()) <= 1);
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.