Examples of makeState()


Examples of org.opentripplanner.routing.core.StateEditor.makeState()

    @Override
    public State optimisticTraverse(State s0) {
        StateEditor s1 = s0.edit(this);
        s1.incrementTimeInSeconds(0); // FIXME too optimistic
        return s1.makeState();
    }
   
    @Override
    public double weightLowerBound(RoutingRequest options) {
        return timeLowerBound(options);
View Full Code Here

Examples of org.opentripplanner.routing.core.StateEditor.makeState()

        s1.setTripId(newTrip.getId()); // TODO check meaning
        s1.setPreviousTrip(oldTrip);   // TODO check meaning
        s1.setTripTimes(newTripTimes);
        s1.incrementWeight(dwellTime);
        // Mode should not change.
        return s1.makeState();
    }

    @Override
    public LineString getGeometry() {
        return null;
View Full Code Here

Examples of org.opentripplanner.routing.core.StateEditor.makeState()

        StateEditor s1 = s0.edit(this);
        //assume bike rental stations are more-or-less on-street
        s1.incrementTimeInSeconds(1);
        s1.incrementWeight(1);
        s1.setBackMode(s0.getNonTransitMode());
        return s1.makeState();
    }

    @Override
    public double weightLowerBound(RoutingRequest options) {
        return options.modes.contains(TraverseMode.BICYCLE) ? 0 : Double.POSITIVE_INFINITY;
View Full Code Here

Examples of org.opentripplanner.routing.core.StateEditor.makeState()

    @Override
    public State traverse(State s0) {
        StateEditor s1 = s0.edit(this);
        s1.incrementWeight(1);
        s1.setBackMode(TraverseMode.WALK);
        return s1.makeState();
    }

    @Override
    public double getDistance() {
        return 0;
View Full Code Here

Examples of org.opentripplanner.routing.core.StateEditor.makeState()

        StateEditor s1 = s0.edit(this);
        s1.setBackMode(TraverseMode.WALK);
        s1.incrementWeight(options.elevatorHopCost);
        s1.incrementTimeInSeconds(options.elevatorHopTime);
        return s1.makeState();
    }

    @Override
    public double getDistance() {
        return 0;
View Full Code Here

Examples of org.opentripplanner.routing.core.StateEditor.makeState()

    @Override
    public State traverse(State s0) {
        StateEditor s1 = s0.edit(this);
        s1.incrementWeight(1);
        s1.setBackMode(TraverseMode.WALK);
        return s1.makeState();
    }

    @Override
    public double getDistance() {
        return 0;
View Full Code Here

Examples of org.opentripplanner.routing.core.StateEditor.makeState()

            s1.setBackMode(TraverseMode.CAR);
        } else {
            // Can't cycle in/out a P+R.
            return null;
        }
        return s1.makeState();
    }

    @Override
    public State optimisticTraverse(State s0) {
        return traverse(s0);
View Full Code Here

Examples of org.opentripplanner.routing.core.StateEditor.makeState()

        }
        StateEditor s1 = s0.edit(this);
        s1.incrementTimeInSeconds(time);
        s1.incrementWeight(time);
        s1.setBackMode(getMode());
        return s1.makeState();
    }
}
View Full Code Here

Examples of org.opentripplanner.routing.core.StateEditor.makeState()

        StateEditor s1 = s0.edit(this);
        // We always walk in elevators, even when we have a bike with us
        s1.setBackMode(TraverseMode.WALK);
        s1.incrementWeight(options.elevatorBoardCost);
        s1.incrementTimeInSeconds(options.elevatorBoardTime);
        return s1.makeState();
    }

    @Override
    public double getDistance() {
        return 0;
View Full Code Here

Examples of org.opentripplanner.routing.core.StateEditor.makeState()

            TraverseMode mode = s0.getNonTransitMode();
            int t = (int) (d / s0.getOptions().getSpeed(mode));
            StateEditor s1 = s0.edit(this);
            s1.incrementTimeInSeconds(t);
            s1.incrementWeight(d);
            return s1.makeState();
        }

        @Override
        public String getName() {
            return null;
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.