Examples of incrementWeight()


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

            }

            StateEditor s1 = s0.edit(this);
            s1.setTimeSeconds(board_after);
            long wait_cost = board_after - t0;
            s1.incrementWeight(wait_cost + transfer_penalty);
            s1.setBackMode(getMode());
            return s1.makeState();
        }
    }
View Full Code Here

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

    @Override
    public State traverse(State s0) {
        StateEditor s1 = s0.edit(this);
        s1.setBackMode(TraverseMode.LEG_SWITCH);
        s1.incrementWeight(1);
        // Increment weight, but not time. See Javadoc on this class.
        return s1.makeState();
    }

    @Override
View Full Code Here

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

         */
        if (s0.getNonTransitMode() != TraverseMode.WALK || !options.modes.getBicycle())
            return null;

        StateEditor s0e = s0.edit(this);
        s0e.incrementWeight(options.bikeParkCost);
        s0e.incrementTimeInSeconds(options.bikeParkTime);
        s0e.setBackMode(TraverseMode.LEG_SWITCH);
        s0e.setBikeParked(false);
        State s1 = s0e.makeState();
        return s1;
View Full Code Here

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

        if (bikeParkVertex.getSpacesAvailable() == 0) {
            return null;
        }

        StateEditor s0e = s0.edit(this);
        s0e.incrementWeight(options.bikeParkCost);
        s0e.incrementTimeInSeconds(options.bikeParkTime);
        s0e.setBackMode(TraverseMode.LEG_SWITCH);
        s0e.setBikeParked(true);
        State s1 = s0e.makeState();
        return s1;
View Full Code Here

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

    }

    @Override
    public State traverse(State s0) {
        StateEditor s1 = s0.edit(this);
        s1.incrementWeight(1);
        // do not change mode, which means it may be null at the start of a trip
        return s1.makeState();
    }

    @Override
View Full Code Here

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

        int remainingTime = (int) Math.round(
                (1.0 - positionInHop) * tripTimes.getRunningTime(stopIndex));

        s1.incrementTimeInSeconds(remainingTime);
        s1.incrementWeight(remainingTime);
        s1.setBackMode(getMode());
        s1.setEverBoarded(true);
        return s1.makeState();
    }

View Full Code Here

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

       

        if (walkingBike || TraverseMode.BICYCLE.equals(traverseMode)) {
            if (!(backWalkingBike || TraverseMode.BICYCLE.equals(backMode))) {
                s1.incrementTimeInSeconds(options.bikeSwitchTime);
                s1.incrementWeight(options.bikeSwitchCost);
            }
        }

        if (!traverseMode.isDriving()) {
            s1.incrementWalkDistance(getDistance());
View Full Code Here

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

            }
        }

        s1.incrementTimeInSeconds(roundedTime);
       
        s1.incrementWeight(weight);

        return s1;
    }

    private double calculateOverageWeight(double firstValue, double secondValue, double maxValue,
View Full Code Here

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

           we need a complement operator. */
        if (s0.getBackEdge() instanceof TransferEdge) return null;
        if (s0.getOptions().wheelchairAccessible && !wheelchairAccessible) return null;
        StateEditor s1 = s0.edit(this);
        s1.incrementTimeInSeconds(time);
        s1.incrementWeight(time);
        s1.setBackMode(TraverseMode.WALK);
        return s1.makeState();
    }

    public void setGeometry(LineString geometry) {
View Full Code Here

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

        if (options.useBikeRentalAvailabilityInformation && dropoff.getBikesAvailable() == 0) {
            return null;
        }

        StateEditor s1 = s0.edit(this);
        s1.incrementWeight(options.arriveBy ? options.bikeRentalDropoffCost
                : options.bikeRentalPickupCost);
        s1.incrementTimeInSeconds(options.arriveBy ? options.bikeRentalDropoffTime
                : options.bikeRentalPickupTime);
        s1.setBikeRenting(true);
        s1.setBikeRentalNetwork(networks);
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.