Package org.opentripplanner.routing.core

Examples of org.opentripplanner.routing.core.ConstantIntersectionTraversalCostModel


        proto.turnReluctance = (1.0);
        proto.setWalkReluctance(1.0);
        proto.stairsReluctance = (1.0);
       
        // Turn costs are all 0 by default.
        proto.traversalCostModel = (new ConstantIntersectionTraversalCostModel(0.0));
    }
View Full Code Here


    }
   
    @Test
    public void testForwardDefaultConstTurnCosts() {
        RoutingRequest options = proto.clone();
        options.traversalCostModel = (new ConstantIntersectionTraversalCostModel(10.0));
        options.setRoutingContext(_graph, topRight, bottomLeft);
       
        // Without turn costs, this path costs 2x100 + 2x50 = 300.
        // Since we traverse 3 intersections, the total cost should be 330.
        GraphPath path = checkForwardRouteDuration(options, 330);
View Full Code Here

    }
   
    @Test
    public void testForwardCarConstTurnCosts() {
        RoutingRequest options = proto.clone();
        options.traversalCostModel = (new ConstantIntersectionTraversalCostModel(10.0));
        options.setMode(TraverseMode.CAR);
        options.setRoutingContext(_graph, topRight, bottomLeft);
       
        // Without turn costs, this path costs 3x100 + 1x50 = 350.
        // Since there are 3 turns, the total cost should be 380.
View Full Code Here

        prototypeOptions.setWalkReluctance(1.0);
        prototypeOptions.turnReluctance = (1.0);
        prototypeOptions.carSpeed = 1.0;
        prototypeOptions.walkSpeed = 1.0;
        prototypeOptions.bikeSpeed = 1.0;
        prototypeOptions.traversalCostModel = (new ConstantIntersectionTraversalCostModel(10.0));
       
        if (traverseModes != null) {
            prototypeOptions.setModes(traverseModes);
        }
       
View Full Code Here

TOP

Related Classes of org.opentripplanner.routing.core.ConstantIntersectionTraversalCostModel

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.